NG

navbuildz/gmail-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

16 stars 36 forks 质量 85 趋势 35MIT

Open-source Gmail MCP server. Multi-account, read, write, archive, label, auto-unsubscribe. Works with Claude, OpenClaw, Cursor, Windsurf, Cline, and any MCP-compatible AI agent or assistant.

概览

An open-source Model Context Protocol (MCP) server that gives AI agents and assistants full read and write access to Gmail. Connect multiple Gmail accounts, search emails, archive, label, and auto-unsubscribe. All through one server. Works with , , , , , , and any MCP-compatible client. Most AI tools ship with a Gmail integration that can only read emails from a single account. No archiving. No labeling. No unsubscribing. And if you use multiple Gmail accounts? You're out of luck. This MCP server fixes that. One server, all your accounts, full read and write access. Model Context Protocol (MCP) is an open standard that lets AI agents and assistants connect to external tools and data sources. An MCP server exposes tools that any compatible client can call. Think of it as a plugin system for AI. This Gmail MCP server turns any MCP-compatible AI client into a full-featured email agent. - Connect multiple Gmail accounts and switch between them, or query all at once.

README

以下为原文 README 节选,完整内容请查看原文。

Gmail MCP Server

Multi-Account Gmail for AI Agents & Assistants

An open-source Model Context Protocol (MCP) server that gives AI agents and assistants full read and write access to Gmail. Connect multiple Gmail accounts, search emails, archive, label, and auto-unsubscribe. All through one server.

Works with Claude, OpenClaw, Cursor, Windsurf, Cline, Continue, and any MCP-compatible client.


Why This Exists

Most AI tools ship with a Gmail integration that can only read emails from a single account. No archiving. No labeling. No unsubscribing. And if you use multiple Gmail accounts? You’re out of luck.

This MCP server fixes that. One server, all your accounts, full read and write access.

Gmail MCP Server vs Built-in Connectors

Feature Built-in Gmail (Claude) Gmail MCP Server
Read emails Yes Yes
Write / modify emails No Yes
Multiple Gmail accounts No Yes
Archive emails No Yes
Apply labels No Yes
Auto-unsubscribe No Yes
Works with OpenClaw No Yes
Works with Cursor No Yes
Works with Windsurf No Yes
Works with Cline No Yes
Open source No Yes

What is an MCP Server?

Model Context Protocol (MCP) is an open standard that lets AI agents and assistants connect to external tools and data sources. An MCP server exposes tools that any compatible client can call. Think of it as a plugin system for AI.

This Gmail MCP server turns any MCP-compatible AI client into a full-featured email agent.


Gmail MCP Server Features

  • Multi-account support. Connect multiple Gmail accounts and switch between them, or query all at once.
  • Full read and write access. Not just reading emails. Archive, label, modify, and unsubscribe.
  • Gmail search syntax. Use Gmail’s query language: is:unread, from:, newer_than:7d, has:attachment, and more.
  • Auto-unsubscribe. Finds and triggers unsubscribe links automatically. Supports List-Unsubscribe headers, mailto links, and body link scanning.
  • Batch operations. Fetch batches of emails for AI-powered triage and bulk actions.
  • Secure by design. OAuth 2.0 authentication, AES-256-GCM encrypted token storage, minimal Gmail scopes.
  • Deploy anywhere. Vercel (free), Railway, Docker, or your own server.

Available Tools

Tool Description
list_accounts List all connected Gmail accounts
list_emails Search and list emails using Gmail query syntax. Supports account="all"
get_email Get full email content, headers, and parsed unsubscribe links
在 GitHub 查看完整 README

安装

docker run -p 3000:3000 \
新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "gmail": { "url": "https://your-server-url/mcp/<MCP_SECRET>" } } }