Server data from the Official MCP Registry
Self-hosted MCP server for Stalwart: email, calendar and contacts over JMAP, CalDAV and CardDAV.
About
Self-hosted MCP server for Stalwart: email, calendar and contacts over JMAP, CalDAV and CardDAV.
Security Report
Valid MCP server (3 strong, 3 medium validity signals). No known CVEs in dependencies. Package registry verified. Imported from the Official MCP Registry. Trust signals: 3 highly-trusted packages.
6 files analyzed · 1 issue found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: STALWART_URL
Environment variable: STALWART_USERNAME
Environment variable: STALWART_PASSWORD
Environment variable: STALWART_TOKEN
Environment variable: MCP_TRANSPORT
Environment variable: MCP_AUTH_TOKEN
Environment variable: MCP_HOST
Environment variable: MCP_PORT
Environment variable: MCP_PUBLIC_URL
Environment variable: LOG_LEVEL
Environment variable: LANGMAIL_MCP_ALLOW_UNSUBSCRIBE_POST
Environment variable: LANGMAIL_MCP_ALLOW_REMOTE_IMAGES
How to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"langmail-mcp": {
"command": "npx",
"args": [
"-y",
"langmail-mcp@0.1.0"
],
"env": {
"MCP_HOST": "your-mcp-host-here",
"MCP_PORT": "your-mcp-port-here",
"LOG_LEVEL": "your-log-level-here",
"STALWART_URL": "your-stalwart-url-here",
"MCP_TRANSPORT": "your-mcp-transport-here",
"MCP_AUTH_TOKEN": "your-mcp-auth-token-here",
"MCP_PUBLIC_URL": "your-mcp-public-url-here",
"STALWART_TOKEN": "your-stalwart-token-here",
"STALWART_PASSWORD": "your-stalwart-password-here",
"STALWART_USERNAME": "your-stalwart-username-here",
"LANGMAIL_MCP_ALLOW_REMOTE_IMAGES": "your-langmail-mcp-allow-remote-images-here",
"LANGMAIL_MCP_ALLOW_UNSUBSCRIBE_POST": "your-langmail-mcp-allow-unsubscribe-post-here"
}
}
}
}Some servers take additional arguments. See the repository for details.
Documentation
View on GitHubFrom the project's GitHub README.
langmail-mcp
An MCP server that gives an AI agent the mail, calendar and contacts of one mailbox on your own Stalwart server. It talks to Stalwart over JMAP, CalDAV and CardDAV, with a username and an app password, and needs no other service.
This is the server Langmail runs at mcp.langmail.me, from the same code. The
hosted server adds a few features that need Langmail's own services, listed
under Hosted and self-hosted.
Let your agent decide if this is for you
I found this project on GitHub: https://github.com/langmail/langmail-mcp
Is this something useful for my setup regarding MCP access to emails, calendars, and contacts?
How does it compare to what we're currently using.
What your agent can do with it
- Mail: search, read whole conversations, file, mark, archive and trash messages, download attachments, preview a message as a rendered page and unsubscribe from mailing lists.
- Writing: stage drafts with attachments, then send them, reply or forward. A staged draft waits in the Drafts folder, so you can also review and send it from your mail app.
- Calendar: list calendars and events, create, update, move and delete events, and answer invitations.
- Contacts: search the address books, create, update, merge and delete contacts, and list upcoming birthdays.
- Mail rules: list, preview, create, update and delete the Sieve rules that file incoming mail.
The tool reference
describes every tool. It is written for the hosted server, and the
differences are in docs/self-hosted.md.
Start it
You need Node 22.12 or later (not 23) or Bun, a Stalwart account and an app password for it.
On the same computer as the agent, the MCP client starts the server and talks to it over stdio:
STALWART_URL=https://mail.example.com STALWART_USERNAME=alice \
STALWART_PASSWORD=<app password> npx langmail-mcp
Over the network, the server listens for Streamable HTTP and every request must carry the secret you set:
STALWART_URL=https://mail.example.com STALWART_USERNAME=alice \
STALWART_PASSWORD=<app password> MCP_AUTH_TOKEN=<long random secret> \
npx langmail-mcp --transport http --host 0.0.0.0 --port 8080
Under Bun, use bunx --bun langmail-mcp. langmail-mcp --help lists every
setting with its variable.
Connect an MCP client
Claude Code, over stdio:
claude mcp add langmail \
--env STALWART_URL=https://mail.example.com \
--env STALWART_USERNAME=alice \
--env STALWART_PASSWORD=<app password> \
-- npx -y langmail-mcp
A client configured with JSON, such as Claude Desktop:
{
"mcpServers": {
"langmail": {
"command": "npx",
"args": ["-y", "langmail-mcp"],
"env": {
"STALWART_URL": "https://mail.example.com",
"STALWART_USERNAME": "alice",
"STALWART_PASSWORD": "<app password>"
}
}
}
}
Settings
| Variable | Flag | Default | Meaning |
|---|---|---|---|
STALWART_URL | --stalwart-url | required | Stalwart's base URL; JMAP, CalDAV and CardDAV are reached under it |
STALWART_USERNAME | --username | required | The account name to sign in with |
STALWART_PASSWORD | none | required | An app password for that account |
STALWART_EMAIL | --email | the login Stalwart reports | The address to send mail as |
MCP_ACCESS | --access | everything | What the agent may do: read-only, no-send or everything (access levels) |
MCP_TRANSPORT | --transport | stdio | stdio or http (Streamable HTTP) |
MCP_HOST | --host | 127.0.0.1 | Where the HTTP listener binds |
MCP_PORT | --port | 8080 for http | The HTTP listener's port |
MCP_PUBLIC_URL | --public-url | http://<host>:<port> | Base URL for the attachment and image links the server creates |
MCP_AUTH_TOKEN | none | required for http | The bearer every /mcp request must carry |
The secrets have no flag, because a flag shows in the process list. What each
setting does, the checks at startup and what the server sends where:
docs/self-hosted.md.
Hosted and self-hosted
| Feature | Hosted at mcp.langmail.me | Self-hosted |
|---|---|---|
| Sign-in | OAuth with a Langmail account | Stalwart username and app password |
Calendar sharing (share_calendar, stop_sharing_calendar) | Yes | No |
| Filter mail by classified type | Yes | No; a todo flag instead |
| Address book collected from mail and invitations | Yes | No; search_contacts also looks at recent mail headers |
The details and reasons are in docs/self-hosted.md
§ What the mode leaves out.
Development
git clone https://github.com/langmail/langmail-mcp.git
cd langmail-mcp
bun install
bun test
CONTRIBUTING.md covers the checks, the integration tests against Radicale
and a dev Stalwart, and how releases work. docs/evals.md covers the agent
evals. Report bugs in GitHub issues
and vulnerabilities as SECURITY.md describes.
License
Reviews
No reviews yet
Be the first to review this server!
More Developer Tools MCP Servers
Rea
Freeby Morluto · Developer Tools
Reverse engineer anything from your terminal or agent with one CLI and MCP server.
Paperclip
Freeby Paperclipai · Developer Tools
Trending hip-hop artist momentum scores across four cultural dimensions.
Scrapling
Freeby D4Vinci · Developer Tools
Web scraping with stealth HTTP, real browsers, and Cloudflare bypass. CSS selectors supported.
Server Time
Freeby Modelcontextprotocol · Developer Tools
Current time lookup and conversion between IANA timezones
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
