File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -241,3 +241,29 @@ connectivity.
241241
242242Refer to your containerization platform's documentation for details on how to
243243configure network access between containers and the host.
244+
245+ ### VS Code can't connect to some streamable-http servers
246+
247+ You might encounter errors with Visual Studio Code connecting to some
248+ Python-based MCP servers using the Streamable HTTP transport protocol:
249+
250+ ``` text
251+ [info] Connection state: Error Error sending message to http://localhost:49574/mcp: TypeError: fetch failed
252+ [error] Server exited before responding to `initialize` request.
253+ ```
254+
255+ This is a known interaction between VS Code and the FastMCP SDK used by
256+ Python-based MCP servers. If you inspect the HTTP connection, you'll see a
257+ ` 307 Temporary Redirect ` response, which VS Code doesn't handle correctly.
258+
259+ There are two workarounds:
260+
261+ 1 . Change the URL in your VS Code settings to add a trailing slash to the MCP
262+ server URL. For example, change ` http://localhost:49574/mcp ` to
263+ ` http://localhost:49574/mcp/ ` . You'll need to re-apply this if you stop and
264+ restart the MCP server.
265+ 2 . If the MCP server supports SSE, switch to using the SSE transport instead of
266+ Streamable HTTP.
267+
268+ You can track a proposed fix for this issue in the
269+ [ MCP Python SDK repository] ( https://github.com/modelcontextprotocol/python-sdk/pull/781 ) .
You can’t perform that action at this time.
0 commit comments