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
MCP server

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
All reasons and checks

wyattjoh/jmap-mcp

Install

Manual install

/plugin marketplace add wyattjoh/claude-code-marketplace
/plugin install jmap-mcp@wyattjoh-marketplace

The recommended way from the README. Then set JMAP_SESSION_URL and JMAP_BEARER_TOKEN.

Access and checks

How we review

Broad 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_URL required
JMAP server session URL, usually ending in /.well-known/jmap
JMAP_BEARER_TOKEN required, 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.

Unofficial MCP server for Fastmail: email, drafts, contacts, calendar and attachments for agents over JMAP, CalDAV and WebDAV.

MCP serverBroad access131Repository stars

An email MCP with 52 tools: the agent reads, searches, sends and sorts mail across several accounts over IMAP and SMTP, and schedules sends

MCP serverBroad access147Repository stars

MCP email server over IMAP and SMTP: an agent searches, reads, sorts and sends mail across several mailboxes

MCP serverBroad access376Repository stars
Russian stack

A small read-only MCP server for Mail.ru mail: listing, reading, searching and folders, with no ability to send or delete

MCP serverBroad access

Comparison with similar tools

Cards that share the main search query, and how they differ.

ToolOfficialAuthenticationRepository starsMain difference
jmap-mcp (this card)noAPI key179
email-mcp: an MCP server for IMAP and SMTP mailnokey is optional147an 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 accountsnoAPI key25mail 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.

README badge

Report a problem

Foxx AIjmap-mcp
Foxx AI

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.