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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。