gmail-read-mcp
gmail-read-mcp
只读的 Gmail MCP 服务器,限定于单个邮箱。通过 stdio 暴露两个工具:
list_emails - 列出在日期范围内收到的电子邮件:元数据 + 摘要,按从旧到新排序(最多 500 封)
read_email - 按 ID 读取一封电子邮件的完整标头和正文文本
没有写入、发送、标记或删除功能。每个结果都包含一个 jump_url 深层链接(rfc822msgid: 搜索),任何登录该邮箱的人都可以打开该电子邮件。默认排除从邮箱本身发送的邮件(团队的回复);垃圾邮件和已删除邮件始终被排除。
Google OAuth 设置
创建一个 Google Cloud 项目(与任何生产项目分开——同意屏幕是按项目划分的)并启用 Gmail API。
将 OAuth 同意屏幕设置为 内部(跳过对
gmail.readonly范围的受限范围验证)。创建类型为 桌面应用 的 OAuth 客户端并下载客户端 JSON。
以目标邮箱身份运行一次性同意流程:
node scripts/gmail-oauth-once.mjs <path-to-client-secret.json>它会打印刷新令牌以及它绑定到的邮箱。
刷新令牌没有过期时间,但当账户密码更改时,Google 会撤销 Gmail 范围的令牌。如果服务器开始出现 invalid_grant 错误,请重新运行步骤 4 并替换 GMAIL_REFRESH_TOKEN。
Related MCP server: Gmail MCP Server
本地设置
cp .env.example .env
# Fill in GMAIL_CLIENT_ID, GMAIL_CLIENT_SECRET, GMAIL_REFRESH_TOKEN
npm install
npm start测试
npm testMaintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Tools
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables reading, sending, archiving, and managing Gmail emails and labels through Google OAuth authentication, acting as an OAuth proxy to the Gmail API.23111MIT
- AlicenseAqualityDmaintenanceProvides access to Gmail functionalities including listing unread emails, searching via query syntax, and managing messages through archiving or marking as read. It enables MCP clients to securely interact with and organize email data using the Gmail API.5MIT
- AlicenseAqualityDmaintenanceEnables reading Gmail emails through the Model Context Protocol, supporting listing, searching, and retrieving email details with OAuth 2.0 authentication.419MIT
- AlicenseNot gradedqualityDmaintenanceProvides read-only access to Gmail, enabling email search, unread listing, message and thread retrieval, and draft reply preparation without sending.231MIT
Related MCP Connectors
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Manage Gmail messages, threads, labels, drafts, and settings from your workflows. Send and organiz…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/gaberogan/gmail-read-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server