GuideUpdated November 30, 2026

Gmail MCP server: official from Google, open source or hosted

Yes, Google offers an official Gmail MCP server at https://gmailmcp.googleapis.com/mcp/v1, generally available since 2026-11-24; you need a Google Cloud project and your own OAuth client, but no longer a preview membership.[3][1] It searches, reads, drafts, sorts, moves mail to trash or spam, and can send, reply and forward; by default, sending to other people and trashing require an approval that the server itself requests in your client.[1][2][15] If you just want Gmail inside Claude, the built-in connector involves less setup.[4]

Command Mail is our product and appears below as a fourth option. Google and Anthropic information was retrieved on 2026-11-30; GitHub data and the Claude Code, Cursor and OpenAI documentation date from 2026-11-03. We have not run Google's server ourselves with our own Cloud project.

Updated: Published: Fact-checked: About 14 min readAs Markdown

Contents
  1. Four things people mean by "Gmail MCP server"
  2. What Google's official server can do
  3. How Google handles approvals and security
  4. Prerequisites
  5. Steps: add Google's Gmail MCP server to Claude
  6. Setup in Claude Code, Cursor and other clients
  7. Did it work?
  8. Troubleshooting the official server
  9. Gmail MCP servers on GitHub: open source, Python and Docker
  10. When Claude's built-in connector is enough
  11. Using Gmail through Command Mail
  12. Connect Command Mail to your agent
  13. Next steps
  14. Frequently asked questions
  15. Sources

01Four things people mean by "Gmail MCP server"

Searches for a Gmail MCP server mix up four different things: Google's hosted server, the built-in connectors in AI apps, open-source servers you run yourself, and hosted services that bring their own inbox. What separates them is who owns the OAuth client, who asks before anything is sent, and how much setup you take on.[1][4][5][6]

RouteRun bySendingSetupStatus
Google Gmail MCPGoogleYes (send_message, reply, forward); to others only after approval in the client by defaultCloud project and OAuth client, quick setup for your own accountGenerally available since 2026-11-24
Claude Gmail connectorAnthropicYes; outside Auto mode, approval before each send by default; Team/Enterprise owners can relax this for membersConnect from Claude's menu; Team/Enterprise owners must enable it firstAvailable to all users per Anthropic (retrieved 2026-11-30)
google_workspace_mcpOpen source (MIT), self-hostedDepends on tool tier and permissions; read-only mode availableOwn OAuth client, uvx workspace-mcp or DockerMaintained, last push 2026-10-30, 3,465 stars (2026-11-03)
GongRzhe/Gmail-MCP-ServerOpen source (MIT)Yes per README (send_email), also deletionLocal via npx, own OAuth clientArchived, last push 2025-08-06, 1,169 stars (2026-11-03)
Command MailFYN Labs (hosted)Pro and above: approved drafts, or separately enabled autonomous sending with limitsGmail forwarding, OAuth on the MCP serverGenerally available

Sources: Google,[1][2][3][15] Anthropic,[4] GitHub[5][6] and Command Mail.[8] Star counts and push dates are snapshots from 2026-11-03. They indicate attention, not active users or security review.

02What Google's official server can do

Google groups the server's abilities into three parts. It reads (searches threads, retrieves messages and drafts, lists labels and filters), it acts (sends, replies and forwards, creates and updates drafts, manages labels and filters, moves messages or threads to and from trash or spam), and it inherits the signed-in user's permissions and data governance.[1] The reference lists 30 tools for the /mcp/v1 endpoint, among them send_message, reply, forward, trash_thread, create_filter and update_message_labels.[2] No tool for permanent deletion appears in that list, and Google says permanent deletion is blocked for third-party agents.[2][15]

For clients without form elicitation there is a fallback endpoint, /mcp/v1self. It leaves out send_message, reply, forward, apply_sensitive_message_label and apply_sensitive_thread_label, and its search and list tools return only results that are accessible without approval.[2][15] Each tool call also needs a token with the scope that tool requires, even though tools/list shows every tool.[15]

Google's own test example stops at a draft: the client creates a message in your Drafts folder with create_draft, and you review and send it in Gmail.[1]

