anthropics / anthropics/claude-code

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

Aperta
#91,287 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub
area:mcp bug duplicate platform:macos
Lingua principale
Python
Stelle
145k
Fork
23.1k
Metriche di merge delle PR
Metriche PR in attesa

Descrizione

## 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=&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 `` 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.

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Start at the create_draft and update_draft entry points for the claude.ai Gmail MCP connector and reproduce the body-only draft behavior with a bare URL. Compare that result with an update using htmlBody and explicit anchors. Done means determining the relevant implementation scope and choosing a documented or automated behavior that prevents unintended google.com/url wrappers.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Ambito
api, cli
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Attiva
Chiarezza
Da chiarire
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.