claude.ai Gmail MCP: plain-text drafts get URLs rewritten to google.com/url redirect wrappers

Status Closed — duplicate
Maintainer reply None cached
Activity 2 comments · opened Sep 1, 2026 · closed Oct 11, 2026

Description

When creating a Gmail draft through the claude.ai Gmail MCP connector (create_draft / update_draft) with only the plain-text body field, any bare URLs in the body are rewritten by Gmail's composer into Google redirect links of the form:

https://www.google.com/url?q=https://example.com&source=gmail&ust=<timestamp>&sa=E

These wrapped links are what actually goes out when the draft is sent. To recipients (and spam filters) they look like tracking links — a real problem for professional correspondence.

Repro

  1. Call mcp__claude_ai_Gmail__create_draft with a plain-text body containing a bare URL (e.g. https://arxiv.org/abs/XXXX.XXXXX), no htmlBody.
  2. Open the draft in the Gmail web UI: the URL renders as a link whose href is the google.com/url wrapper.
  3. Sending the draft delivers the wrapped href.

Workaround

Pass htmlBody with explicit <a href="..."> anchors — Gmail leaves a proper HTML part alone. (Observed: 13/13 drafts created body-only were wrapped; all fixed by updating with htmlBody.)

Suggested fix

Either auto-generate a text/html part with clean anchors when the plain body contains URLs, or document the behavior on the tool and warn when a body-only draft contains bare URLs.

Environment: Claude Code CLI on macOS, claude.ai Gmail connector, 2026-09-01.

View original on GitHub ↗

This issue has 2 comments on GitHub. Read the full discussion on GitHub ↗