Gmail is not the only server of its kind. Google lists generally available servers for Drive, Docs, Sheets, Slides, Calendar, Chat, Tasks and the People API; Classroom and Universal Search remain in the Developer Preview Program.[9]

03How Google handles approvals and security

The server pauses sensitive actions itself. Through MCP form elicitation it sends your client an approval request, for example before an email goes out, and runs the tool only after you decide.[15] Google evaluates on every call whether to ask, based on system, user and administrator policies. By default, writing or sharing with people inside or outside the organization needs approval, and an "always allow" choice can pre-approve matching future calls from the same agent; an administrator can turn that choice off. Moving items to the trash always asks per call, with no persistent approval. Private actions such as creating a draft run without a prompt, while creating a filter asks on every call. Read actions can also require approval, depending on policy.[15]

If your client does not support form elicitation, the server blocks calls that need approval and returns MissingRequiredClientCapability. Unattended integrations that cannot show a prompt can only run actions that need no approval, for example because an administrator allowed them.[15] Google names Antigravity and Claude Desktop as prebuilt hosts with that support.[15] Administrators with the Security administrator privilege set the rules in the Admin console under Agents → Settings → User review for external agents, and a user's approval never overrides a block by the administrator or the agent platform.[15]

Google explicitly warns about indirect prompt injection: anyone feeding untrusted email to a language model must screen prompts and responses, either with Model Armor or with their own solution, documented so that users can accept the risk.[1][13] Model Armor can be set as a floor setting that applies to every call to Google's MCP servers in a project, for example with the INSPECT_AND_BLOCK enforcement type. With logging turned on, Google says Model Armor logs the entire payload, which can put sensitive content into your logs.[13] Model Armor is also limited to certain regions, and Google notes that call routing may differ outside them and break data residency.[13]

04Prerequisites

You need a Google Cloud project and an MCP host; for Claude.ai or Claude Desktop, Google names the Pro, Max, Team and Enterprise plans.[1] For the command-line steps shown on Google's page you also need the gcloud CLI, up to date and initialized.[1] Membership in the Developer Preview Program is no longer needed for Gmail, though Google says it might take up to ten days before the server is available for your account.[3][9]

On cost, Google describes a no-cost Standard Tier that needs no billing account and is capped at 5,000 requests per day, per project, per product. If you need more, you move to the Scaled Tier with a linked billing account, which removes the free MCP allowances; from 2027-04-01, MCP requests there are billed from the first request. Some tools count as several requests because they make several API calls.[3] If you are building a product, also read the Workspace AI Tools Addendum, which takes effect on 2027-02-01.[3]

05Steps: add Google's Gmail MCP server to Claude

These steps follow Google's instructions for Claude.ai and Claude Desktop.[1] For your own Google account there is a shortcut. Quick setup (Personal mode onboarding in the Cloud console) creates the project, APIs, MCP services and an OAuth client on one page. That client works only for your account and needs neither app verification nor a separate consent screen. Enter https://claude.ai/api/mcp/auth_callback as the redirect URI there, check that Use this client for an AI-powered agent is selected, and continue with step 5.[1]

  1. Enable the Gmail API and the Gmail MCP API:[1] gcloud services enable gmail.googleapis.com --project=PROJECT_ID gcloud services enable gmailmcp.googleapis.com --project=PROJECT_ID
  2. In the Cloud console, open Google Auth Platform → Branding and create the consent screen. Choose Internal as the audience, or External with yourself added as a test user.[1]
  3. Under Data Access → Add or Remove Scopes, paste https://www.googleapis.com/auth/gmail.readonly, https://www.googleapis.com/auth/gmail.compose and https://www.googleapis.com/auth/gmail.modify, plus https://www.googleapis.com/auth/gmail.settings.basic if the agent should create filters with create_filter, then save.[1]
  4. Under Google Auth Platform → Clients → Create Client, create a web application. Add https://claude.ai/api/mcp/auth_callback as the redirect URI, select Use this client for an AI-powered agent, then copy the client ID and secret.[1]
  5. In Claude, open Settings (or Admin settings for an organization) → Connectors → Add custom connector. Name it Gmail, enter https://gmailmcp.googleapis.com/mcp/v1, put the client ID and secret under Advanced settings and click Add.[1]

