JMAP Email

io.github.mikluko由 GitHub 帳號 mikluko 發布v0.10.0更新於 Oct 24, 2026

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

已驗證STDIO僅桌面效率與工作流溝通與協作

概覽

AI 產生的概覽

一個本機 MCP 伺服器,讓助理連接 JMAP 信箱帳號,瀏覽信箱資料夾、搜尋與讀取郵件,並管理標記、移動與草稿。

可以做什麼
列出、建立、更新與刪除信箱資料夾,並列出可用於寄信的寄件者身分。依條件搜尋郵件,並依 ID 取得完整郵件內容。建立草稿、在資料夾間移動郵件、設定或清除已讀、加星號、已回覆、草稿等標記,並將郵件移至垃圾桶或永久刪除。可選擇性提交草稿寄送,以及管理 Sieve 篩選腳本,包括在不儲存的情況下驗證腳本。
適用情境
適合讓助理處理以 JMAP 為基礎的信箱(例如 Fastmail),用於郵件分類、搜尋、起草回覆或整理資料夾。寄送與 Sieve 腳本工具預設關閉,需要主動啟用。
執行需求
以本機程序(Go 執行檔或容器映像)透過 stdio 執行。需要 JMAP 工作階段端點網址(JMAP_SESSION_URL)與 bearer 權杖(JMAP_AUTH_TOKEN)。需要能連線至 JMAP 伺服器的網路。寄送功能需 -enable-send 旗標;Sieve 工具需 -enable-sieve 且伺服器支援。
安裝前請注意
此 bearer 權杖可存取整個信箱,請避免寫入日誌或共用設定。工具可建立、移動、標記與永久刪除郵件,信箱工具還可銷毀信箱資料夾。寄送功能預設關閉,需明確啟用。在 HTTP 模式下,簽章附件連結內嵌 JMAP 權杖,30 秒內無需額外驗證即可存取。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 JMAP Email,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

jmap-mcp

MCP server exposing JMAP email and Sieve script operations as tools.

Built with the Go MCP SDK (go-sdk) and go-jmap library.

Tools

Tools map closely to JMAP methods. Email mutation tools provide structured convenience wrappers over Email/set patches.

Mailbox (RFC 8621)

ToolJMAP MethodDescription
mailbox_getMailbox/getGet mailboxes by ID, or list all
mailbox_setMailbox/setCreate, update, or destroy mailboxes

Email (RFC 8621)

ToolJMAP MethodDescription
email_queryEmail/querySearch emails with filters, returns IDs and total count
email_getEmail/getGet full content of emails by ID
email_createEmail/setCreate a new email draft in the Drafts mailbox
email_moveEmail/setMove emails to a different mailbox
email_flagEmail/setSet or remove flags (seen, flagged, answered, draft)
email_deleteEmail/setDelete emails (move to Trash or permanently destroy)
email_attachment_urlBlob downloadSigned URL streaming an attachment, expires in 30 s (HTTP mode only)

Identity

ToolJMAP MethodDescription
identity_getIdentity/getList sender identities (email addresses)

Submission (feature-gated)

ToolJMAP MethodDescription
email_submission_setEmailSubmission/setSubmit a draft for delivery (requires -enable-send)

Sieve Scripts (RFC 9661, feature-gated)

ToolJMAP MethodDescription
sieve_getSieveScript/getList all scripts, or get one with full content (requires -enable-sieve)
sieve_setSieveScript/setCreate, update, or destroy Sieve scripts (requires -enable-sieve)
sieve_validateSieveScript/validateValidate a Sieve script without saving (requires -enable-sieve)

Configuration

Env varRequiredDescription
JMAP_SESSION_URLalwaysJMAP session endpoint (e.g. https://api.fastmail.com/jmap/session)
JMAP_AUTH_TOKENstdio modeBearer token for JMAP authentication
ATTACHMENT_URL_SECRETnoSecret sealing signed attachment URLs; set for multi-replica deployments (default: random per-process key)
FlagDefaultDescription
-modestdioServer mode: stdio or http
-listen:8080HTTP listen address (http mode only)
-enable-sendfalseEnable the email_submission_set tool (off by default)
-enable-sievefalseEnable Sieve script tools (off by default, requires JMAP server support)
-external-urlderivedExternal base URL for signed attachment links; default derives from the request (X-Forwarded-Proto/X-Forwarded-Host aware)

In HTTP mode, the token can be passed per-request via Authorization: Bearer <token> header or jmap_token query parameter (query parameter takes precedence).

In 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.

Installation

Kubernetes (Helm)

bash
helm install jmap-mcp oci://ghcr.io/mikluko/helm-charts/jmap-mcp \  --version 0.1.0 \  --set jmap.sessionURL="https://api.fastmail.com/jmap/session"

In 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.

Binary

bash
go install github.com/mikluko/jmap-mcp@latest

From source

bash
git clone https://github.com/mikluko/jmap-mcp.gitcd jmap-mcpmake install

Usage

bash
# stdio mode (default)export JMAP_SESSION_URL=https://api.fastmail.com/jmap/sessionexport JMAP_AUTH_TOKEN=your-token./jmap-mcp
# HTTP mode./jmap-mcp -mode http -listen :8080

Build

bash
make build # Build and push container image + Helm chartmake image # Build and push container image with komake package # Package and push Helm chart to OCI registrymake test # Run testsmake install # Install binary locally

References

來源:README.md,提交 c0bcbf9

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.10.0最新Sep 16, 2026

評分

已滿足適用檢查項的 40%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分

    請在儲存庫或註冊中心條目中宣告授權條款。