Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MCP server in cluster deployment not work #29

Open
JadenHuang2023 opened this issue Mar 4, 2025 · 3 comments
Open

MCP server in cluster deployment not work #29

JadenHuang2023 opened this issue Mar 4, 2025 · 3 comments

Comments

@JadenHuang2023
Copy link

My MCP Server is deployed in a clustered architecture, and the MCP client establishes a long connection with only one MCP server. Later, when a POST /mcp/message request is sent, it may be routed to another MCP server in the cluster.

@chemicL chemicL added the duplicate This issue or pull request already exists label Mar 4, 2025
@chemicL chemicL closed this as completed Mar 4, 2025
@chemicL chemicL reopened this Mar 4, 2025
@chemicL chemicL removed the duplicate This issue or pull request already exists label Mar 4, 2025
@chemicL
Copy link
Member

chemicL commented Mar 4, 2025

Thanks for the report. I assumed this would be a duplicate of #9 but it is a different issue entirely. I wonder whether it is a jdk-specific issue or something to discuss on the protocol level in https://github.com/modelcontextprotocol/specification

@JadenHuang2023
Copy link
Author

@chemicL Thanks for your comments.
I only tried Java SDK, I'm not sure if other languages have the same issue.

This is indeed a real-world issue. The POST request can be sent to any server in the cluster, but that server may not have the long connection with the MCP client.
We are considering using session stickiness as a solution to address this problem firstly.

@JadenHuang2023
Copy link
Author

It should be a protocol limitation.

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

No branches or pull requests

2 participants