Skip to content

Conversation

@peeeteeer
Copy link
Collaborator

Summary

This PR addresses 2 issues in the mcp server connection initiation that were coming up when connecting the Azure Databricks mcp servers. I expect that similar or the same issues could come up with other mcp servers as well. Therefore I like to propose to fix:

1.) discovery how ping support is available
just adding other error codes and messages to the discovery

2.) disovery of if sse is supported
ignoring 404 in the error handler when mcp server is responding with 404 for initiating sse by the mcp client lib

Change Type

Please delete any irrelevant options.

  • Bug fix (non-breaking change which fixes an issue)

Testing

Please describe your test process and include instructions so that we can reproduce your test. If there are any important variables for your testing configuration, list them here.

Test Configuration:

Checklist

Please delete any irrelevant options.

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

Peter Rothlaender [email protected] on behalf of Daimler Truck AG.
Provider & Legal Notice | Daimler Truck
Copyright (c) {2025} Daimler Truck AG

@danny-avila danny-avila changed the title fix: mcp sse connection & ping error handling 🛰️ fix: MCP SSE & Ping Error Handling Nov 24, 2025
@danny-avila danny-avila changed the base branch from main to dev November 24, 2025 18:56
@danny-avila danny-avila merged commit 3628619 into danny-avila:dev Nov 24, 2025
2 checks passed
@devanchohan
Copy link

@peeeteeer @danny-avila

should this not be 405 per mcp spec?
The server MUST either return Content-Type: text/event-stream in response to this HTTP GET, or else return HTTP 405 Method Not Allowed, indicating that the server does not offer an SSE stream at this endpoint.

Oddly the Snowflake MCP I am using returns 406...

@peeeteeer
Copy link
Collaborator Author

@peeeteeer @danny-avila

should this not be 405 per mcp spec? The server MUST either return Content-Type: text/event-stream in response to this HTTP GET, or else return HTTP 405 Method Not Allowed, indicating that the server does not offer an SSE stream at this endpoint.

Oddly the Snowflake MCP I am using returns 406...

yes, but I think this is a typical issue when you do integrations based on a spec. You can choose between supporting it on your side or running behind a multi billion dollar company to do it right... I think at least in the beginning when you want to support as many mcps as possible I would choose option 1 as long as it is not such a big deal... when the deviation from the standard becomes really big it's another thing...

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.

3 participants