Open source, AGPL-3.0

Run MCP Emails yourself.

The same MCP server that powers mcpemails.com, on your own machine, against your own database. Your mailbox credentials never leave infrastructure you control. They are encrypted with a key only you hold and decrypted only in your container, at the moment a tool call needs them.

The whole thing in one command

git clone https://github.com/Albretsen/MCPEmails
cd MCPEmails/self-host
make setup && make up

Four small containers (Postgres, PostgREST, nginx, the Deno server). No account, no keys held by us, no telemetry. It runs supabase/functions/mcp-server unmodified: the exact code behind the hosted product.

Your inbox never leaves your box.

Connect Fastmail, iCloud, Yahoo, Zoho, Yandex, or any IMAP/SMTP mailbox with an app password. Email is fetched live and never stored. Credentials are encrypted at rest with AES-256-GCM using a key you generate and keep. There is nothing to phone home to.

Self-host vs hosted

The full MCP server and all ten tools are in both. Self-hosting trades managed convenience for total control.

Giving an AI your inbox, safely

The concern is legitimate. Here is how the design bounds it, self-hosted or not.

  • Least-privilege by design. Every API key is scoped: grant read only, or send without delete. Destructive actions require an explicit delete scope.
  • Prompt injection is bounded, not hand-waved. A hostile email can try to instruct the agent. Per-key scopes cap the blast radius: a key that cannot send cannot be tricked into sending.
  • Credentials are encrypted at rest with AES-256-GCM. When you self-host, the encryption key is yours and no one else's.
  • Verify, don't trust. The code is public under AGPL-3.0, and the hosted version runs it unmodified. Read it, then decide.

Self-hosting is a real commitment.

You run the IMAP/SMTP configuration, updates, and security yourself, and support is community-only. Gmail and Outlook one-click OAuth and the web dashboard stay on the hosted product, because they need OAuth secrets and a session layer a single-operator install does not. If you would rather not run infrastructure, the hosted plan is two minutes and free to start.

Use the hosted version · AGPL-3.0

Run it yourself, or let us run it.

Same server either way. Your call on who holds the keys.