gmail-mcp
Allows interaction with a Gmail inbox by reading visible threads and performing actions like archiving and labeling, using the open Gmail tab as the interface.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@gmail-mcplist my visible emails"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
gmail-mcp
Exposes the Gmail tab open in your browser as MCP tools — no Gmail API, no OAuth. A browser extension reads the inbox with InboxSDK and acts on it by simulating the Gmail UI; a local bridge relays commands from any MCP client (e.g. Claude Code) to that tab.
MCP client (Claude)
│ stdio
server/mcp.js one per client session, forwards over HTTP
│ POST /<command> (Hono, port 8766)
server/bridge.js single daemon
│ WebSocket (port 8765)
extension MV3, background ws client + content script
│ InboxSDK / DOM
Gmail tabTools
Tool | What it does |
| Lists the thread rows currently rendered (subject, contacts, date, |
| Archives a visible thread (row checkbox + toolbar button) |
| Applies an existing label to a visible thread (row context menu) |
Related MCP server: gmail-mcp
Setup
Extension:
cd extension && npm install && npm run build, then loadextension/dist/viachrome://extensions→ Developer mode → Load unpacked. Open (or reload) Gmail.Bridge:
cd server && npm install && npm run bridge— keep it running.MCP:
claude mcp add gmail-mcp -- node <repo>/server/mcp.js, then start a new session.
Test without an MCP client:
curl -X POST localhost:8766/list_visible_emails
curl -X POST localhost:8766/archive_thread -d '{"thread_id":"..."}'Limitations
The Gmail tab must be open; only currently-rendered rows are visible to the tools.
Actions simulate the UI: stable attributes are preferred (
act="7", roles), butlabel_threadmatches menu text and assumes an English Gmail UI. A Gmail redesign can break actions — the durable alternative is the official Gmail API.The bridge listens on localhost without auth; anything local can drive your Gmail tab. Don't expose the ports.
InboxSDK telemetry is disabled (
eventTracking/globalErrorLoggingoff).
Development
npm run lint / npm run format (Biome, 80 cols) from the repo
root. New extension feature = one file in extension/src/features/ +
one line in extension/src/content.js + a tool in server/mcp.js.
This server cannot be deployed
Maintenance
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
1Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceLocal stdio MCP server that mirrors the public Gmail MCP server tool surface while calling the Gmail REST API directly, enabling email management tasks like creating drafts, searching threads, and managing labels.MIT
- FlicenseNot gradedqualityDmaintenanceFull Gmail control for any MCP-compatible AI agent. Exposes ~40 tools for reading, composing, labeling, filtering, threading, and account management.-
- FlicenseNot gradedqualityCmaintenanceEnables reading, searching, sending, and drafting Gmail emails via MCP tools, with support for multiple accounts and background notifications.-
- FlicenseNot gradedqualityCmaintenanceIntegrates with the Gmail API to send and read emails through MCP tools using Google OAuth authentication.-