anthropics / anthropics/claude-code

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

Đang mở
#91,287 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
area:mcp bug duplicate platform:macos
Ngôn ngữ chính
Python
Star
145k
Fork
23.1k
Chỉ số merge pull request
Chỉ số pull request đang chờ

Mô tả

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

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Lĩnh vực
api, cli
Loại issue
Lỗi
Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Sôi nổi
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.