Stalwart Mail MCP Server
by cybersmurfio.github.cybersmurf/stalwart-mail-mcpv2.3.0
Mail and contacts on a self-hosted Stalwart server via JMAP: search, read, OCR, send, drafts.
context tax
queued
security
queued
cold start
queued
freshness
Active5d ago
Install Stalwart Mail MCP server
Install in Claude Code
claude mcp add stalwart-mail -e STALWART_URL='<stalwart-url>' -e STALWART_USER='<stalwart-user>' -e STALWART_PASSWORD='<stalwart-password>' -e MAIL_OCR_API_KEY='<mail-ocr-api-key>' -- npx -y stalwart-mail-mcpInstall in Cursor
{
"mcpServers": {
"stalwart-mail": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp"
],
"env": {
"STALWART_URL": "<stalwart-url>",
"STALWART_USER": "<stalwart-user>",
"STALWART_PASSWORD": "<stalwart-password>",
"MAIL_OCR_API_KEY": "<mail-ocr-api-key>"
}
}
}
}Add to ~/.cursor/mcp.json (global) or .cursor/mcp.json (project).
Install in Claude Desktop
{
"mcpServers": {
"stalwart-mail": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp"
],
"env": {
"STALWART_URL": "<stalwart-url>",
"STALWART_USER": "<stalwart-user>",
"STALWART_PASSWORD": "<stalwart-password>",
"MAIL_OCR_API_KEY": "<mail-ocr-api-key>"
}
}
}
}Settings → Developer → Edit Config (claude_desktop_config.json), then restart.
Install in VS Code
{
"servers": {
"stalwart-mail": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp"
],
"env": {
"STALWART_URL": "<stalwart-url>",
"STALWART_USER": "<stalwart-user>",
"STALWART_PASSWORD": "<stalwart-password>",
"MAIL_OCR_API_KEY": "<mail-ocr-api-key>"
}
}
}
}Add to .vscode/mcp.json in your workspace.
Install in Windsurf
{
"mcpServers": {
"stalwart-mail": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp"
],
"env": {
"STALWART_URL": "<stalwart-url>",
"STALWART_USER": "<stalwart-user>",
"STALWART_PASSWORD": "<stalwart-password>",
"MAIL_OCR_API_KEY": "<mail-ocr-api-key>"
}
}
}
}Add to ~/.codeium/windsurf/mcp_config.json.
Configuration
| Variable | Required | Secret | Description |
|---|---|---|---|
| STALWART_URL | yes | — | Public address of the Stalwart server, e.g. https://mail.example.com |
| STALWART_USER | yes | — | Mailbox e-mail address to sign in with |
| STALWART_PASSWORD | yes | yes | Mailbox or app password |
| MAIL_LANG | — | — | Language: auto, en, cs, de, es, fr, it, nl, pl, pt, sk |
| MAIL_OCR_PROVIDER | — | — | OCR of scans: auto, off, mistral, anthropic, openai, openrouter, gemini, ollama, lmstudio, custom |
| MAIL_OCR_API_KEY | — | yes | API key of the OCR provider (not needed for local servers) |
| MAIL_OCR_MODEL | — | — | OCR model name |
| MAIL_OCR_BASE_URL | — | — | Address of a custom OpenAI-compatible OCR server |
Freshness
Active — last maintenance signal 5d ago. The newest of the signals below sets the band.
Last commit (default branch)
2026-10-05 · 5d ago · GitHub
Latest release
2026-10-02 · 8d ago · GitHub · v2.3.0
Package published
no data · npm/PyPI
Registry entry updated
2026-10-02 · 8d ago · official registry · v2.3.0
FAQ
›How do I install the Stalwart Mail MCP server in Claude Code?
Run: claude mcp add stalwart-mail -e STALWART_URL='<stalwart-url>' -e STALWART_USER='<stalwart-user>' -e STALWART_PASSWORD='<stalwart-password>' -e MAIL_OCR_API_KEY='<mail-ocr-api-key>' -- npx -y stalwart-mail-mcp. For Cursor, VS Code, Claude Desktop and Windsurf, use the install tabs above.
›Does Stalwart Mail require an API key?
Yes. It expects STALWART_URL, STALWART_USER, STALWART_PASSWORD, MAIL_OCR_API_KEY, of which 2 are secrets.
›Can I use Stalwart Mail as a remote (hosted) MCP server?
No hosted endpoint is published; it runs locally over stdio.
›Is Stalwart Mail in the official MCP registry?
Yes, as io.github.cybersmurf/stalwart-mail-mcp.