06Setup in Claude Code, Cursor and other clients

These OAuth connections need the server URL, Streamable HTTP and your own OAuth client. For web application clients, register the client's redirect URL; for VS Code, Google instead describes an OAuth client of type Desktop app, without manually registering a redirect URL.[1][10] If requests are rejected, Google's first check is whether the OAuth client is marked Use this client for an AI-powered agent.[1] Check your client's documentation for whether it shows Google's approval dialogs; without declared form-elicitation support, calls that need approval fail, such as trashing and, under the default policy, sending. For such clients Google names the limited /mcp/v1self endpoint; it leaves out the send tools and is no substitute for them, and calls there can still require approval.[2][15]

Claude Code: Google describes the same route as for Claude.ai: a web application with the redirect URI https://claude.ai/api/mcp/auth_callback, and a custom connector in Claude with the client ID and secret under Advanced settings.[10] Claude Code fetches claude.ai connectors itself in terminal, VS Code and JetBrains sessions; if one is missing from /mcp, run /status to check that you are signed in with your claude.ai account.[11] The Claude Code docs also describe claude mcp add with --client-id, --client-secret and --callback-port for servers without dynamic client registration, using a redirect of the form http://localhost:PORT/callback.[11] Google does not describe that route for Gmail, and we have not tested it.

Cursor: Google creates a web application with Cursor's redirect URL: https://www.cursor.com/agents/mcp/oauth/callback for the web and Cursor Agents, http://localhost:8787/callback for the desktop app.[10] Cursor says to register both if people sign in from both.[12] In mcp.json, the server entry gets an auth object, and the client ID and secret can come from environment variables:[12]

{
  "mcpServers": {
    "gmail": {
      "url": "https://gmailmcp.googleapis.com/mcp/v1",
      "auth": {
        "CLIENT_ID": "${env:GMAIL_MCP_CLIENT_ID}",
        "CLIENT_SECRET": "${env:GMAIL_MCP_CLIENT_SECRET}"
      }
    }
  }
}

Antigravity: Google uses the redirect URI https://antigravity.google/oauth-callback and the file ~/.gemini/config/mcp_config.json, with serverUrl and an oauth object holding clientId and clientSecret. You sign in under Customizations → Installed MCP Servers in the settings, or via /mcp in the agy CLI.[1]

ChatGPT and VS Code: For ChatGPT, Google names a Business subscription and the redirect URI https://chatgpt.com/connector_platform_oauth_redirect; the server is added as a plugin.[10] OpenAI says Business and Enterprise/Edu get full MCP support, only admins and owners create such plugins in a Business workspace, and Pro users can connect custom MCP servers with read and fetch permissions only.[14] For VS Code, Google describes an OAuth client of type Desktop app whose ID and secret you enter on the first tool call.[10]

07Did it work?

Start with a read-only question whose answer you already know, such as "What did Ariel say in her last email about our marketing plan?" The client should call search_threads and then get_thread.[1] Check the sender, date and wording against the original message in Gmail.

Next, ask for a draft and open Gmail's Drafts folder; Google treats creating a draft as a private action that runs without a prompt.[15] To test sending, send a short message to a second address of your own in another account. Your client should show an approval dialog before the server sends, unless a persistent approval for this agent or an administrator rule already allows it; if the server returns MissingRequiredClientCapability instead, your client did not declare form-elicitation support.[15]

08Troubleshooting the official server

Requests are rejected. Check that the OAuth client has Use this client for an AI-powered agent selected. If you cannot change that on an existing client, Google suggests a new, separate client for agent use.[1]

You have to sign in again about every hour. Your client is not getting a refresh token. For web application clients, Google asks for access_type=offline or the OIDC offline_access scope alongside at least one API scope, and access_type=online must not be set. If you already consented without offline access, add prompt=consent or remove the app's access in your Google Account connections.[1] Whether your client lets you add such parameters is up to its documentation; Cursor's MCP docs describe adding scopes such as offline_access for refresh tokens.[12]

Sending or trashing fails. MissingRequiredClientCapability means your client did not declare form-elicitation support for a call that needs approval; trashing always asks per call. UserDeniedAction means an approval was declined or canceled, and AdminPolicyBlock means your administrator blocked the action.[15]

