Mail and contacts on a self-hosted Stalwart server via JMAP: search, read, OCR, send, drafts.
MCPpedia last refreshed this data
io.github.cybersmurf/stalwart-mail-mcp is an MCP server that mail and contacts on a self-hosted Stalwart server via JMAP: search, read, OCR, send, drafts. Its tool list has not been published yet over stdio, requires no API key, and scores 58/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"stalwart-mail": {
"env": {
"STALWART_URL": "https://mail.example.com",
"STALWART_USER": "jane@example.com",
"STALWART_PASSWORD": "…"
},
"args": [
"-y",
"stalwart-mail-mcp"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
Mail and contacts on a self-hosted Stalwart server via JMAP: search, read, OCR, send, drafts.
Run this in your terminal to verify the server starts. Then let us know if it worked - your result helps other developers.
npx -y 'stalwart-mail-mcp' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
Checked stalwart-mail-mcp against OSV.dev.
Be the first to review
Have you used this server?
Share your experience - it helps other developers decide.
Sign in to write a review.
Others in communication / security
Search-first MCP server for JavaScript reverse engineering: 736 tools across 36 domains.
Official TypeScript library for the Telnyx API
Publish HTML, Markdown, PDF, or images as instant shareable links with expiry and passwords.
AI email marketing MCP: newsletters, drip campaigns, email automation, transactional emails+CRM sync
MCP Security Weekly
Get CVE alerts and security updates for io.github.cybersmurf/stalwart-mail-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
An MCP server that lets Claude Desktop (or any MCP client that speaks stdio) work with a mailbox on your own Stalwart mail server: search and read mail including attachments and scans, reply in a thread, send, keep drafts, and look up or add contacts.
It talks JMAP with the mailbox's own credentials. Nothing is installed on the server.
Claude Desktop ──stdio──▶ dist/index.cjs (Node, this MCP server)
│ HTTPS · JMAP (RFC 8620 / 8621 / 9610)
▼
https://mail.example.com/jmap (reverse proxy → Stalwart)
There is also a remote mode: the same server run next to Stalwart, added to Claude as a custom connector, so the mailbox works in claude.ai, the mobile apps and every desktop chat — people sign in through Stalwart's own OAuth and the server holds no credentials. See docs/remote.md.
How it fits into a small self-hosted setup — reverse proxy, what to expose, shared mailboxes, branded builds for a family or a team — is described in docs/small-infrastructure.md.
Names carry a prefix, mail_ by default (a branded build can change it).
| Tool | What it does |
|---|---|
mail_list_mailboxes | accounts (own + shared), folders with counts, allowed senders, address books |
mail_search_emails | full text / from / to / subject / folder / date / unread / has attachment, or a whole thread |
mail_get_email | a whole message by id (HTML → text) with a numbered list of attachments |
mail_get_attachment | an attachment's content: text, PDF page by page, OCR of scans and photographed documents, images; saves the file to disk |
mail_send_email | send a new mail or a reply (in_reply_to_id, reply_all), attachments from disk |
mail_create_draft | the same, but only saved to Drafts |
mail_send_draft / mail_delete_draft | send / delete a draft by id |
mail_search_contacts | address books of every account plus senders and recipients from the mail history |
mail_add_contact | new contact (own or shared address book) |
Sending is immediate and cannot be undone, so the tool descriptions tell the model to send only on the user's explicit instruction and to create a draft otherwise.
Download stalwart-mail.mcpb from the
latest release and open it —
Claude Desktop offers to install it. Or build it yourself:
npm install
./pack.sh # → stalwart-mail.mcpb
open stalwart-mail.mcpb # Claude Desktop → Install
Fill in the server address, the mailbox e-mail and password. Optional: the language and a Mistral API key for OCR. The password is kept in the operating system's keychain.
The server is on npm as stalwart-mail-mcp
and in the MCP Registry as
io.github.cybersmurf/stalwart-mail-mcp, so no checkout is needed:
{
"mcpServers": {
"stalwart-mail": {
"command": "npx",
"args": ["-y", "stalwart-mail-mcp"],
"env": {
"STALWART_URL": "https://mail.example.com",
"STALWART_USER": "jane@example.com",
"STALWART_PASSWORD": "…"
}
}
}
}
Claude Code: claude mcp add stalwart-mail --env STALWART_URL=https://mail.example.com --env STALWART_USER=jane@example.com --env STALWART_PASSWORD=… -- npx -y stalwart-mail-mcp
Run the server next to Stalwart (stalwart-mail-mcp --http, or the Docker image) and add its
URL as a custom connector — step by step in docs/remote.md.
| Variable | Meaning |
|---|---|
STALWART_URL | public address of the server, e.g. https://mail.example.com (required) |
| `STALWA |