Repository navigation
v0.1.0
First tagged release.
gmail-mcp connects Gmail to Claude and any other MCP client, running as a remote server on a Cloudflare Worker you deploy yourself. Each connection signs in to one Google account, and the Google refresh token stays in your own Cloudflare account. One deployment serves several mailboxes through /mcp/<label>.
24 tools. Search and read mail, send, reply-all with quoted history, forward, attachments and inline cid: images, drafts, labels, threads, trash.
Encoding. Subjects and display names go out as RFC 2047, filenames as RFC 2231, and each incoming part is decoded by its own charset, so ISO-2022-JP and Shift_JIS mail arrives readable.
Auth. OAuth 2.1 with PKCE on the MCP side, authorization code with offline access on the Google side. gmail.modify is the only mail scope requested: it excludes permanent deletion and all of gmail.settings.*. Sign-in is gated by ALLOWED_EMAILS, checked against the address Google reports as verified.
Tested. 233 unit tests, plus every tool run against real Gmail accounts with a second account checking what arrived.
Deploy takes about ten minutes and needs a Cloudflare account with a domain, bun, and a Google OAuth client: https://github.com/mkpoli/gmail-mcp#deploy-it
日本語 https://github.com/mkpoli/gmail-mcp/blob/main/README.ja.md · 简体中文 https://github.com/mkpoli/gmail-mcp/blob/main/README.zh.md