The server does not appear or reports missing permission. Check that the Gmail API and the Gmail MCP API are enabled in the project and that the token includes the scope of the tool being called; Google says it can take up to ten days before the server reaches your account, and some tools are still rolling out and may be temporarily unavailable. An administrator can also review OAuth log events in the security investigation tool.[1][3][15]

09Gmail MCP servers on GitHub: open source, Python and Docker

Here we compare three open-source projects with different approaches. The software is free; OAuth setup, operation and updates are yours to manage.[5][6][7]

google_workspace_mcp suits people who want to self-host and need more than Gmail. The Python project (3.10 or later) is MIT-licensed, and its README lists twelve Workspace services with more than 120 tools. It runs locally with uvx workspace-mcp over stdio or remotely over Streamable HTTP with OAuth 2.1, including as a Docker container (docker build -t workspace-mcp ., then docker run -p 8000:8000 workspace-mcp).[5] Tool tiers (--tool-tier core), --read-only, per-service permissions (--permissions) and --tools gmail limit what the agent sees.[5]

GongRzhe/Gmail-MCP-Server can send, delete and create filters according to its README. The repository is archived, though, and its last push was on 2025-08-06.[6] Existing installs may keep working without receiving fixes. We would not choose it for a new setup.

gws lives in the googleworkspace GitHub organization (Apache-2.0, 32,069 stars on 2026-11-03), yet its README says it is not an officially supported Google product, and the README does not describe an MCP server. It is a command-line tool for Workspace APIs, with commands such as gws gmail +send that coding agents can call directly.[7]

10When Claude's built-in connector is enough

Claude's built-in connector is, in our assessment, the route with the least setup if you simply want Gmail in Claude. Anthropic offers it to all users; on Team and Enterprise, an owner has to enable the connectors for the organization first. It searches, reads and drafts, and it can send, reply and forward; outside Auto mode, Claude asks for approval before each of those actions by default, and Team and Enterprise owners decide whether members may turn that off. Claude can open attachments up to about 12 MB, in chat only with code execution and file creation turned on; this is not available in every organization, or when an organization makes reading email require approval or blocks it.[4] ChatGPT has a separate Gmail app, covered in connect Gmail to ChatGPT.

11Using Gmail through Command Mail

Command Mail is a hosted inbox with its own MCP server, so you do not need a Google Cloud project.[8] Gmail reaches Command Mail through forwarding. Command Mail receives copies of new messages, and forwarding gives it no access to your Gmail mailbox. Changes in Command Mail do not flow back to Gmail, and older mail needs a separate import.[8] You set up sending as your Gmail address yourself in the app under Settings → Connections; according to the app code, Command Mail refuses this setup with agent tokens. Through Google's SMTP server with an app password, recipients see the address you sign in with; if the forwarded address is an alias or +address that differs from it, Gmail shows the sign-in address until you add it under "Send mail as". Without a password, mail goes through Command Mail's relay with a Command Mail sender address, and replies go to your Gmail address once you have confirmed it with a six-digit code.

Its value is different from Google's server: addresses from several providers in one inbox, permissions you can switch off one by one when connecting, and autonomy levels per mailbox. There are two ways to send. With mail:send-approved, an agent sends exactly the draft revision a person approved. With mail:send, it sends without individual approval, but only from mailboxes on the auto level, with a daily limit and at most 20 recipients per message; that permission is off when you connect. Free reads, sorts and drafts without sending. Pro adds sending at €19 per month for the first 100 paying accounts and €29 after that.[8]

Command Mail is the wrong fit if you want the agent to change labels, archive state or read status in your actual Gmail account; Google's server or Claude's connector handle that. See permissions and autonomy for the permission model and the email MCP server comparison for more servers.

12Connect Command Mail to your agent

If you want to try Command Mail, there are three routes, and on each one you decide which permissions the agent gets when you connect.[8]

  • MCP address: https://commandmail.app/mcp for Claude Code, Cursor and other clients with remote MCP. Sign-in uses OAuth 2.1 with PKCE and dynamic client registration, so there is no OAuth client to create; in Claude Code, run claude mcp add --transport http commandmail https://commandmail.app/mcp.[8]
  • Plugin or connector: an official plugin from ChatGPT's plugin directory, or a community connector from Claude's directory; Command Mail notes that using plugins in ChatGPT depends on plan, workspace, role and region.[8]
  • Permissions, not full access: every permission can be switched off when you connect, sending without approval starts switched off, and an approved draft goes out only in exactly the revision a person approved.[8]

