claude.ai Google Drive MCP: 5–10MB downloads fail with misleading "session expired" (undocumented response-size cap)

Open 💬 0 comments Opened Jul 13, 2026 by geoyws

Environment

  • Claude Code v2.1.207, Linux (Ubuntu, headless server)
  • Connector: claude.ai Google Drive MCP (claude.ai-managed connector, surfaced in Claude Code)
  • Tool: mcp__claude_ai_Google_Drive__download_file_content

Bug

Downloading a Drive file in the ~5–10MB range fails with the error MCP server "claude.ai Google Drive" session expired — which is not what is happening. The OAuth session is alive and every other tool on the same connector works in the same conversation (search_files, list_recent_files, get_file_metadata, and download_file_content for smaller files).

Empirical boundary from repeated probes on the same private folder (JPEG files):

| File size | Result |
|---|---|
| ≤ 4.95 MB | ✅ downloads fine (returns base64; large results saved to a tool-results file) |
| 6.40 – 10.42 MB | ❌ session expired (37/37 files, reproducible across sessions/days) |
| > 10 MB | ❌ explicit, honest "file too large" refusal |

So there appear to be two layers: an up-front 10MB metadata check with a proper error, and a lower transport/response-size cap (~8MB of base64?) that fails mid-flight and gets reported as an auth failure.

Why this matters

The misleading error sent us on a multi-day OAuth goose-chase: disconnect/reconnect of the connector, fresh sessions, /mcp re-auth — none of it changed anything, because it was never an auth problem. A correct error message would have made the root cause obvious in one probe.

Separately, the (undocumented, as far as I can find) effective ~5MB ceiling makes the Drive connector unusable for ordinary photos — most phone/camera JPEGs are 5–12MB. The tool schema offers no offset/range/chunk parameters, so there is no workaround within MCP.

Expected

  1. A truthful error for oversized responses (e.g. response too large: file is 7.4MB, limit is ~XMB) instead of session expired.
  2. The size limit documented in the tool description so agents can pre-check via get_file_metadata instead of burning retries.
  3. Ideally: chunked/range download support (offset+limit params), or server-side scaling for images (Drive already serves resized thumbnails natively), so files a few MB in size are usable.

Repro

  1. Connect the claude.ai Google Drive connector.
  2. Pick any Drive file between ~6.5MB and 10MB (e.g. a camera JPEG); confirm get_file_metadata works on it.
  3. Call download_file_content with its fileId → MCP server "claude.ai Google Drive" session expired, while any <5MB file in the same folder downloads fine in the same conversation.

View original on GitHub ↗