{
  "markdown": "# jmap-mcp\n\nMCP server exposing JMAP email and Sieve script operations as tools.\n\nBuilt with the Go MCP SDK ([go-sdk](https://github.com/modelcontextprotocol/go-sdk))\nand [go-jmap](https://github.com/mikluko/jmap) library.\n\n## Tools\n\nTools map closely to JMAP methods. Email mutation tools provide structured convenience wrappers over `Email/set` patches.\n\n### Mailbox (RFC 8621)\n\n| Tool           | JMAP Method    | Description                                         |\n|----------------|----------------|-----------------------------------------------------|\n| `mailbox_get`  | `Mailbox/get`  | Get mailboxes by ID, or list all                    |\n| `mailbox_set`  | `Mailbox/set`  | Create, update, or destroy mailboxes                |\n\n### Email (RFC 8621)\n\n| Tool           | JMAP Method  | Description                                                    |\n|----------------|--------------|----------------------------------------------------------------|\n| `email_query`  | `Email/query`| Search emails with filters, returns IDs and total count        |\n| `email_get`    | `Email/get`  | Get full content of emails by ID                               |\n| `email_create` | `Email/set`  | Create a new email draft in the Drafts mailbox                 |\n| `email_move`   | `Email/set`  | Move emails to a different mailbox                             |\n| `email_flag`   | `Email/set`  | Set or remove flags (seen, flagged, answered, draft)           |\n| `email_delete` | `Email/set`  | Delete emails (move to Trash or permanently destroy)           |\n| `email_attachment_url` | Blob download | Signed URL streaming an attachment, expires in 30 s (HTTP mode only) |\n\n### Identity\n\n| Tool           | JMAP Method    | Description                                       |\n|----------------|----------------|---------------------------------------------------|\n| `identity_get` | `Identity/get` | List sender identities (email addresses)          |\n\n### Submission (feature-gated)\n\n| Tool                   | JMAP Method            | Description                                        |\n|------------------------|------------------------|----------------------------------------------------|\n| `email_submission_set` | `EmailSubmission/set`  | Submit a draft for delivery (requires `-enable-send`) |\n\n### Sieve Scripts (RFC 9661, feature-gated)\n\n| Tool             | JMAP Method            | Description                                                         |\n|------------------|------------------------|---------------------------------------------------------------------|\n| `sieve_get`      | `SieveScript/get`      | List all scripts, or get one with full content (requires `-enable-sieve`) |\n| `sieve_set`      | `SieveScript/set`      | Create, update, or destroy Sieve scripts (requires `-enable-sieve`)      |\n| `sieve_validate` | `SieveScript/validate` | Validate a Sieve script without saving (requires `-enable-sieve`)        |\n\n## Configuration\n\n| Env var                | Required   | Description                                                          |\n|------------------------|------------|----------------------------------------------------------------------|\n| `JMAP_SESSION_URL`     | always     | JMAP session endpoint (e.g. `https://api.fastmail.com/jmap/session`) |\n| `JMAP_AUTH_TOKEN`      | stdio mode | Bearer token for JMAP authentication                                 |\n| `ATTACHMENT_URL_SECRET`| no         | Secret sealing signed attachment URLs; set for multi-replica deployments (default: random per-process key) |\n\n| Flag                  | Default | Description                                    |\n|-----------------------|---------|------------------------------------------------|\n| `-mode`               | `stdio` | Server mode: `stdio` or `http`                 |\n| `-listen`             | `:8080` | HTTP listen address (http mode only)           |\n| `-enable-send`        | `false` | Enable the `email_submission_set` tool (off by default)                     |\n| `-enable-sieve`       | `false` | Enable Sieve script tools (off by default, requires JMAP server support)    |\n| `-external-url`       | derived | External base URL for signed attachment links; default derives from the request (`X-Forwarded-Proto`/`X-Forwarded-Host` aware) |\n\nIn HTTP mode, the token can be passed per-request via `Authorization: Bearer <token>` header or `jmap_token` query parameter (query parameter takes precedence).\n\nIn HTTP mode, `email_attachment_url` returns a link served from `/attachments/` that expires 30 seconds after issuance. The link is an AES-GCM sealed capability: it embeds the JMAP token, account, and blob IDs, so the endpoint streams the attachment from the JMAP server without any additional authentication and stores nothing on disk.\n\n## Installation\n\n### Kubernetes (Helm)\n\n```bash\nhelm install jmap-mcp oci://ghcr.io/mikluko/helm-charts/jmap-mcp \\\n  --version 0.1.0 \\\n  --set jmap.sessionURL=\"https://api.fastmail.com/jmap/session\"\n```\n\nIn HTTP mode, JMAP auth tokens are passed per-request via `Authorization: Bearer` header or `?jmap_token=` query parameter — no static tokens are stored in the cluster.\n\n### Binary\n\n```bash\ngo install github.com/mikluko/jmap-mcp@latest\n```\n\n### From source\n\n```bash\ngit clone https://github.com/mikluko/jmap-mcp.git\ncd jmap-mcp\nmake install\n```\n\n## Usage\n\n```bash\n# stdio mode (default)\nexport JMAP_SESSION_URL=https://api.fastmail.com/jmap/session\nexport JMAP_AUTH_TOKEN=your-token\n./jmap-mcp\n\n# HTTP mode\n./jmap-mcp -mode http -listen :8080\n```\n\n## Build\n\n```bash\nmake build # Build and push container image + Helm chart\nmake image # Build and push container image with ko\nmake package # Package and push Helm chart to OCI registry\nmake test # Run tests\nmake install # Install binary locally\n```\n\n## References\n\n- [RFC 8620](https://www.rfc-editor.org/rfc/rfc8620) — JMAP Core\n- [RFC 8621](https://www.rfc-editor.org/rfc/rfc8621) — JMAP Mail\n- [RFC 9425](https://www.rfc-editor.org/rfc/rfc9425) — JMAP Sieve Scripts\n- [MCP Specification](https://modelcontextprotocol.io/specification)\n",
  "bytes": 6080,
  "sha": "771664d2b63583a9e0564713cafdc729867519945e2395541d582b7258b83c09",
  "repo_slug": "mikluko/jmap-mcp",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_mikluko_jmap_mcp_039acaf8/readme"
}