jmap-mcp
MCP server for email over the JMAP protocol: search, read, mark, move and send mail in Fastmail and Stalwart from an agent
- 179 ★ on the repository
- Last commit
- MIT
Broad access
Why this level
- The agent reads personal mail and the token opens the whole mailbox
- The `send_email` and `reply_to_email` tools send real messages in your name
- `delete_emails` deletes mail permanently, bypassing trash
Install
- Works in
Manual install
/plugin marketplace add wyattjoh/claude-code-marketplace
/plugin install jmap-mcp@wyattjoh-marketplaceThe recommended way from the README. Then set JMAP_SESSION_URL and JMAP_BEARER_TOKEN.
Access and checks
How we reviewBroad accessThe tool can change data, run commands or handle secrets.
- The agent reads personal mail and the token opens the whole mailbox
- The `send_email` and `reply_to_email` tools send real messages in your name
- `delete_emails` deletes mail permanently, bypassing trash
This is third-party code. Review the repository files before installing.
What it does
jmap-mcp connects an agent to a mail server over JMAP, a modern JSON and HTTP replacement for IMAP. It works with Fastmail, Cyrus IMAP and Stalwart Mail Server. Email search combines text, sender, recipient, subject, mailbox, keywords and a date range, and `get_emails` fetches only the properties you ask for so context stays small. The tools include `get_mailboxes`, `get_threads`, `mark_emails`, `move_emails`, `patch_email_mailboxes` and `delete_emails`. For polling there is incremental sync: `get_email_changes` and `get_search_updates` return only changes since the previous state. Sending and replying, with headers and reply-all handled, are separate tools. The server is built on Deno and has two packages: a `@wyattjoh/jmap` client on jmap-jam that works for standalone apps and an MCP layer on top. Tool registration depends on capabilities: reading and sending are enabled separately.
Who it is for. Owners of Fastmail mailboxes or a self-hosted JMAP server who want Claude Code to triage mail without IMAP.
Good fit when
- The inbox needs triage: find a vendor's emails from the last month and mark them read
- You need a list of unread messages in the inbox mailbox and a short summary of each
- An agent polls a mailbox and should fetch only what changed since the last check
- A thread on a topic must be assembled in full by its thread id
- An agent prepares a reply with correct headers and reply-all handling
Not a fit when
- The mail server only speaks IMAP and SMTP: you need a different server such as email-mcp
- The mailbox is on Gmail or Yandex Mail where JMAP is not offered
- The agent should only read and you cannot issue a token without send rights
- Deno 2 is not installed and cannot be installed
Example request
Find unread emails from accounting in the last week and show the subject and first line of each.MCP
- Transport
- stdio
- Authentication
- API key
Environment variables
JMAP_SESSION_URLrequired- JMAP server session URL, usually ending in /.well-known/jmap
JMAP_BEARER_TOKENrequired, secret- Bearer token for signing in to the JMAP server
JMAP_ACCOUNT_ID- Account id, auto-detected if not set
Limitations
- Deno 2 or newer and a JMAP server with valid credentials are required: a session URL and an access token.
- Limit `--allow-net` to your server's address: the example uses api.fastmail.com.
- `delete_emails` removes mail permanently, while `send_email` and `reply_to_email` send real messages.
- Search returns ids only, and content is fetched with a separate `get_emails` call.
How to disable. In Claude Code run `/plugin uninstall jmap-mcp@wyattjoh-marketplace`. If you installed it by hand, remove the jmap block from the MCP configuration and revoke the token in your mail service.
FAQ
What is JMAP and how does it differ from IMAP?
JMAP is a JSON-over-HTTP mail protocol defined by RFC 8620 and 8621. It returns changes since a previous state and is easier for scripts, and jmap-mcp speaks only that protocol, not IMAP.
How do I install jmap-mcp in Claude Code?
Run `/plugin marketplace add wyattjoh/claude-code-marketplace` and `/plugin install jmap-mcp@wyattjoh-marketplace`, then set JMAP_SESSION_URL and JMAP_BEARER_TOKEN in the server settings.
Which environment variables are needed?
Two are required: JMAP_SESSION_URL with the server's session URL and JMAP_BEARER_TOKEN with the token. The optional JMAP_ACCOUNT_ID sets the account, otherwise the server detects it.
How do I stop the agent from sending mail?
Tool registration depends on capabilities: reading and submission are enabled separately. Issue a token without send rights and limit `--allow-net` to the server address.
Which mail servers work?
Any with JMAP per RFC 8620 and 8621: the README names Fastmail, Cyrus IMAP and Stalwart Mail Server. For another host replace it in `--allow-net` and the session URL.
Discussion
No questions or reviews yet.
Related
MCP serversUnofficial MCP server for Fastmail: email, drafts, contacts, calendar and attachments for agents over JMAP, CalDAV and WebDAV.
An email MCP with 52 tools: the agent reads, searches, sends and sorts mail across several accounts over IMAP and SMTP, and schedules sends
Email MCP: Yandex, Mail.ru and other providers
Email MCP Server
An HTTP/SSE wrapper around an IMAP MCP server for remote mailbox access from Claude Web: read, search, send, across 15 providers
MCP email server over IMAP and SMTP: an agent searches, reads, sorts and sends mail across several mailboxes
Email SMTP/IMAP MCP: mail across several accounts
Email SMTP/IMAP MCP
A six-tool mail MCP: one local server searches, reads, sends, forwards and files email across any number of IMAP and SMTP accounts
Mail.ru read-only mail MCP server
Mail.ru MCP
A small read-only MCP server for Mail.ru mail: listing, reading, searching and folders, with no ability to send or delete
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| jmap-mcp (this card) | no | API key | 179 | |
| email-mcp: an MCP server for IMAP and SMTP mail | no | key is optional | 147 | an email MCP with 52 tools over IMAP and SMTP and several mailboxes, while this one speaks JMAP only |
| Email SMTP/IMAP MCP: mail across several accounts | no | API key | 25 | mail over IMAP and SMTP for servers without JMAP, while this server works only over JMAP |
README in short
The repository is described as a Deno monorepo with a JMAP client and an MCP server. It goes on with features by group, plugin and manual install, an environment variable table, the parameters of each tool and an example of using the client in a regular app.