Skip to main content
MCP server CX Codex

Gmail · domdomegg — Claude Code MCP server: what it does, how to install

Connects an AI agent to Gmail for searching, reading, sending, and managing mail. Useful for email-driven workflows and automation.

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio domdomegg-gmail -- npx -y gmail-mcp
Open on GitHub

What Gmail does

This MCP server exposes Gmail actions to an AI client. It can search messages and threads, read and send mail, forward messages, create and send drafts, download attachments, update labels, archive mail, and move messages between trash states. It also includes filters, vacation replies, and bulk message operations.

The server sits between the MCP client and Google as an OAuth proxy. It forwards authorization and uses the bearer token for Gmail API calls, without keeping tokens or session state. You need Gmail API access, Google OAuth credentials, Node.js, and npx; setup cannot complete without GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET.

What it helps with

  • search a mailbox or thread
  • read and forward an email
  • create or send a draft
  • archive messages and update labels
  • download an email attachment

Example prompts for the agent

  • Find the Acme delivery email and tell me the tracking number.
  • Draft a reply to the latest message in this thread.
  • Locate last week's receipts and download their attachments.

How to install Gmail

Platform CLI

claude mcp add --env GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> --env MCP_TRANSPORT=<MCP_TRANSPORT> --env GOOGLE_CLIENT_ID=<GOOGLE_CLIENT_ID> --env GOOGLE_CLIENT_SECRET=<GOOGLE_CLIENT_SECRET> --transport stdio domdomegg-gmail -- npx -y gmail-mcp

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Gmail

How do I install Gmail in Claude Code?

Run claude mcp add gmail-mcp -e GOOGLE_ACCESS_TOKEN=<GOOGLE_ACCESS_TOKEN> -- npx -y gmail-mcp. Then authorize Gmail access through Google OAuth.

What does the Gmail MCP server do?

It gives an AI client Gmail tools for searching, reading, sending, and organizing mail, including drafts, attachments, labels, and vacation replies.

What does Gmail MCP require?

Enable the Gmail API, create Google OAuth credentials, and provide GOOGLE_CLIENT_ID and GOOGLE_CLIENT_SECRET. The server runs through Node.js and npx.

Similar MCP servers

All MCP servers for Backend and APIs →

Gmail by other authors comes first.

Project sponsors

Companies that keep this analytics open
Gold sponsor

Impressions, clicks and code copies — open statistics. We keep the numbers public for the same reason NeBlask itself is public. Become a sponsor