Skip to content

feature: Handle protocol negotiation downgrade for better compatibility #337

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

Closed
StarpTech opened this issue May 26, 2025 · 5 comments
Closed
Labels
area: mcp spec Issues related to MCP specification compliance area: sdk SDK improvements unrelated to MCP specification good first issue Good for new contributors

Comments

@StarpTech
Copy link
Contributor

StarpTech commented May 26, 2025

Description

Hi, after upgrading to the latest version (0.30.0), we experienced incompatibilities with mcp-remote, a popular tool used to enable SSE in environments where SSE is not yet supported. The same issues have been reproduced in Postman. None of these clients support custom protocol negotiation or have considered SSE as a subset of 2025-03-26, making it impossible to upgrade mcp-go while still supporting the 2024-11-05 protocol version.

It would be great if we could manually specifiy a protocol version or, even better, have the library calculate the version based on the features used. For example, if you opt in to streaming, the version would be 2025-03-26; if not, it remains 2024-11-05.

This would improve ecosystem compatibility until the latest MCP spec has settled.

Logs or Error Messages

Here is a picture when trying to connect against a server that uses mcp-go in version 0.30.0

Image

Environment

  • Go version (see go.mod): 1.24.1
  • mcp-go version (see go.mod): 0.30.0
  • MacOS
@ezynda3 ezynda3 added good first issue Good for new contributors priority: medium Medium priority, should be addressed soon area: mcp spec Issues related to MCP specification compliance labels May 26, 2025
@migmartri
Copy link

Agreed, same problem here but using claude desktop through mcp-remote

Image

@ezynda3
Copy link
Contributor

ezynda3 commented May 27, 2025

I'm thinking we could add logic in the With options that will set the version based on which part of the spec it belongs to. Thoughts?

@ezynda3 ezynda3 added area: sdk SDK improvements unrelated to MCP specification and removed priority: medium Medium priority, should be addressed soon labels May 27, 2025
@StarpTech
Copy link
Contributor Author

That sounds good to me. Should be obvious, but we need to ensure that once a higher protocol version is opted into, it cannot be downgraded.

rafaeljusto added a commit to rafaeljusto/teamwork-ai that referenced this issue May 27, 2025
The latest version of the library uses protocol 2025-03-26 instead of
2024-11-05 used by many clients (such as the latest version of Claude). To
avoid integration issues we will downgrade the version.

This is being discussed here:
mark3labs/mcp-go#337
rafaeljusto added a commit to rafaeljusto/teamwork-ai that referenced this issue May 27, 2025
The latest version of the library uses protocol 2025-03-26 instead of
2024-11-05 used by many clients (such as the latest version of Claude). To
avoid integration issues we will downgrade the version.

This is being discussed here:
mark3labs/mcp-go#337
@ezynda3
Copy link
Contributor

ezynda3 commented May 28, 2025

For now we've added simple version negotiation. We can add a more complex scheme later. Please try https://github.com/mark3labs/mcp-go/releases/tag/v0.30.1 and see if that helps.

@migmartri
Copy link

Thank you! I can confirm that it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: mcp spec Issues related to MCP specification compliance area: sdk SDK improvements unrelated to MCP specification good first issue Good for new contributors
Projects
None yet
Development

No branches or pull requests

3 participants