DMS Gmail MCP
Enables read and compose access to three Gmail accounts simultaneously, with tools for searching, viewing threads and messages, and drafting or sending replies.
README
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-token
It 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.)
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_TOKEN - Add → 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/mcp
Security 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.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.