OwnMail
OfficialThis server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
OwnMail
Your own mail server in one Go program — with mailboxes AI agents can use.

OwnMail receives, filters, stores and sends mail for your own domains, and syncs calendars and contacts, on one server you run yourself. It is one program with a web interface for administrators and one for the people with a mailbox.
Why OwnMail
One program instead of a stack. No Postfix, Dovecot, Rspamd and glue to keep in sync: SMTP, IMAP, filters, spam checks, signing, calendars and contacts run in a single process. The release binary is about 33 MB; on a small test setup (3 domains, 7 mailboxes) it used around 175 MB of memory.
DNS you can get right. Every domain lists each record it needs, checked live (in place, missing or different), with copy buttons, and copies all of them at once as a zone file or as step-by-step instructions for an AI assistant. OwnMail never changes your DNS itself.
Built for AI agents. Each mailbox has its own MCP endpoint: an agent can search, read, sort and send mail within the person's rights. A second MCP endpoint manages the whole server with access tokens.
Safe to run. Two-factor sign-in for administrators and mailboxes, administrators for single domains, encrypted incremental backups to a Storage Box, SFTP, S3-compatible storage or a folder, with restoring of single mailboxes, and updates on a click that go back to the old version if the new one does not start (with the update container of the compose file, or a deploy hook).
Groupware included. Calendars and contacts (CalDAV/CardDAV) that sync to phones and computers, filters, out-of-office replies, shared mailboxes, rooms and equipment, and forwarding and distribution groups.
Easy for mail programs. Thunderbird and Outlook find their settings from the address, Apple devices get a setup file, and each domain can have its own server name for mail programs (
mail.your-domain.com).You see what happens. The start page shows what stands between your server and good delivery and how much mail came in, went out and was turned away.
Related MCP server: email-mcp
What it does not do (yet)
No webmail, and no calendar or contacts in the browser: use any IMAP and CalDAV/CardDAV program, such as Thunderbird, Apple Mail and Calendar, Outlook (over IMAP), or DAVx⁵ on Android. Planned: webmail #13, calendar #31, contacts #32.
No Exchange/ActiveSync (#34).
No virus scanning, no reports from receivers about your mail, no MTA-STS or DANE for outgoing mail (docs/Usage.md).
Quick start
You need:
a server where port 25 is open in both directions: many cloud hosters block outgoing port 25 and unblock it only on request;
the reverse DNS (PTR) of the server's address set to the mail server's name, at your hoster;
a domain you control, to point the mail server's name and the mail records at the server;
Docker with the Compose plugin (or systemd).
docs/Docker.md explains each of these and how to test them. Then:
Point
mail.example.comat the server (Arecord) and fetch the compose file:mkdir ownmail && cd ownmail curl -fsSLO https://raw.githubusercontent.com/ownlabs-dev/ownmail/main/docker-compose.yml printf 'OWNMAIL_HOSTNAME=mail.example.com\nOWNMAIL_ACME_EMAIL=you@example.com\n' > .envStart it and read the one-time setup code from the log:
docker compose up -d docker compose logs ownmail | grep setup_codeOpen
https://mail.example.com/admin, create the first administrator with the code, add your domain and enter the DNS records it shows.
Other ways to run it: systemd,
Coolify, or the image ghcr.io/ownlabs-dev/ownmail
behind your own reverse proxy.
All flags and paths: docs/Reference.md.
Screenshots
|
|
The start page: what needs attention and the mail traffic | A mailbox in the administration |
|
|
The mailbox owner's own page | Dark theme |
AI programs (MCP)
OwnMail speaks the Model Context Protocol in two places:
https://<mail server>/mcp, per mailbox: an AI program (Claude Code, Cursor, claude.ai, ChatGPT, …) can list folders, search and read messages and attachments, flag, move and delete them, save drafts, set the out-of-office reply, and send, reply and forward, with the same rights and sending limits as the person. Connect it with an app password or by signing in and choosing what it may do (read, organise, send).https://<mail server>/api/mcp, for administrators: manage domains, DNS records, mailboxes, forwarding, settings and backups with an access token that can be limited to reading. It never reads mail.
claude mcp add --transport http mail https://mail.example.com/mcp \
--header "Authorization: Bearer <app password>"Details: docs/MCP.md for the administration, docs/Usage.md for mailboxes.
Documentation
Usage: domains and DNS records, mailboxes, forwarding, sharing, filters, mail programs, AI programs, administrators.
Reference: commands, flags and paths.
MCP: the administration for AI programs and scripts.
Groupware and Architecture: how it is built and why.
The full index is docs/README.md.
Status
OwnMail is a young project (current release v0.4.0) and changes quickly. Release versions are computed from Conventional Commits, see docs/Releases.md. Read the release notes before you update, and keep backups.
Contributing
Issues and pull requests are welcome; for bigger changes please open an issue first. How to build, test and run it locally: CONTRIBUTING.md. The rules of the codebase are in AGENTS.md.
Security
Please report vulnerabilities privately as described in SECURITY.md, never in a public issue.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Your IMAP mailbox as an MCP server: read, search and (if you allow it) organize mail. Open source.
Hosted MCP server for Gmail, Outlook, iCloud, Fastmail & Yahoo Mail with per-workspace controls.
Hosted email MCP for your own Gmail, Outlook.com, Microsoft 365, iCloud or IMAP inbox: read, search, draft, reply in thread, forward and file mail. It moves or flags up to 500 messages in one call, and a send leaves exactly one copy in Sent. A calendar is a separate connection, and connecting one adds diary and scheduling tools.
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceMulti-account IMAP/SMTP email MCP server with 22 tools — read, send, search, organize, thread, attachments, and batch operations. Features connection pooling, rate limiting, retry with backoff, and OAuth2 device-code flow. Written in Go.4MIT
- AlicenseAqualityDmaintenanceLocal MCP server for multi-account IMAP/SMTP email (iCloud + Gmail via app-specific passwords). Never marks mail read. Cross-folder search, idempotent sends, TLS verified.8MIT
- AlicenseCqualityAmaintenanceFull-stack email MCP server in Rust: IMAP, SMTP, Exchange Web Services, and Microsoft Graph in one binary, with OAuth2 and multi-account support. Read, search, send, reply, forward, bulk operations, and attachment download to disk.37124MIT
- AlicenseNot gradedqualityBmaintenanceA self-hosted remote MCP server that gives AI assistants read, organize and optional send access to mail, calendars, tasks and contacts across many IMAP, Gmail, CalDAV, CardDAV and Google accounts behind one authenticated endpoint.2Apache 2.0



