stalwart-mail-mcp
A community MCP server enabling AI agents to interact with a self-hosted Stalwart Mail server via JMAP. It supports searching and reading emails, handling attachments with OCR capabilities, sending messages, managing drafts, and managing contacts. It operates over stdio and requires no server-side installation, relying instead on the user's mailbox credentials.
Package and access
Local package with source-attributed installation metadata. Koskamo does not execute packages during review.
What you can do with it
- Search and read emails with OCR for scanned attachments
- Send emails or create drafts in a thread
- Manage contacts and address books
Source and maintenance
- Maintenance checked
Packages and installation
Source-provided package data. Koskamo has not executed or live-probed this package.
stalwart-mail-mcp 2.3.0
{
"version": "2.3.0",
"transport": "stdio",
"identifier": "stalwart-mail-mcp",
"registryType": "npm",
"environmentVariables": [
{
"name": "STALWART_URL",
"format": "string",
"isRequired": true,
"description": "Public address of the Stalwart server, e.g. https://mail.example.com"
},
{
"name": "STALWART_USER",
"format": "string",
"isRequired": true,
"description": "Mailbox e-mail address to sign in with"
},
{
"name": "STALWART_PASSWORD",
"format": "string",
"isRequired": true,
"description": "Mailbox or app password"
},
{
"name": "MAIL_LANG",
"format": "string",
"description": "Language: auto, en, cs, de, es, fr, it, nl, pl, pt, sk"
},
{
"name": "MAIL_OCR_PROVIDER",
"format": "string",
"description": "OCR of scans: auto, off, mistral, anthropic, openai, openrouter, gemini, ollama, lmstudio, custom"
},
{
"name": "MAIL_OCR_API_KEY",
"format": "string",
"description": "API key of the OCR provider (not needed for local servers)"
},
{
"name": "MAIL_OCR_MODEL",
"format": "string",
"description": "OCR model name"
},
{
"name": "MAIL_OCR_BASE_URL",
"format": "string",
"description": "Address of a custom OpenAI-compatible OCR server"
}
]
}Tools
Reported by the attributed source; not independently observed by Koskamo.
Connect from your client
Each snippet configures the same source-provided package; replace placeholders before use.
Cursor
{
"mcpServers": {
"stalwart-mail-mcp": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp@2.3.0"
],
"env": {
"STALWART_URL": "<YOUR_STALWART_URL>",
"STALWART_USER": "<YOUR_STALWART_USER>",
"STALWART_PASSWORD": "<YOUR_STALWART_PASSWORD>",
"MAIL_LANG": "<YOUR_MAIL_LANG>",
"MAIL_OCR_PROVIDER": "<YOUR_MAIL_OCR_PROVIDER>",
"MAIL_OCR_API_KEY": "<YOUR_MAIL_OCR_API_KEY>",
"MAIL_OCR_MODEL": "<YOUR_MAIL_OCR_MODEL>",
"MAIL_OCR_BASE_URL": "<YOUR_MAIL_OCR_BASE_URL>"
}
}
}
}Cline
{
"mcpServers": {
"stalwart-mail-mcp": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp@2.3.0"
],
"env": {
"STALWART_URL": "<YOUR_STALWART_URL>",
"STALWART_USER": "<YOUR_STALWART_USER>",
"STALWART_PASSWORD": "<YOUR_STALWART_PASSWORD>",
"MAIL_LANG": "<YOUR_MAIL_LANG>",
"MAIL_OCR_PROVIDER": "<YOUR_MAIL_OCR_PROVIDER>",
"MAIL_OCR_API_KEY": "<YOUR_MAIL_OCR_API_KEY>",
"MAIL_OCR_MODEL": "<YOUR_MAIL_OCR_MODEL>",
"MAIL_OCR_BASE_URL": "<YOUR_MAIL_OCR_BASE_URL>"
}
}
}
}VS Code
{
"servers": {
"stalwart-mail-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp@2.3.0"
],
"env": {
"STALWART_URL": "<YOUR_STALWART_URL>",
"STALWART_USER": "<YOUR_STALWART_USER>",
"STALWART_PASSWORD": "<YOUR_STALWART_PASSWORD>",
"MAIL_LANG": "<YOUR_MAIL_LANG>",
"MAIL_OCR_PROVIDER": "<YOUR_MAIL_OCR_PROVIDER>",
"MAIL_OCR_API_KEY": "<YOUR_MAIL_OCR_API_KEY>",
"MAIL_OCR_MODEL": "<YOUR_MAIL_OCR_MODEL>",
"MAIL_OCR_BASE_URL": "<YOUR_MAIL_OCR_BASE_URL>"
}
}
}
}Claude Desktop
{
"mcpServers": {
"stalwart-mail-mcp": {
"command": "npx",
"args": [
"-y",
"stalwart-mail-mcp@2.3.0"
],
"env": {
"STALWART_URL": "<YOUR_STALWART_URL>",
"STALWART_USER": "<YOUR_STALWART_USER>",
"STALWART_PASSWORD": "<YOUR_STALWART_PASSWORD>",
"MAIL_LANG": "<YOUR_MAIL_LANG>",
"MAIL_OCR_PROVIDER": "<YOUR_MAIL_OCR_PROVIDER>",
"MAIL_OCR_API_KEY": "<YOUR_MAIL_OCR_API_KEY>",
"MAIL_OCR_MODEL": "<YOUR_MAIL_OCR_MODEL>",
"MAIL_OCR_BASE_URL": "<YOUR_MAIL_OCR_BASE_URL>"
}
}
}
}Let your agent find its tools
Find servers like stalwart-mail-mcp from your agent. Add Koskamo once to search the index for endpoints, access requirements, and client setup. Public discovery needs no key.