You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trying to connect to remote MCP server stuck at "Waiting for server to respond to initialize request..." #246753
bugIssue identified by VS Code Team member as probable bugchat-mcpinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
2025-04-16 14:13:05.469 [info] 405 status sending message to http://localhost:19193/sse, will attempt to fall back to legacy SSE
2025-04-16 14:13:05.470 [warning] Failed to parse message: "/messages/?session_id=7f7ad4150c504c3bb9b9741f1930403f"
2025-04-16 14:13:10.437 [info] Waiting for server to respond to `initialize` request...
2025-04-16 14:13:15.436 [info] Waiting for server to respond to `initialize` request...
2025-04-16 14:13:20.437 [info] Waiting for server to respond to `initialize` request...
It seems that this only comes up when connecting to an MCP server that's behind an envoy proxy, but I'm looking for anything that can help me debug what's happening. On the remote MCP server side, it all looks normal
The 405 is expected as the Python SDK uses the SSE transport (now removed from the spec) instead of streamable HTTP. We fall back gracefully when this is encountered.
...I am seeing the same endless "waiting for server to respond to initialize request..." message, in the Output when I try to connect Copilot with the local server, via STDIO.
Only supports the legacy SSE strategy for connection
Responds to POST requests to the MCP endpoint with a legacy SSE stream. SSE should only be served as GET. Because POST works, we asssume the server supports Streamable HTTP.
The fix for this is to have your server return an appropriate status code (405) when trying to post to your SSE endpoint. Or update to streamable HTTP.
Added a last-resort fallback in this case to make it not just break #249914 but as I said this is a bug in your server implementation and should be fixed upstream.
bugIssue identified by VS Code Team member as probable bugchat-mcpinsiders-releasedPatch has been released in VS Code InsidersverifiedVerification succeeded
Activity
SinOverCos commentedon Apr 16, 2025
Update: v1.99 doesn't have support for headers but it at least can connect via SSE to an MCP server that doesn't need headers.
v1.100 cannot connect to an MCP server via SSE at all
connor4312 commentedon Apr 16, 2025
The 405 is expected as the Python SDK uses the SSE transport (now removed from the spec) instead of streamable HTTP. We fall back gracefully when this is encountered.
mcp: fix SSE handling of CRLF and harden
mcp: fix SSE handling of CRLF and harden (microsoft#246773)
2 remaining items
TylerLeonhardt commentedon May 1, 2025
Verification steps:
Be on Windows and run this sample https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/servers/simple-tool
With
uv run mcp-simple-tool --transport sse --port 8000, and make sure it successfully discovers toolschokevin commentedon May 8, 2025
Curious to know if theres another issue here? I tried to run this sample https://devblogs.microsoft.com/dotnet/build-mcp-remote-servers-with-azure-functions/ and i'm getting the same "waiting for server to respond to initialize request...". The server connects fine through MCP Inspector and through the Open AI Agents SDK so not sure if this got fixed on the vscode end. I'm on commit
dac0c97if that helpsDinoChiesa commentedon May 9, 2025
Likewise here. I know this is closed issue, but... Following this:
https://devblogs.microsoft.com/dotnet/build-a-model-context-protocol-mcp-server-in-csharp/.
...I am seeing the same endless "waiting for server to respond to initialize request..." message, in the Output when I try to connect Copilot with the local server, via STDIO.
The settings.json has:
If I run
dotnet run --project MYCSPROJ.csprojfrom the terminal, the program starts up and appears to wait for messages on STDIO.VS code:
blouflashdb commentedon May 25, 2025
Still not fixed for me in latst insiders build...
antoontuijl commentedon May 26, 2025
I also get this error when I run the MCP server in VSCode:
2025-05-26 16:15:43.628 [info] Waiting for server to respond to
initializerequest...dotnet run works fine, but the MCP server fails to start.
connor4312 commentedon May 26, 2025
This error is generally a result of incorrect config or an incorrect MCP server implementation.
blouflashdb commentedon May 26, 2025
The config is correct and the server works. I checked it with the MCP Inspector.
connor4312 commentedon May 27, 2025
Can you share the MCP server you see this with?
blouflashdb commentedon May 27, 2025
I created this minimal reproduction repo: https://github.com/blouflashdb/nuxt-mcp-reproduction
npm i
npm run dev
The mcp server is started together with the nuxt app with SSE: http://localhost:3000/__mcp/sse
I also created this issue: antfu/nuxt-mcp-dev#21
connor4312 commentedon May 27, 2025
Your MCP server:
The fix for this is to have your server return an appropriate status code (405) when trying to post to your SSE endpoint. Or update to streamable HTTP.
mcp: add a second-step fallback for legacy SSE
connor4312 commentedon May 27, 2025
Added a last-resort fallback in this case to make it not just break #249914 but as I said this is a bug in your server implementation and should be fixed upstream.
mcp: add a second-step fallback for legacy SSE (#249914)