HTTP MCP: "Error POSTing to endpoint" despite server returning a valid tools/list result (Google Docs MCP docsmcp.googleapis.com)
Environment
- Claude Code version: 2.1.259 (native install)
- OS: Windows 11
- MCP server:
google-docs→https://docsmcp.googleapis.com/mcp/v1(Google's official Docs MCP), configured in project.mcp.jsonas"type": "http"with an OAuth desktop client.
What happens
- OAuth completes successfully (browser flow, consent granted).
/mcpreports: "Reconnected to google-docs, but fetching tools failed (detail withheld on this connection)."- No
mcp__google-docs__*tools are ever exposed.claude mcp listshows the server as! Needs authenticationeven right after a successful auth.
Log evidence
From ~/AppData/Local/claude-cli-nodejs/Cache/<project>/mcp-logs-google-docs/*.jsonl:
"debug": "Connection error: Error POSTing to endpoint: {"id":1,"jsonrpc":"2.0","result":{"tools":[ ... ]}}"
"error": "Failed to fetch tools: Error POSTing to endpoint: {"id":1,"jsonrpc":"2.0","result":{"tools":[{"name":"read_doc",...},{"name":"update_doc",...}]}}"
The payload attached to the error is a complete, well-formed JSON-RPC result containing the full tool catalog (read_doc, update_doc). The transport layer rejects the response anyway. Note there is no (HTTP nnn) in the error string, unlike the usual StreamableHTTPError path — so it does not look like a plain non-2xx rejection.
Likely cause
The client appears to mishandle how Google's endpoint frames the tools/list response — e.g. an SSE-framed (text/event-stream) body where plain JSON is expected on that code path, or a 2xx response whose Content-Type the POST handler doesn't accept. The server side is clearly returning a valid result.
Expected
Tools registered from result.tools; mcp__google-docs__read_doc / mcp__google-docs__update_doc available.
Repro
- Add Google's Docs MCP as an
httpserver in.mcp.json. - Authenticate via
/mcp. - Run
/mcpagain → "fetching tools failed".