Repository navigation
MCP transport: GET /mcp returns 405 → unusable with Claude Code, Cursor, and other streamable-HTTP clients #846
triasrahman
announced in
Announcements
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment

Uh oh!
There was an error while loading. Please reload this page.
Summary
The streamable-HTTP MCP endpoint (
/mcp) only mountsPOSTandDELETE. Clients that perform the GET handshake first — notably Claude Code, but also Cursor and other streamable-HTTP clients — fail to connect: the server is silently dropped and none of the WhatsApp tools are exposed.Environment
v9.3.1(and identical code onmain)mcp-godependency:mark3labs/mcp-gov0.56.0/mcp, stateless, streaming disabled (WithStateLess(true)+WithDisableStreaming(true)), behind basic authsrc/ui/mcp/route.go—Register()Reproduction
Using any streamable-HTTP MCP client that does a GET-first handshake:
POST works, but the GET returns
405. Claude Code connects tohttps://mcp.sentry.dev/mcp(a spec-compliant streamable-HTTP server) fine, while GOWA's endpoint is dropped at session load — so the symptom is "server configured but no tools appear."Root cause
In
src/ui/mcp/route.go,Get("/mcp")is deliberately not mounted (see the comment inRegister()). The streamable-HTTP transport (spec revision2025-03-26and later) requires the client to perform aGETfirst:MCP-Protocol-Versionand optionally establishes the stream used for server-initiated messages.POST initialize. A non-2xx response aborts the connection.Mounting only
POST/DELETEis an implementation detail that leaks into the wire protocol and breaks real clients.Expected behavior
GET /mcpshould return200with anMCP-Protocol-Versionresponse header (matchinginitialize's), so clients can complete the handshake and proceed toPOST.Suggested fix
Mount
GETalongsidePOST/DELETE, returning a minimal 200 response. KeepWithDisableStreaming(true)— the comment explains the fasthttp-adaptor goroutine/FD leak that streaming would introduce, so we don't want to re-enable it:With
WithStateLess(true)there are no server-initiated notifications, so an empty 200 GET response satisfies the spec.Happy to open the PR if maintainers want it.
All reactions