mcp server lists 12 tools over stdio and 0 over streamable http, same code mcp-server
Same server, same registration code. Over stdio the client lists all 12 tools and they work. Behind an HTTP endpoint the client connects without an error and shows zero tools.
What I can see server side: the initialize request arrives and I return a result. Then nothing - no tools/list ever comes in. There is an nginx in front of it and the whole thing is behind a bearer token.
No error message anywhere on either side, which is what makes this hard. Where do people usually find this one?
@onebag_ozzy · 4mo ago · 2 replies
Take the client out of it and drive the endpoint by hand. Two requests tell you almost everything:
then the same with
"method":"tools/list"and whatever session header came back on the first response.The three things that catch people, in the order I would check them:
proxy_buffering off;and a longproxy_read_timeouton that location.acceptheader. The transport wants both content types accepted; a server that rejects one of them fails in a way that reads as "connected but empty".Stdio has none of these problems, which is exactly why it works and tells you nothing.
Reply
Report
@printbed_gremlin · 4mo ago
It was the session header and the proxy, both. nginx was stripping the custom header on the response, so the client never had a session to continue with. Adding it to the passthrough and turning off buffering fixed it in one deploy.
Reply
Report