Skip to main content
MCP server CX Codex

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

Connects your Gmail account via standard IMAP and SMTP without OAuth2 setup. Read inbox items, run searches, and send emails directly through your agent.

no license updated 2026-10-29

Open on GitHub

What Gmail does

The server exposes three tools to your coding assistant: listMessages to inspect recent inbox messages, findMessage to locate specific emails using standard Gmail query syntax, and sendMessage to compose and deliver emails with optional cc and bcc headers.

Instead of registering apps in Google Cloud Console, this implementation relies on direct socket connections to IMAP on port 993 and SMTP on port 587. You can run it via Node.js after running npm run build or inside a container using Docker. Updating the host values in .env also allows redirecting the server to Outlook or third-party providers.

Direct login using your primary Google account password fails immediately: you must activate two-factor authentication and generate a dedicated 16-character app password under account security settings.

What it helps with

  • inspect recent inbox messages without leaving the terminal or editor
  • locate conversations using query syntax like has:attachment or is:unread
  • dispatch outgoing emails with subject lines and recipients via SMTP

Example prompts for the agent

  • List the last 15 emails from my inbox
  • Find unread messages with subject invoice
  • Send an email to [email protected] with subject Deployment update and body Build succeeded

How to install Gmail

Install

The MCP registry has no launch command for it: see the repository README

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 to install Gmail in Claude Code?

Build the container using npm run docker:build and run docker run --rm -i --env-file .env email-mcp-server, adding that command under the mcpServers entry in your configuration file.

What tools does this MCP server provide?

It exposes listMessages to retrieve recent mail, findMessage to query messages by criteria, and sendMessage to transmit outgoing emails.

Is a Google Cloud OAuth setup required?

No Google Cloud project or OAuth consent flow is required. The server connects over standard IMAP and SMTP using a 16-character Google app password.

Similar MCP servers

All MCP servers for Notes, tasks and projects →

Gmail by other authors comes first.

Gmail gmail This MCP server lets an agent search, read, send, and organize Gmail messages. Use it when email actions need to run from an IDE. CX Codex +1 57,738installs gmail pulsemcp Hooks Gmail into an AI assistant: read threads, search, label, draft and send. Works for personal accounts and Google Workspace. CX Codex +1 ★ 81repo stars Gmail domdomegg Connects an AI agent to Gmail for searching, reading, sending, and managing mail. Useful for email-driven workflows and automation. CX Codex +1 ★ 12repo stars Fluxmail fluxmailai Fluxmail is an MCP server for Claude Code that connects mailboxes to AI agents via MCP. It reads incoming mail, prepares drafts, and sends replies. CX Codex +1 ★ 9repo stars gws-gmail-send official googleworkspace Exposes gws gmail +send to the agent. Sends Gmail messages with attachments, CC/BCC, HTML body and sender aliases. CX Codex +1 76,800installs recipe-create-gmail-filter official googleworkspace recipe-create-gmail-filter — a skill that builds Gmail filters to apply labels, stars, and folder rules automatically. Runs via gws commands and requires the gws-gmail skill loaded first. CX Codex +1 32,400installs gws-gmail-triage davila7 gws-gmail-triage displays a summary of unread Gmail inbox messages with sender, subject, and date using the Google Workspace CLI. CX Codex +1 78installs email-mcp marlinjai email-mcp connects Gmail, Outlook, iCloud, and IMAP inboxes to AI agents. It handles message searching, drafting, replies, and bulk inbox cleanup via prompt. CX Codex +1 ★ 26repo stars c-email daxaur c-email manages email through gog for Gmail and himalaya for IMAP accounts. Helps your agent search messages, read threads, and send replies. CX Codex +1 ★ 179repo stars

Project sponsors

Companies that keep this analytics open