
Gmail
io.github.domdomegg由 GitHub 帳號 domdomegg 發布v2.4.0更新於 Oct 24, 2026
Allow AI systems to read, send, archive, and manage emails via Gmail.
概覽
本機 MCP 伺服器,讓助理讀取、搜尋、寄送、封存與管理 Gmail 郵件、會話串、草稿、標籤、篩選器與假期自動回覆設定。
- 可以做什麼
- 讀取帳號資料,搜尋或列出郵件與會話串,並取得完整會話串或單封郵件。
- 寄送、轉寄、加標籤、封存、移至垃圾桶、還原或永久刪除郵件與會話串,包含批次操作。
- 建立、更新、寄送與刪除草稿。
- 管理標籤與篩選器,並下載附件。
- 讀取與設定假期自動回覆。
- 適用情境
- 適合讓助理直接在 Gmail 收件匣中作業:尋找確認信、收據或附件,起草並寄出回覆,用標籤與封存整理郵件,或在休假時開啟自動回覆。
- 執行需求
- 透過 npx 在本機執行(需要 Node.js)。需要啟用 Gmail API 的 Google Cloud OAuth 憑證:GOOGLE_CLIENT_ID、GOOGLE_CLIENT_SECRET 與 GOOGLE_ACCESS_TOKEN,以及 MCP_TRANSPORT。README 說明以 HTTP 伺服器方式執行於 localhost:3000,並需註冊 Google OAuth 重新導向 URI。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Gmail,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
gmail-mcp
MCP server for Gmail - read, send, archive, and manage emails.
Use Cases
Flight check-in: "Check me in for my flight tomorrow" → finds your confirmation email, extracts the booking reference, and completes check-in with browser use.
Expense submission: "Submit my Amazon purchases from last week as expenses" → finds receipts, extracts amounts/categories, and files them in your expense system.
Package tracking: "Where's my package from Acme?" → finds the shipping notification, extracts the tracking number, and fetches current delivery status.
Find that attachment: "What did we settle on for the budget? Michelle sent me something yesterday" → locates the email and opens the attached spreadsheet.
Vacation mode: "I'm on holiday Dec 20-Jan 2" → sets up Gmail auto-reply, blocks your calendar, and updates your Slack status in one go.
Meeting follow-up: After a call, your assistant reads the Gemini transcript, summarizes key decisions, and drafts a follow-up email with action items.
(These are just examples - any workflow that needs email search, reading, or sending can use this.)
Setup
1. Create Google OAuth credentials
- Go to Google Cloud Console
- Create a new project (or use existing)
- Enable the Gmail API
- Go to APIs & Services → OAuth consent screen, set up consent screen
- Go to APIs & Services → Credentials → Create Credentials → OAuth client ID
- Choose Web application
- Add
http://localhost:3000/callbackto Authorized redirect URIs - Note your Client ID and Client Secret
2. Run the server
The server runs on http://localhost:3000 by default. Change with PORT=3001.
3. Add to your MCP client
With the server running, follow the instructions on install-mcp, which generates the right config for your MCP client (Claude Code, Claude Desktop, Cursor, Cline, VS Code, and more).
Architecture
This server acts as an OAuth proxy to Google:
- Server advertises itself as an OAuth authorization server via
/.well-known/oauth-authorization-server /registerreturns the Google OAuth client credentials/authorizeredirects to Google, encoding the client's callback URL in state/callbackreceives the code from Google and forwards to the client's callback/tokenproxies token requests to Google, injecting client credentials/mcphandles MCP requests, using the bearer token to call Gmail API
The server holds no tokens or state - it just proxies OAuth to Google.
Tools
Gmail API Scopes
gmail.readonly- Read messages and labelsgmail.send- Send messagesgmail.modify- Modify messages (archive, labels, trash)
Contributing
Pull requests are welcomed on GitHub! To get started:
- Install Git and Node.js
- Clone the repository
- Install dependencies with
npm install - Run
npm run testto run tests - Build with
npm run build
Releases
Versions follow the semantic versioning spec.
To release:
- Use
npm version <major | minor | patch>to bump the version - Run
git push --follow-tagsto push with tags - Wait for GitHub Actions to publish to the NPM registry.
來源:README.md,提交 32103e7
工具
0版本歷史
1- v2.4.0最新Sep 16, 2026
評分
已滿足適用檢查項的 40%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
請在儲存庫或註冊中心條目中宣告授權條款。