HTTP MCP: "Error POSTing to endpoint" despite server returning a valid tools/list result (Google Docs MCP docsmcp.googleapis.com)

Status Open
Reported on v2.1.259
Maintainer reply None cached
Activity 0 comments · opened Sep 3, 2026

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.json as "type": "http" with an OAuth desktop client.

What happens

  1. OAuth completes successfully (browser flow, consent granted).
  2. /mcp reports: "Reconnected to google-docs, but fetching tools failed (detail withheld on this connection)."
  3. No mcp__google-docs__* tools are ever exposed. claude mcp list shows the server as ! Needs authentication even 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

  1. Add Google's Docs MCP as an http server in .mcp.json.
  2. Authenticate via /mcp.
  3. Run /mcp again → "fetching tools failed".

View original on GitHub ↗