Multi Gmail Mcp

io.github.gx-55由 GitHub 帳號 gx-55 發布v1.0.1更新於 Oct 24, 2026

Manage multiple Gmail accounts in Claude Desktop — search, send, reply, draft, and organize.

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓 Claude Desktop 管理多個 Gmail 帳戶:搜尋、讀取、寄送、回覆、撰寫草稿與整理郵件。

可以做什麼
帳戶管理:列出已驗證的 Gmail 帳戶、啟動並完成 OAuth 登入、移除帳戶及其儲存的憑證。讀取郵件:以 Gmail 搜尋語法查詢任一收件匣,並依郵件 ID 取得完整內容。撰寫郵件:寄送、在討論串中回覆、儲存草稿。整理郵件:列出、新增與移除標籤,封存郵件,標示為已讀或未讀。
適用情境
適合同時使用多個 Gmail 帳戶(個人、工作、副業專案),希望助理在同一處搜尋、彙整、回覆或整理郵件時使用。
執行需求
透過 npm 套件 multi-gmail-mcp 以 stdio 在本機執行;需要 Node.js 22.5.0 以上版本與 Claude Desktop。需要一個已啟用 Gmail API 的 Google Cloud 專案,以及桌面應用程式 OAuth 憑證,存成本機 JSON 檔,或透過 GOOGLE_CLIENT_ID 與 GOOGLE_CLIENT_SECRET 環境變數提供。每個帳戶需在瀏覽器中驗證一次。
安裝前請注意
會在使用者主目錄中保存 Google OAuth 憑證與各帳戶權杖,用戶端密鑰也可能寫入 Claude Desktop 設定。申請的權限允許讀取、寄送與修改郵件,因此助理可以寄信、回覆、封存與變更標籤。在允許其寄送或刪除前請先檢查提示內容,並可移除帳戶以撤銷已儲存的權杖。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 Multi Gmail Mcp,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

multi-gmail-mcp

A Model Context Protocol (MCP) server that lets Claude Desktop manage multiple Gmail accounts simultaneously. Listed on the official Anthropic MCP registry and published on npm.

[demo]


Features

  • Connect unlimited Gmail accounts — personal, work, side projects
  • Search any inbox using full Gmail search syntax
  • Read complete emails with MIME parsing
  • Send, reply in thread, and create drafts
  • Organize with labels: add, remove, list, archive
  • Mark as read / unread
  • Tokens stored locally in ~/.gmail-mcp-tokens.db — never committed to git
  • Auto-refreshes OAuth tokens silently

Requirements

  • Node.js >= 22.5.0
  • A Google Cloud project with the Gmail API enabled
  • Claude Desktop

Installation

bash
npm install -g multi-gmail-mcp

This registers two global commands: gmail-mcp (the MCP server) and gmail-mcp-cli (account manager).


Google Cloud Setup

You only need to do this once.

  1. Go to console.cloud.google.com → create a project
  2. Enable the Gmail API (APIs & Services → Library)
  3. Configure the OAuth consent screen — External, add your Gmail addresses as test users
  4. Add scopes: gmail.readonly, gmail.send, gmail.modify, gmail.labels
  5. Create a Desktop app OAuth credential → download the JSON
  6. Save it to ~/.gmail-mcp-oauth.json

Alternatively, set environment variables in the Claude Desktop config (see below).


Authenticating Gmail Accounts

bash
# Add accounts (opens browser for Google sign-in)gmail-mcp-cli add [email protected]gmail-mcp-cli add [email protected]
# List authenticated accountsgmail-mcp-cli list
# Remove an accountgmail-mcp-cli remove [email protected]

Tokens are saved to ~/.gmail-mcp-tokens.db and refreshed automatically.


Claude Desktop Configuration

Edit ~/Library/Application Support/Claude/claude_desktop_config.json:

json
{  "mcpServers": {    "multi-gmail": {      "command": "gmail-mcp"    }  }}

If you prefer environment variables over ~/.gmail-mcp-oauth.json:

json
{  "mcpServers": {    "multi-gmail": {      "command": "gmail-mcp",      "env": {        "GOOGLE_CLIENT_ID": "your-client-id.apps.googleusercontent.com",        "GOOGLE_CLIENT_SECRET": "your-client-secret"      }    }  }}

Restart Claude Desktop after saving. Click the hammer icon to confirm 19 tools are loaded.


Available Tools

Account Management

ToolDescription
list_accountsList all authenticated Gmail accounts
initiate_authStart OAuth flow — returns a URL to open in browser
complete_authFinalize auth after completing Google sign-in
remove_accountRemove an account and its stored credentials

Reading Email

ToolDescription
search_emailsSearch with Gmail syntax (is:unread, from:, after:, etc.)
get_emailFetch full email content by message ID

Writing Email

ToolDescription
send_emailSend an email (supports To, CC, BCC)
reply_to_emailReply in thread, preserving References headers
create_draftSave an email as a draft

Organization

ToolDescription
list_labelsList all Gmail labels for an account
add_labelAdd one or more labels to a message
remove_labelRemove one or more labels from a message
archive_emailRemove from Inbox
mark_as_readRemove the UNREAD label
mark_as_unreadAdd the UNREAD label

Example Prompts

List all my authenticated Gmail accounts.
Search my [email protected] inbox for unread emails from this week.
Reply to that email from my personal account saying I'll be there Saturday.
Send an email from [email protected] to [email protected]with subject "Dinner plans" and body "Are you free Saturday?"
Archive everything older than a week in my side-project inbox that's already read.
Check both my accounts for emails from GitHub and summarize them.

Security

  • ~/.gmail-mcp-oauth.json and ~/.gmail-mcp-tokens.db live in your home directory — outside the project, never committed
  • .gitignore excludes *.db, .gmail-mcp-oauth.json, and .env
  • The server runs over stdio only — no network port is opened
  • OAuth scopes are limited to the minimum required

See SECURITY.md for full details: token storage, network behavior, scope rationale, revocation steps, and how to report a vulnerability.


Registry

Listed on the official Anthropic MCP registry:

io.github.gx-55/multi-gmail-mcp
bash
curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.gx-55"

Project Structure

multi-gmail-mcp/├── bin/│   ├── gmail-mcp.js        # Entry point for the MCP server command│   └── gmail-mcp-cli.js    # Entry point for the CLI command├── src/│   ├── server.js           # MCP server — all 19 tools│   ├── gmail-client.js     # Gmail API wrapper│   ├── auth.js             # OAuth2 flow with auto-refresh│   ├── db.js               # SQLite token storage (node:sqlite)│   └── cli.js              # Account management CLI└── package.json

Troubleshooting

"No OAuth credentials found" Make sure ~/.gmail-mcp-oauth.json exists or set GOOGLE_CLIENT_ID / GOOGLE_CLIENT_SECRET in the Claude Desktop config.

"Account not found. Authenticate it first" Run gmail-mcp-cli add [email protected] before using that account in Claude.

Tools not appearing in Claude Desktop Confirm gmail-mcp is in your PATH (which gmail-mcp) and restart Claude Desktop.

Token expired errors Tokens auto-refresh if a valid refresh token is stored. If refresh fails, remove the account and re-authenticate: gmail-mcp-cli remove [email protected] && gmail-mcp-cli add [email protected].

來源:README.md,提交 7c28cb2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v1.0.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分