13Next steps

First decide whether your agent should work in the original mailbox or in a copy. For work in the original, consider the built-in connector or, with your own Cloud project, Google's server. If you need several addresses and finer permissions, read using multiple email accounts with one AI agent. For Outlook.com and Microsoft 365, the matching guide is Outlook MCP server.

Start Command Mail free and connect your agent when it fits.

Frequently asked questions

Is there an official Gmail MCP server from Google?

Yes. Google runs a remote MCP server for Gmail at https://gmailmcp.googleapis.com/mcp/v1, generally available since 2026-11-24. You need a Google Cloud project and your own OAuth client; membership in the Developer Preview Program is no longer required. Google says it can take up to ten days to reach your account.

Can the official Gmail MCP server send email?

Yes. The /mcp/v1 endpoint has the tools send_message, reply and forward. Before mail goes to other people, the server by default requests approval in your client through MCP form elicitation; you can grant it permanently for the same agent unless your admin turns that option off, and an admin can also allow sending without a prompt. The /mcp/v1self fallback endpoint for clients without that support has no send tools.

How do I connect Google's Gmail MCP server to Claude Code or Cursor?

For Claude Code, Google describes the same route as for Claude.ai: a custom connector with your client ID and secret, which Claude Code picks up when you are signed in with your claude.ai account. For Cursor, you add the server URL with an auth object (CLIENT_ID, CLIENT_SECRET) to mcp.json and register Cursor's redirect URLs on the Google client. Whether your client shows Google's approval dialogs depends on its support for form elicitation.

Is GongRzhe's Gmail MCP server still maintained?

No. The repository is archived on GitHub and its last push was on 2025-08-06, so it will not receive fixes. For a new setup, pick a maintained project or one of the official routes.

Is gws from the googleworkspace organization an official Gmail MCP server?

No. gws is a command-line tool for Google Workspace APIs that agents can call. Its README states that it is not an officially supported Google product, and it does not describe an MCP server.

Do I need a Gmail MCP server to use Gmail with Claude?

Usually not. Claude has a built-in Gmail connector that Anthropic makes available to all users, and it can also send; outside Auto mode, Claude asks for approval before each send by default, and on Team and Enterprise, owners decide whether members may skip that prompt. Google's own server is added to Claude as a custom connector, and Google lists the Pro, Max, Team and Enterprise plans for that.

Sources

  1. Google: Configure the Gmail MCP server developers.google.com, accessed
  2. Google: MCP Reference gmailmcp.googleapis.com developers.google.com, accessed
  3. Google: Google Workspace Release Notes (2026-11-24: Gmail MCP generally available, usage tiers) developers.google.com, accessed
  4. Anthropic: Use Google Workspace connectors support.claude.com, accessed
  5. GitHub: taylorwilsdon/google_workspace_mcp (README and API snapshot) github.com, accessed
  6. GitHub: GongRzhe/Gmail-MCP-Server (README and API snapshot, archived) github.com, accessed
  7. GitHub: googleworkspace/cli (gws) github.com, accessed
  8. Command Mail: llms.txt with plans, scopes and connection options commandmail.app, accessed
  9. Google: Configure the Google Workspace MCP servers developers.google.com, accessed
  10. Google Cloud: Configure MCP in an AI application (Claude, Claude Code, ChatGPT, Cursor, VS Code) docs.cloud.google.com, accessed
  11. Claude Code Docs: Connect Claude Code to tools via MCP code.claude.com, accessed
  12. Cursor Docs: Model Context Protocol (MCP), static OAuth cursor.com, accessed
  13. Google: Configure security for Google Workspace MCP servers developers.google.com, accessed
  14. OpenAI: Connecting custom MCP servers in ChatGPT help.openai.com, accessed
  15. Google: Handle user approvals with form elicitation developers.google.com, accessed
EN