Gmail MCP
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
**English** | Русский
**A1 Gmail MCP** lets an AI app work with your Gmail mailbox in plain language. Search and read mail, prepare replies as drafts, send them when you are ready, keep labels tidy and use the trash instead of permanent deletion.
It uses the Gmail API with your Google account. It distinguishes a draft you can still edit from a sent email that cannot be recalled, and makes the limits of the Gmail API explicit instead of implying that every mail task is reversible.
- **24 tools.** Search and read messages and threads, send email directly or through drafts, manage the draft lifecycle, labels and the trash.
- **Connects from the conversation.** Say "connect Gmail": the server walks you through the OAuth client, catches Google's redirect on 127.0.0.1 with PKCE and keeps the tokens itself — no config files, no restart.
- **Send deliberately.** The draft → review → send path is first-class; sending is marked destructive, and the server never re-sends after an ambiguous failure — an email cannot be unsent.
- **The trash is the safety net.** Removing mail goes through the reversible trash (about 30 days); there is deliberately no permanent message delete tool.
- **Bounded reading.** Decoded bodies are truncated at an explicit limit and attachments come back as metadata, so a long newsletter cannot silently flood the conversation.
- **Minimal Google scope.** It uses gmail.modify only — no permanent deletion and no access to Gmail settings.
Start with a read-only question:
> Show my unread emails from the last week and tell me which ones need a reply.
Connect the server · Explore use cases · Open technical documentation
---
See it work in a minute
> **You:** What is unread in my inbox from this week about the Acme contract?
>
> **Assistant:** Searches with Gmail query syntax and shows senders, subjects, dates and snippets. Nothing changes.
>
> **You:** Draft a reply to the latest one: we send the signed copy on Friday.
>
> **Assistant:** Creates a draft in the same thread and shows it for review. Nothing is sent.
>
> **You:** Send it.
>
> **Assistant:** Sends the draft. Sending is a separate, explicitly destructive step, so your AI app can ask for confirmation first.
Contents
- Quick start
- What you can ask it to do
- How mail changes
- What can change
- Getting access
- Configuration
- Data, limits and background work
- Technical documentation
- Support
Quick start
You need Node.js 20+ and a Google account. Credentials are not required at install time — the server connects from the conversation.
1. Add the server to your AI app.
2. Say "connect Gmail": the assistant walks you through creating the OAuth client and approving access without editing config files.
3. Ask the read-only question above.
Codex
**In the app:** open **Settings → MCP servers**, select **Add server**, choose **STDIO**, enter the command npx -y mcp-google-gmail@latest and environment variables GOOGLE_GMAIL_CLIENT_ID, GOOGLE_GMAIL_CLIENT_SECRET, GOOGLE_GMAIL_REFRESH_TOKEN, then select **Save** and **Restart**.
**From the command line:**
Codex MCP documentation
Claude Code
Claude Code MCP documentation
Claude Desktop
The current official path is **Settings → Extensions**. For a custom desktop extension, open **Advanced settings → Extension Developer → Install Extension…**, select a .mcpb file and follow the prompts.
This repository currently publishes an npm stdio package and does not contain a .mcpb bundle. For Claude Desktop builds that still support local configuration, use the following JSON stdio configuration as a fallback:
In those builds, save it to ~/Library/Application Support/Claude/claude_desktop_config.json on macOS or %APPDATA%\Claude\claude_desktop_config.json on Windows.
Claude Desktop MCP documentation
Cursor