# JMAP Email [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/mikluko/jmap-mcp  
**GitHub Stars:** 2  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/jmap-email

## Description
Email management via JMAP — mailboxes, messages, identities, and Sieve scripts

## Tools
Capabilities this server exposes over MCP:

- **mailbox_get** — Get mailboxes by ID, or list all
- **mailbox_set** — Create, update, or destroy mailboxes
- **email_query** — Search emails with filters, returns IDs and total count
- **email_get** — Get full content of emails by ID
- **email_create** — Create a new email draft in the Drafts mailbox, or an answer
- **email_move** — Move emails to a different mailbox
- **email_flag** — Set or remove flags (seen, flagged, answered, draft)
- **email_delete** — Delete emails (move to Trash or permanently destroy)
- **email_attachment_url** — Signed URL streaming an attachment, expires in 30 s (HTTP mode only)
- **identity_get** — List sender identities (addresses and signatures)
- **email_submission_set** — Submit a draft for delivery (requires `-enable-send`)
- **sieve_get** — List all scripts, or get one with full content (requires `-enable-sieve`)
- **sieve_set** — Create, update, or destroy Sieve scripts (requires `-enable-sieve`)
- **sieve_validate** — Validate a Sieve script without saving (requires `-enable-sieve`)

## Claude Desktop Quick Installation
Remote MCP endpoint (confidence: high). Install path detected from listing signals. Add as a URL/SSE server in your client:

```json
"mcpServers": {
  "jmap-email": {
    "url": "https://api.fastmail.com/jmap/session"
  }
}
```

## Documentation

## What JMAP Email does

JMAP Email turns JMAP email operations into MCP tools. It covers the main mailbox and message workflows defined by JMAP Mail: listing or changing mailboxes, searching for messages, reading full email content, creating drafts, moving messages, changing common flags, and deleting messages. It also exposes sender identities so an agent can select an available address when preparing mail.

The server can optionally submit drafts for delivery. Sieve script management is also available when enabled and supported by the JMAP service, including listing scripts, reading their content, creating, updating, destroying, and validating scripts without saving them.

## How it works

Operations map closely to JMAP methods. Mailbox tools use `Mailbox/get` and `Mailbox/set`; message search and retrieval use `Email/query` and `Email/get`; message changes are handled through `Email/set` wrappers. Identity lookup uses `Identity/get`, and delivery uses `EmailSubmission/set` when sending has been enabled.

The process runs in stdio mode by default or as an HTTP service. In stdio mode, it reads the JMAP session endpoint and bearer token from environment variables. HTTP mode accepts a bearer token in the `Authorization` header or through the `jmap_token` query parameter, with the query parameter taking precedence.

Attachment retrieval is available only in HTTP mode. The attachment tool returns a link under `/attachments/` that expires after 30 seconds. The link contains an AES-GCM-sealed capability carrying the JMAP token, account, and blob identifiers; the server streams the attachment from JMAP without writing it to disk.

## Setup and configuration

Install options include a Go binary, Debian packages for amd64 and arm64, or the published container and Helm chart. A direct installation can use:

```bash
go install sarak.sh/mikluko/jmap-mcp@latest
```

Set `JMAP_SESSION_URL` to the JMAP session endpoint. In stdio mode, also set `JMAP_AUTH_TOKEN` to the bearer token used for JMAP authentication:

```bash
export JMAP_SESSION_URL=https://api.fastmail.com/jmap/session
export JMAP_AUTH_TOKEN=your-token
./jmap-mcp
```

For HTTP mode, start the process with `-mode http`; `-listen` controls the bind address and defaults to `:8080`:

```bash
./jmap-mcp -mode http -listen :8080
```

Use `-enable-send` to expose draft submission and `-enable-sieve` to expose Sieve tools. Both are disabled by default. `-external-url` sets the base URL used in signed attachment links. `ATTACHMENT_URL_SECRET` can provide a stable sealing secret, which is useful when several HTTP replicas need to validate links consistently.

## Tools and capabilities

- `mailbox_get` lists mailboxes or retrieves selected mailbox records.
- `mailbox_set` creates, updates, or destroys mailboxes.
- `email_query` searches messages with filters and returns matching IDs plus a total count.
- `email_get` retrieves complete email content by ID.
- `email_create` creates a draft in the Drafts mailbox.
- `email_move`, `email_flag`, and `email_delete` change message placement, flags, or deletion state.
- `identity_get` lists available sender identities.
- `email_submission_set` submits a draft when sending is enabled.
- `email_attachment_url` creates a temporary attachment stream URL in HTTP mode.
- `sieve_get`, `sieve_set`, and `sieve_validate` manage or validate Sieve scripts when enabled.

## Limitations and notes

Message submission is opt-in through `-enable-send`, and Sieve operations are both opt-in and dependent on JMAP server support. Attachment URLs expire after 30 seconds and are only provided by the HTTP deployment. Permanent deletion is available through the email deletion tool in addition to moving a message to Trash. HTTP deployments can receive credentials per request rather than storing a static token in the cluster.

_Full upstream README: https://allmcps.com/mcp/jmap-email/readme_

