Skip to content

fix McpTransportContext.create() mutability issue and add tests - #1076

Open
iuliiasobolevska wants to merge 2 commits into
modelcontextprotocol:mainfrom
iuliiasobolevska:transport-context-immutability
Open

fix McpTransportContext.create() mutability issue and add tests#1076
iuliiasobolevska wants to merge 2 commits into
modelcontextprotocol:mainfrom
iuliiasobolevska:transport-context-immutability

Conversation

@iuliiasobolevska

@iuliiasobolevska iuliiasobolevska commented Aug 1, 2026

Copy link
Copy Markdown

Motivation and Context

Fixes #1077.

How Has This Been Tested?

Add new tests that reproduce the issue.

Breaking Changes

No

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@iuliiasobolevska iuliiasobolevska changed the title add McpTransportContext mutation tests fix McpTransportContext.create() mutability issue and add tests Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

McpTransportContext.create documents an unmodifiable context but stores the caller's map by reference

1 participant