claude-mail-mcp
Connects to Gmail mailboxes over IMAP and SMTP, allowing Claude to list folders and messages, search mail, fetch full message bodies and attachments metadata, send messages, create drafts, and toggle read/move/delete flags.
Connects to iCloud Mail and iCloud Calendar via IMAP/SMTP and CalDAV, allowing Claude to read and search mail, send messages and drafts, and list, create, and find free slots in calendar events.
Connects to Mailbox.org mailboxes over IMAP/SMTP and its CalDAV endpoint, enabling Claude to browse and search mail, send messages, manage folders, and read or create calendar events.
Connects to Migadu-hosted mailboxes over IMAP and SMTP so Claude can list and search messages, fetch full message content, send mail, create drafts, and organize folders.
Connects to a Nextcloud CalDAV endpoint, allowing Claude to discover calendars, list events within a time window (with recurrences expanded), create new events, and compute free slots across calendars.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
mcp-mail
mcp-mail is a self-hosted IMAP/SMTP email MCP server that lets Claude, ChatGPT, Cursor and any other MCP client read, search, draft and send email from your existing mailbox, with per-client permissions, an audit log and a one-line install.
curl -fsSL https://raw.githubusercontent.com/Annseraf/mcp-mail/main/install.sh | sudo bash -s -- --auto-updateLocal clients (Claude Desktop, Claude Code, Cursor, VS Code) can run it directly: npx -y @annseraf/mcp-mail stdio.
mcp-mail is a maintained continuation of claude-mail-mcp by Markus Stöger (MIT). Existing claude-mail-mcp v0.2 installs can switch with no config changes (compatibility contract).
Works with
AI clients: Claude.ai, Claude Desktop, Claude Code, ChatGPT (developer mode, deep research), Cursor, VS Code, Meta Muse, and any MCP client over Streamable HTTP or stdio. Setup guides: docs/clients.
Mail providers: any IMAP/SMTP mailbox: Fastmail, iCloud, Purelymail, Gmail and Google Workspace (app password), Yahoo, Zoho, Mailbox.org, Migadu, Mailcow, Dovecot/Postfix.
Calendars: any CalDAV server (Fastmail, iCloud, Nextcloud, Radicale), optional.
MCP protocol: 2026-07-28 (stateless) and every earlier revision since 2024-11-05, on the same endpoint.
Related MCP server: mcp-mail-server
Tools
Tool | What it does | Capability |
| List connected mailboxes, sender names and signatures (never credentials) | read |
| List folders with their special use (Inbox, Sent, Drafts, Trash) | read |
| Newest messages in a folder, with short previews | read |
| Search one folder, several, or all ( | read |
| Read one message: headers, body, attachment list, threading ids | read |
| Download one attachment (size-capped) | read |
| Read a whole conversation across Inbox and Sent, oldest first | read |
| Group a folder's newest messages into conversations | read |
| Save a draft (with attachments); | draft |
| Mark a message read or unread | organize |
| Star (flag), mark answered, or add custom keywords | organize |
| Move a message to another folder | organize |
| Move to Trash; | organize / destructive |
| Send an email (with attachments and signature); a copy goes to Sent | send |
| Change the sender display name and signature | settings |
| Read calendars and find free time | calendar-read |
| Create a calendar event | calendar-write |
| ChatGPT deep research adapters ( | read |
Comparison
mcp-mail | claude-mail-mcp v0.2 | |
Transport | Streamable HTTP (2026-07-28 + legacy) and stdio | Streamable HTTP |
Auth | Built-in OAuth 2.1 (DCR, PKCE), per-client tokens, shared token | Shared token + separate OAuth shim |
Per-client permissions | Presets, tool allow/deny, mailbox scope, recipient allowlist, send rate limit | — |
Read-only mode |
| — |
Revoke one client | Yes, others keep working | Rotate the shared secret |
Attachments | Send, draft and download | Send only |
Threads, flags, multi-folder search | Yes | — |
Audit log | JSONL, no message content | — |
Prompt-injection hygiene | Untrusted-content fencing, hidden-HTML stripping, server instructions | — |
Multi-tenant + admin API | Opt-in, with OpenAPI spec | — |
Install and updates | One-line installer, signed releases, auto-update with rollback | Manual |
Other IMAP MCP servers worth a look, depending on your needs: codefuturist/email-mcp (TypeScript, IMAP/SMTP, many tools), tecnologicachile/mail-mcp (Rust, IMAP/SMTP plus Microsoft Graph and EWS) and wildsurfer/your-mail-mcp (read-only, local notmuch index). Check their READMEs for current features.
FAQ
How do I give ChatGPT read-only access to my email?
Run mcp-mail clients add chatgpt --for chatgpt (OAuth login, read-only preset), enable OAUTH=true, and add the server in ChatGPT's developer mode. ChatGPT only ever sees the read tools. See docs/clients/chatgpt.md.
Can I use this with Fastmail, iCloud, Purelymail or Gmail?
Yes. Anything that speaks IMAP and SMTP works. For Gmail, iCloud, Yahoo and Fastmail, create an app password in the provider's security settings and use it instead of your normal password.
How do I stop an AI agent from sending email?
Give the agent a preset without send (read-only, read-draft or organize). The send tool then disappears from its tool list and is rejected if called anyway. For agents that may send, restrict recipients with sendRecipientAllowlist and cap volume with sendRateLimit. See docs/CLIENTS.md.
Can an email trick the AI into doing something?
Emails are untrusted input. mcp-mail wraps every body in untrusted-content delimiters, strips hidden HTML text and tracking pixels, and tells clients to confirm sends and deletions with you. Keep sending off for agents that don't need it. See SECURITY.md.
Does deleting a message lose it forever?
No. delete_message moves the message to Trash. Permanent deletion needs permanent: true and a client with the destructive capability.
Where are my passwords stored?
In accounts.json on your server (optionally encrypted at rest with mcp-mail secrets encrypt). In multi-tenant mode, credentials are envelope-encrypted per tenant with a local key file or OCI Vault. They are never returned by any tool, API or log.
Can my agent sign emails?
Yes. Each account can have a sender display name and a signature, set in accounts.json or by the agent itself with update_account_settings. Pass include_signature: false to send without it.
I'm on claude-mail-mcp. Do I need to change anything?
No. Swap the binary; your .env, accounts.json and connected clients keep working. CI enforces this against recorded v0.2.1 behavior.
Security model
Binds to
127.0.0.1by default; put nginx or Caddy in front for TLS.Clients authenticate with OAuth 2.1 (PKCE, rotating refresh tokens), per-client static tokens (stored hashed), or the legacy shared token.
Every tool call is checked against the client's policy twice: when listing tools and when calling them.
The audit log records who did what, never message content.
Mail content is fenced as untrusted; sends and deletions should be confirmed by a human.
Releases are built by CI from tagged commits only, with checksums and provenance attestation.
Details: SECURITY.md, docs/CLIENTS.md, docs/PLATFORM.md.
Configuration
.env: transport settings (.env.example). Everything new is optional.accounts.json: mailboxes (same format as claude-mail-mcp; optionalfromName/signature).clients.json: per-client identities and policies (docs/CLIENTS.md).Multi-tenant mode and the admin API: docs/PLATFORM.md.
Upgrading
From claude-mail-mcp v0.2.x: no config changes required. Install mcp-mail pointing at the same .env, accounts.json and (if you use one) OAuth state. New features stay off until you enable them. Two approved behavior changes are listed in docs/COMPATIBILITY.md: deleting moves to Trash, and email content is fenced as untrusted (UNTRUSTED_FENCING=false restores the old output).
Development
npm ci
npm run check # lint, format, typecheck, unit tests, license scan, build
npm run test:compat # compatibility gate + integration suites (needs GreenMail, see docs/COMPATIBILITY.md)Adding a tool: docs/ADDING_A_TOOL.md. Contributions: CONTRIBUTING.md.
License
MIT. Copyright (c) 2026 Markus Stöger and (c) 2026 Mohith K Das and mcp-mail contributors. See LICENSE and NOTICE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Read, send, file and search email in any Gmail, Microsoft 365 or IMAP mailbox, plus its calendar.
Connect Gmail, iCloud Mail, Outlook, Yahoo Mail, Fastmail and other IMAP inboxes to ChatGPT, Claude and compatible AI assistants. Find emails by meaning across languages with semantic search. Ask AI to find customer conversations, summarize deadlines and draft follow-ups. Give a sales rep access to a shared outreach inbox or bring email into a compatible CRM. Share an iCloud custom-domain inbox with teammates without their own Apple ID or iCloud+ plan. Search results may be incomplete or stale; separate permissions control mail actions.
Email, calendar and contacts for AI agents: Gmail, Microsoft 365 and IMAP accounts behind one API.
Search and triage all your mailboxes; draft replies and campaigns; send only as you allow.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables unified email management across Gmail, Outlook, iCloud, and IMAP providers with tools for search, send, organize, and batch operations via natural language.MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to read, search, and manage email via IMAP, and send emails with attachments via SMTP, using natural language commands.1,767 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to read, search, send, manage, schedule, and analyze email across multiple IMAP/SMTP accounts, with OAuth2, drafts, labels, real-time IDLE watching, and calendar extraction.31 npmISC
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to access and manage email, contacts, and calendar data over JMAP/CalDAV/WebDAV, including searching, sending, threading, attachments, contacts, events, and mailbox operations.MIT