
iceener/gmail-streamable-mcp-server
Developer toolsこのページは AI により自動翻訳されています。技術的な詳細は原文をご確認ください。 原文を見る
MCP Server for interacting with Gmail API. Written in TypeScript, Node and Hono.dev
概要
This server is a remote Model Context Protocol (MCP) server for Gmail. A model can use it to read, search, label and draft email, and to send drafts. The server runs on and on . It uses the MCP server template 2.1 and the official MCP TypeScript SDK 2.3.0. The server URL is the deployed Worker's MCP_PUBLIC_URL, for example https://gmail-mcp. .workers.dev/mcp. The server uses protocol version 2026-07-28. It also accepts clients that use the 2025 protocol versions. You connect this server to your MCP client at your own risk. A model can make mistakes. Examine what the tools do, and examine changes in Gmail. The server can send email that is in a draft. The server writes to Gmail only through drafts and labels. It sends email only with send_draft. Use the server URL and the Streamable HTTP transport. The client signs you in with Google the first time. The server is its own OAuth authorization server, in front of Google's OAuth. MCP clients do not receive Google tokens. 1.
README
以下は原文 README の抜粋です。原文を見る。
Gmail MCP Server
This server is a remote Model Context Protocol (MCP) server for Gmail. A model can use it to read, search, label and draft email, and to send drafts. The server runs on Cloudflare Workers and on Bun. It uses the MCP server template 2.1 and the official MCP TypeScript SDK 2.3.0.
The server URL is the deployed Worker’s MCP_PUBLIC_URL, for example https://gmail-mcp..workers.dev/mcp.
The server uses protocol version 2026-07-28. It also accepts clients that use the 2025 protocol versions.
[!WARNING] You connect this server to your MCP client at your own risk. A model can make mistakes. Examine what the tools do, and examine changes in Gmail. The server can send email that is in a draft.
Tools
| Tool | Function |
|---|---|
get_profile |
Shows the email address of the connected Gmail account. |
inbox_overview |
Shows counts (unread, inbox, sent, starred, important) and the newest unread and starred threads for a period. The default period is 7 days. |
list_labels |
Lists the labels with their IDs, types and counts. |
modify_thread |
Adds and removes labels on up to 100 threads. Actions: archive, unarchive, markRead, markUnread, star, unstar, trash, untrash, spam, unspam. |
search_threads |
Finds threads with a Gmail query or label IDs. The newest message sets the order. The result has the subject, the sender, the dates, the labels and a web link. |
get_thread |
Shows a thread and its messages. The format argument controls the bodies. |
get_message |
Shows one message. |
create_draft |
Makes a draft. For a reply, give the threadId. |
update_draft |
Replaces the message in a draft. |
send_draft |
Sends a draft. It can replace the message first. |
The server writes to Gmail only through drafts and labels. It sends email only with send_draft.
Connect a client
Use the server URL and the Streamable HTTP transport. The client signs you in with Google the first time.
| Client | Procedure |
|---|---|
| Claude | In Settings → Connectors, add a custom connector with the server URL. |
| Claude Code | Run claude mcp add --transport http gmail . |
| MCP Inspector | Run bun run inspector. Select Streamable HTTP. Enter the server URL. |
Alice and Wonderlands use the same URL.
Authentication
The server is its own OAuth authorization server, in front of Google’s OAuth. MCP clients do not receive Google tokens.
- The client registers at
/registerand signs the user in at/authorize. The client must use PKCE S256. - The server sends the user to Google. Google asks for the three Gmail scopes.
- Google returns the user to the server’s
/oauth/callback. The server keeps the Google tokens, encrypted.
インストール
This server does not publish a one-line install command.
Open the repository installation guide MCP 初心者?mcpskill.org のガイドから始めましょう →