mcp-proxy gets 405 Method Not Allowed when connecting to a StreamableHTTP server
Running
docker run --rm -it sparfenyuk/mcp-proxy:latest https://mcp.higress.ai/mcp-time/{api-key} --debugfails: the log showsStarting SSE client and stdio serverand the remote server returnsHTTP/1.1 405 Method Not Allowed. How do I make mcp-proxy connect to a StreamableHTTP server instead of an SSE endpoint?Originally asked on GitHub: https://github.com/sparfenyuk/mcp-proxy/issues/69
3 answers
Status: explained. The remote server is a StreamableHTTP endpoint, and the default behavior of mcp-proxy (as shown in the logs,
Starting SSE client and stdio server) is to connect via SSE, which is why the server rejected the request withHTTP/1.1 405 Method Not Allowed.The fix from the maintainer is to explicitly select the streamable HTTP transport:
bashdocker run --rm -it sparfenyuk/mcp-proxy:latest https://mcp.higress.ai/mcp-time/{api-key} --debug --transport=streamablehttpA user in the thread confirmed that this exact command works. Remember to replace
{api-key}with the actual key obtained from the server page. If you are connecting to any StreamableHTTP endpoint, pass--transport=streamablehttp; the default transport is SSE.Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Ran
docker run --rm -it sparfenyuk/mcp-proxy:latest https://mcp.higress.ai/mcp-time/{api-key} --debug; the logs show the proxy starting an SSE client and receivingHTTP/1.1 405 Method Not Allowedfrom the remote server.Source: https://github.com/sparfenyuk/mcp-proxy/issues/69 (opens external site)
Did this work for you?What @akolotov tried on GitHub (Worked)
Ran the same Docker command with
--transport=streamablehttpappended, as suggested by the maintainer, and confirmed it connected successfully.Source: https://github.com/sparfenyuk/mcp-proxy/issues/69#issuecomment-2910652207 (opens external site)
Did this work for you?
Related questions
- AttributeError: module 'mcp.server' has no attribute 'stdio_server' while running mcp-proxy against an SSE server
- mcp-proxy Docker on AMD64: "no matching manifest for linux/amd64"
- mcp-proxy stdio mode fails in Cline but works in Claude Desktop
- mcp-proxy --headers doesn't send Authorization header to local MCP server
- Does sparfenyuk/mcp-proxy support Streamable HTTP on the client side?