mail-mcp-oauth
Allows the server to access Gmail mailboxes via IMAP/SMTP, enabling tools to list folders, search and read messages, send messages, create drafts, mark messages as read, move messages, and delete messages using Gmail app passwords.
Provides mail integration for Netcup webhosting mailboxes via IMAP/SMTP, supporting folder listing, message search and retrieval, sending messages, creating drafts, marking messages read, moving messages, and deleting messages.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mail-mcp-oauthsearch my inbox for invoices from Acme and summarize the latest one"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mail-mcp-oauth
Self-hosted, OAuth 2.1-enabled IMAP/SMTP MCP server for Claude.ai — a fork of maxx3250/claude-mail-mcp with a built-in OAuth 2.1 + Dynamic Client Registration + PKCE layer, and adapted to run as a single stateless process on Render (no VPS, no nginx, no systemd, no persistent disk).
Multi-account: one deployment serves several mailboxes (Gmail, custom
domains, ...), each accessible via IMAP/SMTP. Every MCP tool takes an
optional account parameter to pick which mailbox to act on.
What changed vs. upstream
OAuth 2.1 built in (src/oauth.ts):
/register(DCR),/authorize(PKCE + single-user login form),/token. No separate OAuth shim process — upstream references one but it isn't published, so this fork implements it directly in the same Express app.Stateless by design: access/refresh tokens are signed JWTs (no DB); registered OAuth clients and in-flight auth codes are in-memory (a restart just makes Claude.ai silently re-register, which its MCP client already handles).
Accounts from an env var:
ACCOUNTS_JSONinstead of a file on disk, since Render's filesystem is ephemeral. File-basedACCOUNTS_FILEstill works for local/VPS use.CalDAV/calendar tools removed — not needed for this deployment, cuts the dependency surface (
tsdav,ical.js).
Related MCP server: IMAP MCP Server
Architecture
Claude.ai (web)
│ HTTPS + OAuth 2.1 (DCR, PKCE, JWT)
▼
Render (TLS terminated automatically, custom domain mcp-mail.<domain>)
▼
this process (single Node service)
├── /.well-known/oauth-authorization-server, /register, /authorize, /token (src/oauth.ts)
├── /mcp (Bearer-gated MCP Streamable HTTP transport)
│ ├── ImapClient ──▶ imapflow ──▶ IMAP server (993/143) per account
│ └── SmtpClient ──▶ nodemailer ──▶ SMTP server (465/587) per account
└── /healthLocal setup
npm install
cp .env.example .env
# fill in PUBLIC_URL, ACCOUNTS_JSON (see docs/ACCOUNTS.md), OAUTH_USER,
# OAUTH_PASS, and JWT_SECRET (openssl rand -hex 32)
npm run devDeploying to Render
See docs/DEPLOY_RENDER.md for the full step-by-step (GitHub push, Render web service, custom domain, Netcup DNS, connecting Claude.ai).
Accounts
See docs/ACCOUNTS.md for the accounts.json schema and
per-provider setup (Gmail app passwords, Netcup Webhosting IMAP/SMTP,
and why Hotmail/Outlook.com needs a separate OAuth2 flow).
Tools exposed to Claude
Tool | Purpose |
| List configured mailboxes (id, label, default, From) — never credentials |
| Enumerate IMAP mailboxes |
| Newest N messages in a folder |
| Server-side IMAP search |
| Full body + headers + attachment metadata |
| Send via SMTP (optionally copies to Sent) |
| Build RFC-822 and APPEND to Drafts |
| Toggle |
| Move between folders |
| Delete (destructive — prefer move to Trash) |
License
MIT — see LICENSE. Original work by Markus Stöger (maxx3250/claude-mail-mcp).
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables seamless email management through natural language conversations with Claude. Supports searching, reading, and sending emails securely with Gmail and other email providers.4MIT
- AlicenseAqualityAmaintenanceEnables Claude to interact with email accounts via IMAP and SMTP, providing tools for searching, reading, sending, and managing emails across multiple providers.4041776MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to read, search, send, label, and trash emails in any Gmail account via Google's Gmail API, using OAuth2 authentication with automatic token refresh.67MIT
- AlicenseNot gradedqualityDmaintenanceEnables searching, reading, moving, tagging, and linking emails in MailMate via MCP tools, allowing Claude to manage email without leaving the conversation.3GPL 3.0
Related MCP Connectors
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Manage Gmail end-to-end: search, read, send, draft, label, and organize threads. Automate workflow…
Hosted email MCP for AI agents with inboxes, send/receive, memory, recovery, and credits.
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/00thies-blip/mail-mcp-oauth'
If you have feedback or need assistance with the MCP directory API, please join our Discord server