# Gmail MCP Server

> **Gmail MCP Server** is a hosted, multitenant Model Context Protocol (MCP) server run by **MewCP** (https://mewcp.com), giving AI agents managed access to Gmail.
>
> MewCP takes care of all MCP infrastructure for you — credential storage, OAuth flows,
> token refresh, and production-grade auto-scaling — so your AI agents can connect to
> third-party services and run freely without you managing any MCP server yourself.
>
> Server page:  https://mewcp.com/mcp/google-gmail
> MewCP docs:   https://docs.mewcp.com
> All servers:  https://mewcp.com/servers (JSON: https://mewcp.com/api/servers)
> About MewCP:  https://mewcp.com/llms.txt

---

## About

Manage Gmail end to end with tools for sending, reading, replying to and organizing emails. Work with threads, labels, drafts, attachments and inbox workflows while keeping communication and email automation in one place.

---

## Details

- Server ID: `google-gmail`
- Version: 1.0.0
- Tools: 43
- Authentication: OAuth, managed by MewCP
- Calls served: 1401
- Transport: http

---

## Access

The gateway URL below serves your **entire MewCP toolset**, not this server on its
own. Pasting a config snippet is not enough — Gmail has to be in the toolset
first. In order:

1. Add Gmail to your toolset at https://mewcp.com/mcp/google-gmail
2. Connect your Gmail account (OAuth); MewCP stores the credential and attaches it to each call
3. Add the gateway URL to your client (see Connect below). It signs in with OAuth
   the first time it connects, so there is no key to copy.

Once connected, an agent does **not** see this server's tools as top-level tools.
It sees four meta-tools and reaches everything through them:

- `search(query)` — find tools by keyword across the toolset
- `get_schema(tools)` — full description and arguments for the tools you picked
- `list_accounts(provider)` — only when one app has several connected accounts
- `call_tool(server_maskedId, tool_name, args)` — execute

So the list below is what `search` can return for this server, not a set of
callable tool names on their own.

---

## Tools (43)

Descriptions are truncated to 160 characters; call `get_schema`
for the full text and the argument schema. Where a tool is annotated, its type
is shown — treat `destructive` as irreversible.

- `get_profile` _(read)_ — Gets the current user's Gmail profile, returning mailbox email address, message/thread totals, and current history ID.
- `create_draft` _(write)_ — Creates a draft with the DRAFT label. Give it content either with the plain to/subject/body fields (builds the RFC 2822/base64url encoding internally — use…
- `delete_draft` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Immediately and permanently deletes the specified draft (does not simply trash it). This…
- `get_draft` _(read)_ — Gets the specified draft.
- `list_drafts` _(read)_ — Lists the drafts in the user's mailbox.
- `send_draft` _(write)_ — Sends the specified, existing draft to the recipients in the To, Cc, and Bcc headers.
- `update_draft` _(write)_ — NOTE: this tool first fetches the draft's current state, then replaces it — the response includes both the `before` and `after` state so you have a full record…
- `create_label` _(write)_ — Creates a label.
- `delete_label` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Immediately and permanently deletes the specified label and removes it from any messages and…
- `get_label` _(read)_ — Gets the specified label.
- `list_labels` _(read)_ — Lists all labels in the user's mailbox.
- `update_label` _(write)_ — NOTE: this overwrites the current field values — the original state is not stored after the call. The response includes both the before and after state so you…
- `batch_delete_messages` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Permanently deletes many messages by message ID in one call; provides no guarantee that a…
- `batch_modify_messages` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Adds or removes labels on the specified messages in a single bulk call. This action affects…
- `delete_message` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Immediately and permanently deletes the specified message; this cannot be undone (prefer…
- `get_message_attachment` _(read)_ — Gets the specified message attachment.
- `get_message` _(read)_ — Gets the specified message.
- `list_messages` _(read)_ — Lists the messages in the user's mailbox.
- `modify_message` _(write)_ — Updates the specified message's labels. Only the label additions/removals you provide are applied — everything else about the message keeps its current value.…
- `send_message` _(write)_ — Sends the specified message to the recipients in the To, Cc, and Bcc headers. Requires a hand-built, base64url-encoded RFC 2822 `raw` blob — for a plain email…
- `send_email` _(write)_ — Sends a plain email from ordinary fields (to, subject, body) — builds the RFC 2822 message and base64url encoding internally, so you don't need to…
- `reply_to_message` _(write)_ — Replies to an existing message with plain body text — looks up the original message to set the Subject, recipient, and threading headers (In-Reply-To,…
- `trash_message` _(write)_ — Moves the specified message to the trash. This changes the message's labels (typically adding TRASH and removing INBOX) — everything else about the message…
- `untrash_message` _(write)_ — Removes the specified message from the trash. This changes the message's labels (typically removing TRASH) — everything else about the message keeps its…
- `delete_thread` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Immediately and permanently deletes the specified thread and all its messages; cannot be…
- `get_thread` _(read)_ — Gets the specified thread.
- `list_threads` _(read)_ — Lists the threads in the user's mailbox.
- `modify_thread` _(write)_ — NOTE: this changes label state on the thread (all its messages) immediately — the original label state is not stored after the call, so the response includes…
- `trash_thread` _(write)_ — NOTE: this moves the thread (all its messages) to trash immediately — the original, non-trashed state is not stored after the call, so the response includes…
- `untrash_thread` _(write)_ — NOTE: this removes the thread (all its messages) from trash immediately — the prior, trashed state is not stored after the call, so the response includes both…
- `list_history` _(read)_ — Lists the history of all changes to the mailbox in chronological order (increasing historyId), for syncing local client state with the server.
- `get_auto_forwarding_settings` _(read)_ — Gets the auto-forwarding setting for the account.
- `get_vacation_settings` _(read)_ — Gets the vacation responder settings.
- `update_vacation_settings` _(write)_ — Updates the vacation responder settings. This first fetches the current settings so the response can report what changed. Only the fields you provide are…
- `create_filter` _(write)_ — Creates a mail filter (an account can have a maximum of 1,000 filters).
- `delete_filter` _(destructive)_ — DESTRUCTIVE — REQUIRES EXPLICIT USER CONFIRMATION BEFORE CALLING. Immediately and permanently deletes the specified filter. This action is irreversible — the…
- `get_filter` _(read)_ — Gets the specified filter.
- `list_filters` _(read)_ — Lists the message filters of the Gmail user.
- `get_forwarding_address` _(read)_ — Gets the specified forwarding address.
- `list_forwarding_addresses` _(read)_ — Lists the forwarding addresses for the specified account.
- `get_send_as_alias` _(read)_ — Gets the specified send-as alias.
- `list_send_as_aliases` _(read)_ — Lists the send-as aliases for the account, including the primary address and any custom "from" aliases.
- `update_send_as_alias` _(write)_ — NOTE: this tool first fetches the alias's current state, then applies your changes — the response includes both the `before` and `after` state so you have a…

---

## Connect

- URL: https://gateway.mewcp.com/personal/mcp
- Transport: Streamable HTTP (remote). Nothing to install.
- Sign-in: OAuth. On first connect the client opens a browser window to sign in
  to MewCP and approve access. No API key.
- Headless clients (SDKs, servers without a browser) send an API key instead:
  `Authorization: Bearer <API_KEY>`, key from https://mewcp.com/dashboard/api-keys

Agents setting themselves up: follow https://mewcp.com/SKILL.md

Step-by-step guide per client:

- Claude Desktop: https://mewcp.com/mcp/google-gmail/connect/claude
- ChatGPT: https://mewcp.com/mcp/google-gmail/connect/chatgpt
- VS Code: https://mewcp.com/mcp/google-gmail/connect/vscode
- Cursor: https://mewcp.com/mcp/google-gmail/connect/cursor
- Codex: https://mewcp.com/mcp/google-gmail/connect/codex
- Claude Code: https://mewcp.com/mcp/google-gmail/connect/claude-code
- OpenCode: https://mewcp.com/mcp/google-gmail/connect/opencode
- OpenClaw: https://mewcp.com/mcp/google-gmail/connect/openclaw
- Antigravity: https://mewcp.com/mcp/google-gmail/connect/antigravity
- Hermes: https://mewcp.com/mcp/google-gmail/connect/hermes
- DeepSeek Harness: https://mewcp.com/mcp/google-gmail/connect/dsh
- Python: https://mewcp.com/mcp/google-gmail/connect/python
- TypeScript: https://mewcp.com/mcp/google-gmail/connect/typescript