Our MCP server was fine. Cloudflare was returning HTML.
This is what our MCP endpoint returned to a client speaking JSON-RPC: HTTP / 2 403 content-type : text/html; charset=UTF-8 server : cloudflare Attention Required! | Cloudflare Please enable cookies. Sorry, you have been blocked A program was being asked to enable cookies. We did not see that for three days, because that is not what the client reported. The client reported a parse failure, and a parse failure points at your own serialization, not at a machine four thousand kilometres away. What it looked like from inside The connector could not talk to our server. The tools never listed. Everything we could check on our side looked correct: valid JSON-RPC, right content type, right status codes, protocol revision we support. So we did the reasonable thing and started fixing the things that were wrong but adjacent. GET /{prefix}/_mcp was returning JSON. Per the Streamable HTTP spec it should return 405 if the server does not offer an SSE stream on GET. We changed it. It is a real fix and we kept it. It changed nothing. That is the value of shipping one variable at a time. If we had bundled that change with anything else, the next result would have been unreadable. The thing that actually settled it We wrote a minimal MCP server that imitated our own response shape exactly: application/json on POST, 405 on GET. A hundred lines, no auth, no database, nothing of ours in it. Then we exposed it through an ngrok tunnel and pointed the same connector at it. It worked immediately. Tools listed, first try. That one result eliminated most of the search space. Our response shape was fine, because a server with the same shape worked. The protocol was fine. The connector was fine. What was left was everything between the connector and our application, which is exactly the part we had not been looking at, because it is not in the repository. If you take one thing from this: when you cannot find the bug in your code, build something that cannot possibly contain it and see whether th