anthropics / anthropics/claude-code

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

Abierto
#91,287 0 comentarios 0 reacciones 0 asignados Ver en GitHub
area:mcp bug duplicate platform:macos
Lenguaje dominante
Python
Estrellas
145k
Forks
23.1k
Métricas de merge de PR
Métricas de PR pendientes

Descripción

## 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.

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Evaluación

Área
api, cli
Tipo de issue
Error
Dificultad
4/5
Tiempo estimado
3-5 días
Estado de actividad
Activo
Claridad
Necesita aclaración
Aptitud para principiantes
35/100

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.