Skip to content

Conversation

@lvluoyue
Copy link
Contributor

@lvluoyue lvluoyue commented Nov 21, 2025

Decouple the Protocol class from direct dependency on TransportInterface to support server instance reuse across multiple transport mechanisms.

Motivation and Context

Currently, the Protocol class can only be connected to a single transport instance due to internal state management and restrictions. Once connected, it cannot be reused with another transport. This change removes that limitation to allow a single Protocol instance to be used with multiple transports.The same issue exists in the TypeScript SDK: modelcontextprotocol/typescript-sdk#961

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

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

@lvluoyue lvluoyue closed this Nov 23, 2025
@lvluoyue lvluoyue reopened this Nov 24, 2025
@lvluoyue lvluoyue changed the title Decouple Server from TransportInterface for reusability [Server] Decouple Protocol from TransportInterface for reusability Nov 25, 2025
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.

1 participant