jmap-mcp-worker
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.
jmap-mcp-worker
An MCP server for a mailbox on a JMAP server. It lists mailboxes, searches mail, reads message bodies and sends mail to an allowlist of recipients.
It is written for Mailflare first (multi-mailbox logins, Mailflare's JMAP ids and rights model) and follows RFC 8620/8621 closely enough to work with other JMAP servers.
It runs two ways:
Cloudflare Worker: a stateless remote MCP endpoint (Streamable HTTP) at
/mcp.stdio:
npx jmap-mcp-workerfor local MCP clients.
Tools
Tool | What it does |
| JMAP accounts of the login (primary first) |
| Mailboxes with roles, counts and your rights |
| Text/from/to/subject/mailbox/date/attachment/unread filters, paged |
| Headers, plain-text body (HTML only if there is no text part), attachment list |
| Plain-text mail. Off unless |
Related MCP server: cypht-mcp
Authentication
The server holds no credentials. Each request carries the caller's Authorization header, which is forwarded as it is to the JMAP server, and only to the origin of JMAP_SESSION_URL (a session whose apiUrl points elsewhere is refused). Use whatever your JMAP server accepts as a Bearer or Basic credential:
Now: an app password or API key (Mailflare accepts an app password as a Bearer token).
With an identity provider: an OIDC access token from your IdP, if the JMAP server accepts OIDC bearer tokens. Set
OAUTH_ISSUERand the Worker answers401with aWWW-Authenticate: Bearer resource_metadata=…challenge and serves/.well-known/oauth-protected-resource, so MCP clients that speak the MCP authorization flow can discover the issuer and sign in.
Run it on Cloudflare
npm install
# edit wrangler.jsonc: JMAP_SESSION_URL (and optionally OAUTH_ISSUER, SEND_ALLOWLIST)
npx wrangler deployConnect an MCP client to https://<your-worker>/mcp with an Authorization: Bearer <token> header.
Local trial: put JMAP_SESSION_URL=… in .dev.vars (git-ignored), npx wrangler dev, then JMAP_TOKEN=… node test/live.mjs.
Run it over stdio
{
"mcpServers": {
"mail": {
"command": "npx",
"args": ["-y", "jmap-mcp-worker"],
"env": {
"JMAP_SESSION_URL": "https://mail.example.com/.well-known/jmap",
"JMAP_TOKEN": "your-token",
"SEND_ALLOWLIST": "you@example.com"
}
}
}
}JMAP_USERNAME and JMAP_PASSWORD (Basic) work in place of JMAP_TOKEN. Node 22.6 or newer.
Mailflare notes
A Mailflare login can own or be delegated several mailboxes. The server reads the account from the session (
primaryAccounts); passaccountIdto use another one. Older Mailflare versions expose one account per login with the mailboxes as top-level nodes, newer ones one account per mailbox; both work.send_emailputs the draft in the Drafts folder of the sending identity's own mailbox before submitting it.
Safety
Sending is opt-in and recipient-limited. An unlisted recipient is refused before anything is created.
Message bodies are untrusted input to the model. Treat mail content as data, not instructions.
Development
npm test # node --test, no network
npm run typecheckLicense
MIT. See LICENSE.
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
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Remote streamable-HTTP MCP server running on a single Cloudflare Worker. Your assistant gets live Airbnb, Amazon, Booking.com, Google Flights, Maps and Reddit data, social search on X, Instagram and TikTok, the Meta Ad Library, and image/video generation without any keys. Connect your own accounts to let it send WhatsApp or Telegram messages, work an IMAP inbox, manage Meta Ads campaigns and publish to X and LinkedIn. OAuth 2.1 with PKCE; stored credentials are AES-256-GCM encrypted.
Related MCP Servers
- MIT
- FlicenseNot gradedqualityBmaintenanceCloudflare Worker implementation of the Cypht email MCP, providing eight email tools for account management, email sending, listing, viewing, searching, and deletion via IMAP.-
- FlicenseNot gradedqualityDmaintenanceA Gmail MCP server running on Cloudflare Workers that enables reading, searching, labeling, drafting, sending, and managing Gmail messages, including fetching raw attachment bytes, with per-user OAuth authorization.1-
- AlicenseNot gradedqualityBmaintenancegmail-mcp is a remote MCP server that exposes Gmail as a set of tools — search, read, label, draft, send — over streamable HTTP with OAuth 2.1. It runs on Cloudflare Workers under your own domain.10MIT