DMS Gmail MCP
Click on "Install 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., "@DMS Gmail MCPsearch all accounts for emails from yesterday"
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.
DMS Gmail MCP — one connector, all three mailboxes
A custom remote MCP server that gives Claude read access to all three DMS Gmail
accounts at once — dmstunedgr@gmail.com, yiannis@dmstuned.eu, gdimas.mib@gmail.com —
instead of the built-in connector's one-account-at-a-time limit.
Tools exposed to Claude:
gmail_list_accounts— see the configured mailboxesgmail_search_threads— Gmail query syntax, per account orallgmail_search_all_accounts— one call, searches all three and mergesgmail_get_thread/gmail_get_message— full bodiesgmail_list_labels— labels per accountgmail_create_draft— draft an email (nothing sent)gmail_reply— reply in-thread; draft by default,send:trueto delivergmail_send_message— send immediately
Scopes: gmail.readonly + gmail.compose + gmail.send. Read + drafting + sending; no deleting.
Reply/send tools are UTF-8 safe (Greek / emoji). gmail_reply defaults to a draft so nothing
leaves your outbox unless you (or you tell Claude to) set send:true.
Upgrading from the read-only v1? The added scopes mean you must re-run
npm run get-tokenfor each account to grant compose/send, then replace the refresh tokens.
Setup — 4 steps (~20 min, once)
1) Create ONE Google OAuth app (covers all 3 mailboxes)
Go to console.cloud.google.com → create/select a project.
APIs & Services → Enable APIs → enable Gmail API.
APIs & Services → OAuth consent screen → External → add your email as a Test user (add all 3 addresses as test users so each can authorize).
APIs & Services → Credentials → Create credentials → OAuth client ID → Desktop app (simplest — allows the
localhostredirect the token script uses).Copy the Client ID and Client secret → these become
OAUTH_CLIENT_ID/OAUTH_CLIENT_SECRET.
2) Mint a refresh token per mailbox
On your machine (Node 18+):
npm install
OAUTH_CLIENT_ID=xxx OAUTH_CLIENT_SECRET=yyy npm run get-tokenIt prints a URL. Open it in a browser logged into the mailbox you're adding, approve
read-only Gmail, and it prints a refresh_token. Repeat for all three accounts (log into a
different account each time — an incognito window per account is easiest).
3) Fill env vars
Copy .env.example → .env and paste in the client id/secret, the three refresh tokens
(inside GMAIL_ACCOUNTS), and a long random MCP_AUTH_TOKEN you invent.
4) Deploy (pick one — you need a public HTTPS URL)
Render — one click (uses the included render.yaml):
Push this folder to a GitHub repo (your
yiannisdmsaccount).render.com → New → Blueprint → point at the repo. Render reads
render.yaml, builds theDockerfile, and prompts you to fill the 4 secret env vars.Deploy → you get
https://dms-gmail-mcp.onrender.com./healthis the health check.
(Manual alternative: New → Web Service → Docker runtime → add the env vars by hand.)
Railway / Fly.io: same idea — Docker deploy, set the env vars, grab the public URL.
Your own Raspberry Pi (you already have Tailscale): docker build -t dms-gmail-mcp . && docker run -p 8787:8787 --env-file .env dms-gmail-mcp, then expose it with a Cloudflare Tunnel or Tailscale Funnel to get a public HTTPS URL.
Vercel note: Vercel is serverless, so this Express/long-lived pattern isn't the natural fit — Render/Railway/Fly/your Pi are simpler for an MCP server. (Ping me if you specifically want a Vercel build; it needs the serverless adapter.)
Related MCP server: Gmail MCP Server
Add it to Claude
Verify it's alive: open
https://YOUR-URL/health→ should show{"ok":true,"accounts":[...]}.In Claude: Customize → Connectors → "+" → Add custom connector.
URL:
https://YOUR-URL/mcp?token=YOUR_MCP_AUTH_TOKENAdd → enable it. Ask Claude: "list my gmail accounts" then "search all accounts for subject:NEW LEAD newer_than:30d".
Local test
npm install && npm run build && node --env-file .env dist/index.js
# then, in another terminal:
npx @modelcontextprotocol/inspector # point it at http://localhost:8787/mcpSecurity notes
Keep
MCP_AUTH_TOKENsecret — anyone with the URL+token can read the mailboxes.Scope is read-only; rotate a refresh token by re-running
get-tokenand replacing it.Nothing is stored server-side; each request authenticates fresh with Google.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceEnables interaction with Gmail through the Gmail API to read, send, and manage emails. Supports multiple Gmail accounts with real-time monitoring and advanced features for email search and attachment handling.17Apache 2.0
- Alicense-qualityDmaintenanceProvides read-only access to Gmail, enabling email search, unread listing, message and thread retrieval, and draft reply preparation without sending.268MIT
- Alicense-qualityBmaintenanceEnables AI assistants to manage multiple Gmail accounts simultaneously with built-in OAuth authentication, supporting email reading, sending, drafts, labels, and account management.232MIT
- AlicenseAqualityCmaintenanceConnect multiple Gmail accounts to any MCP client, enabling search, read, draft, send, label, and organize mail across unlimited accounts with local-only OAuth token storage.22203MIT
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Appeared in Searches
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yiannisdms/dms-gmail-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server