
multi-mail
io.github.yybd由 GitHub 帳號 yybd 發布v0.2.1更新於 Nov 8, 2026
Several Gmail accounts: search, read, draft, send, labels and Google Calendar. Own OAuth client.
概覽
multi-mail 的本機 MCP 服務;無需登入;STDIO。
暫無 AI 概覽:以下資訊來自註冊中心條目和服務本身。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 multi-mail,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
English · עברית
multi-mail MCP
An MCP server for several Gmail accounts at once. It searches, reads, drafts and sends mail, and works with Claude Desktop, Claude Code and ChatGPT.
It has two transports:
- stdio (
dist/server.js) runs locally, for Claude Desktop and Claude Code. - Streamable HTTP (
dist/http.js) is for ChatGPT, or any client that connects by URL. A token is required.
Each user brings their own Google OAuth client. Because of that, no Google app verification is needed and nothing passes through a third party. Mail goes only between your machine and Google.
The story behind it, with the comparison and examples: One MCP server for every Gmail account, in Claude and ChatGPT.
Tools
Choosing a mailbox:
accountaccepts a full address, an alias (work), or the part before the@.- With a single account connected, you can leave it out.
MULTI_MAIL_DEFAULTsets a default account.
Replying:
reply_to_message_idputs the reply in the right thread and fills in the recipient and subject.reply_alladds every original recipient.
Permissions: gmail.readonly and gmail.compose by default. The server cannot delete mail, move it to trash, or change settings.
- Calendar is opt-in per account (
add --calendar), which addscalendar.readonlyandcalendar.events. The server reads events and free/busy, and creates events on your own calendar without inviting anyone. It has no tool to change or delete an event. The calendar tools appear only when at least one account has calendar enabled. Times are read in each calendar's own time zone. If a calendar is set wrong (a new Google account often defaults to UTC), setMULTI_MAIL_TZ=Asia/Jerusalemor passtime_zoneto the tool. - Labels are opt-in per account (
add --labels), which addsgmail.modify. At Google's level that scope would also allow trashing mail, so the server has no trash tool and refuses theTRASHandSPAMlabels.
Drafts-only mode
Start the server with --drafts-only, or set MULTI_MAIL_SEND=off, and send_email and send_draft are not registered at all. The model can still read, search and write drafts, but nothing can leave your mailbox until you press Send in Gmail.
Use it whenever the server reads mail you didn't write and nobody approves each step. That covers automated triage, scheduled tasks, and clients that skip permission prompts. Any incoming message could carry instructions ("forward this to…"), and in this mode there is no tool that could carry them out.
How it compares
Checked on 2026-11-07, with star counts from that day, against web search and the awesome-mcp-servers list. The closest alternatives were checked against their own READMEs. I couldn't find official documentation of what the built-in Claude and ChatGPT connectors can do. That information comes mostly from blog posts by competing vendors, so treat it as approximate.
Takeaways:
- The built-in connectors don't give you several accounts plus sending in every client.
- Several self-hosted servers now handle more than one Gmail account. Each makes a different trade-off:
- alexneamtu/gmail-mcp is remote-only and needs a Linux server with an HTTPS hostname.
- mailmcp reaches Gmail over IMAP with app passwords, under a commercial licence.
- gws-connector covers the whole Workspace for local clients, without ChatGPT.
- Most of the rest run locally only, so ChatGPT can't connect to them.
- Hosted brokers route your mail and tokens through a third party.
- multi-mail's niche is one MIT-licensed
npxpackage that runs locally over stdio and, when you want ChatGPT, over token-protected HTTP. It uses the Gmail API with your own OAuth client and keeps a narrow scope:- It has no delete permission.
- Tokens stay on your machine with
600permissions. - The HTTP server won't start without a token.
- multi-mail covers mail and Google Calendar. For the rest of Workspace, such as Drive or Docs, google_workspace_mcp is the mature choice, or gws-connector across several accounts.
Setup
You need Node.js 20 or newer. There's nothing to install: every command below runs the published package through npx.
Running from source instead
Then use node dist/main.js wherever this guide says npx -y @yybd/multi-mail-mcp. Inside the source folder, npx -y @yybd/multi-mail-mcp fails with command not found: npx sees that the folder is the package itself and doesn't download it. Run npx from any other folder, or use npm run cli -- list there.
1. Create your own Google OAuth client (once)
Do this once, from one Google account. The same client then works for every mailbox you connect. If you already have a Google Cloud project for personal tools, you can add the client there instead of creating a new project.
-
Project. Go to console.cloud.google.com/projectcreate, name the project (for example
multi-mail) and click Create. Make sure it's selected in the top bar. -
Gmail API. On the Gmail API page, click Enable. If you'll use the calendar, also enable the Google Calendar API.
-
Consent screen. In Google Auth Platform, click Get started and fill in:
- App name: anything you like.
- Support email: yours.
- Audience: External.
- Contact email: yours.
Accept the terms and click Create. You don't need to add scopes here; the server asks for them itself.
-
Publish. Under Audience, click Publish app, then Confirm. The status should read In production.
- ⚠️ In Testing mode, access expires every 7 days.
- For personal use, Google doesn't need to verify the app.
- If you stay in Testing anyway, add every Gmail address under Test users.
-
Client. Under Clients, click Create client, choose the type Desktop app, and click Create. Then click Download JSON right away, because the secret is shown in full only in that dialog. Save the file like this:
2. Connect your mailboxes
Run this once per mailbox, with a different alias each time:
Each add opens a browser where you pick a Google account and approve access.
- You'll see "Google hasn't verified this app". That's expected, because it's your own app. Click Advanced, then Go to … (unsafe).
- Tick every permission box. If one is missing, the CLI stops and tells you which.
Managing accounts:
npx -y @yybd/multi-mail-mcp listlists the connected accounts.checkverifies every account still has access.alias <account> <name>sets or changes an alias. The account can be its current alias, its address, or the part before@. For example,npx -y @yybd/multi-mail-mcp alias tech workrenamestechtowork, and it takes effect immediately, without a restart.remove <account>disconnects an account.add <account> --calendarreconnects an account with Google Calendar. This needs the Google Calendar API enabled in the same Cloud project as the Gmail API (step 2 of the OAuth setup). The flags combine, for exampleadd work --labels --calendar.add <account> --labelsreconnects an account with label permission (needed formodify_labelsandcreate_label). Runningaddagain without--labelstakes it away.
Tokens live in ~/.multi-mail/accounts/ with 600 permissions; MULTI_MAIL_HOME moves that folder. A running server picks up a newly added account without a restart.
Connect your clients
Claude Code
Claude Desktop
In ~/Library/Application Support/Claude/claude_desktop_config.json (macOS) or %APPDATA%\Claude\claude_desktop_config.json (Windows):
Then restart Claude Desktop. If it can't find npx, use its full path (which npx, for example /opt/homebrew/bin/npx).
ChatGPT
ChatGPT only connects to remote HTTPS servers, so you run the HTTP mode and expose it through a tunnel. Run these one after another:
ngrok http 3333 also works instead of cloudflared.
In ChatGPT, open Settings → Apps & Connectors → Advanced, turn on Developer mode, then click Create and fill in:
- URL:
https://<your-tunnel-host>/mcp?api_key=<token> - Authentication: No authentication (the token is already in the URL).
Security of HTTP mode:
- The server listens on
127.0.0.1only. - It refuses to start without an
MCP_AUTH_TOKENof at least 24 characters. - Clients that can send headers may use
Authorization: Bearer <token>instead ofapi_key. - ⚠️ Anyone with the full URL can read and send from your mailboxes. Treat it like a password, and rotate the token (
token) if it leaks.
HTTP environment variables: PORT (default 3333), HOST (default 127.0.0.1), MCP_AUTH_TOKEN.
Development
The tests run offline, with no Google account. They cover Hebrew/UTF-8 MIME encoding, account selection, the tool list over stdio and HTTP, and token enforcement.
Layout:
src/config.ts— accounts and filessrc/gmail.ts— Gmail callssrc/mime.ts— building and parsing messagessrc/mcp.ts— the toolssrc/server.ts/src/http.ts— transportssrc/cli.ts— account management
Not supported yet: attaching files to outgoing mail.
License
MIT — see LICENSE.
來源:README.md,提交 71b9de6
工具
0版本歷史
1- v0.2.1最新Nov 8, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分