-
Notifications
You must be signed in to change notification settings - Fork 269
Can't connect to SSE server on preview 10 #340
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
Comments
The same issue here. Running the csharp-sdk\samples\AspNetCoreSseServer on preview.10, the client will report 406. Rolling back to preview.9 with the same codebase works fine. System.Net.Http.HttpRequestException: 'Response status code does not indicate success: 406 (Not Acceptable).' |
We seem to be getting some conflicting reports here. There have been a couple of changes to MapMcp() in the recently release previews that might be causing different problems for different people. In preview.9, we started emitting "messages" instead of "/messages" for the endpoint event. Preview 8 and earlier:
vs. preview 9 and 10:
The reason the behavior changed in previews 9 and 10 is to better handle custom patterns passed to @nstayte It might be worth leaving feed feedback with Windsurf asking them to fix the relative URL handling of their SSE MCP client. However, in preview.11, we should start emitting a root-relative URL again, but this time correctly include any necessary path prefixes that should fix these buggy clients. #323 (comment)
In preview 10, we changed the primary route for MapMcp() from SSE to Streamable HTTP (#330). The primary MapMcp() endpoint will no longer accept plain SSE GET reequests, however you can continue to point your SSE client to the "/sse" endpoint. So, this is broken in preview 10: var client = McpClientFactory.CreateAsync(
new SseClientTransport(new()
{
Endpoint = new("http://localhost:3001"), // Returns 406 (Not Acceptable)!
})); But this works: var client = McpClientFactory.CreateAsync(
new SseClientTransport(new()
{
Endpoint = new("http://localhost:3001/sse"), // Still works!
})); I plan to implement a new |
I have similar issue, both with preview 9 and 10. Here are the details: #320 I am trying to connect with modelcontextprotocol/inspector. |
@szatixx Are you trying to connect to the |
@halter73 The weird thing is that I have OpenAPI in the aps.net pipeline, and it doesn't shows any http endpoint (except the one I made). Here is my full code: https://gist.github.com/szatixx/6149e99f80bf02ce21d5decd3a29be20 I was trying to figure out for hours where I make the mistake, but it looks like for me that it should work. Thanks |
Describe the bug
When using Windsurf MCP, it gets an error.
Failed to start mcp sse client: Endpoint origin does not match connection origin localhost:5000
This doesn't happen in preview8, but happens in 9 and 10.
If you run the sample server on the latest main there is no error, but if you run the latest tag preview 10 it has the error.
To Reproduce
Steps to reproduce the behavior:
"test-server": { "serverUrl": "http://localhost:5000/sse" }
The text was updated successfully, but these errors were encountered: