Sandbox
@Wh1isper/mcp-email-server

MCP email server for IMAP and SMTP

This repo provides an MCP server that lets an agent read, search, organize, and send email through IMAP and SMTP. It includes a local setup UI, a stdio transport for MCP clients, and support for multiple accounts and managed storage.

324 stars122 forksPythonUpdated 9d ago
Who it's for

Builders who want Claude Code, Codex, Cursor, or another MCP client to handle email work.

What it delivers

You can let your agent inspect and act on email from your normal MCP setup instead of copying messages by hand.

What it does

Read and search mail

Lets the agent list accounts and look through messages across connected mailboxes.

Organize messages and mailboxes

Supports mailbox operations for keeping email structured, not just read-only access.

Send email

Uses SMTP so the agent can compose and send messages, not only fetch them.

Multi-account support

Handles more than one email account in the same server setup.

Local setup UI

Includes a browser-based configuration flow for setting up accounts and reviewing imports.

MCP client transport

Provides stdio so the server can be wired into an MCP client configuration.

How to get it

  1. 1From this source checkout, run the configuration UI with uv
    uv sync
    uv run mcp-email-server ui

README

mcp-email-server

Release Build status codecov License

An MCP server for reading, searching, organizing, and sending email through IMAP and SMTP.

[!NOTE] Version 1.0.0 introduces Local Email App V2. Updating the package does not automatically import existing settings created with PyPI 0.16.0 and earlier: they remain active in backward-compatible legacy mode, so there is no required migration. If you would like to use the new managed storage, you can review and import those settings whenever it is convenient.

mcp-email-server supports Windows, macOS, and Linux. See Security for platform-specific filesystem and credential storage details.

Optional migration for existing installations

An @latest release that includes Local Email App V2 offers a preview-first CLI migration:

uvx mcp-email-server@latest config init \
  --database ~/.config/mcp-email-server/managed.sqlite3
uvx mcp-email-server@latest config import-legacy
uvx mcp-email-server@latest config import-legacy --apply
uvx mcp-email-server@latest config doctor

The apply step displays the plan again and asks for IMPORT confirmation. A complete import selects managed mode; otherwise the existing legacy settings remain selected. The source TOML file and its legacy keyring entries are left untouched. You can also run uvx mcp-email-server@latest ui and choose Import existing settings. After a successful import, restart running MCP clients. See the detailed upgrade guidance and import troubleshooting.

Quick start

1. Configure an email account

From this source checkout, run the configuration UI with uv:

uv sync
uv run mcp-email-server ui

For a published release whose notes state that it includes Local Email App V2, uvx mcp-email-server@latest ui is the equivalent temporary invocation.

Keep the foreground command running. On a truly empty installation, the authenticated browser session prepares private account storage at the safe local default; existing TOML or environment configuration instead offers an explicit import review while the previous settings keep running. The account-first UI has only Email accounts and Settings & help as primary destinations. Start with the email address and password; the UI fills common connection settings from the email domain and keeps them editable, while outgoing mail remains optional. A saved complete account is ready without a separate activation step. Use Password & test on the saved account if desired, then restart the MCP client to apply the selected settings.

2. Configure the MCP client

Use the same V2-capable distribution for stdio as for the UI. For a published V2 release, add the following server definition to the MCP client:

{
  "mcpServers": {
    "mcp-email-server": {
      "command": "uvx",
      "args": ["mcp-email-server@latest", "stdio"]
    }
  }
}

Restart the MCP client after updating its configuration. When testing this source checkout before publication, invoke uv run --directory /absolute/path/to/mcp-email-server mcp-email-server stdio instead of pairing a managed catalog with PyPI @latest.

3. Verify the connection

Ask the client to list the configured email accounts or recent messages.

Other configuration methods

For the SQLite-backed managed CLI workflow, Windows and POSIX storage boundaries, headless environments, multiple accounts, custom TLS settings, and environment-variable configuration, see the documentation. Release 1.6.2 and later also publish Linux amd64/arm64 images at ghcr.io/wh1isper/mcp-email-server; see the container instructions.

Documentation

Development

See CONTRIBUTING.md.

License

This project is licensed under the terms of the LICENSE.

Files in the repo

Repository payload30 top-level entries
  • .agents
  • .claude-plugin
  • .github
  • .vscode
  • dev
  • docs
  • frontend
  • mcp_email_server
  • plugins
  • spec
  • tests
  • .dockerignore
  • .editorconfig
  • .gitattributes
  • .gitignore
  • .pre-commit-config.yaml
  • .python-version
  • AGENTS.md
  • CLAUDE.md
  • codecov.yaml
  • CONTRIBUTING.md
  • Dockerfile
  • FUNDING.yml
  • LICENSE
  • Makefile
  • mkdocs.yml
  • pyproject.toml
  • pytest.ini
  • README.md
  • uv.lock

Discussion (0)

Ask about usage, or say what you built with it

Sign in to join the discussion.

No comments yet. Be the first to say what this is good for.

More connectors

Real-time global intelligence dashboard. AI-powered news aggregation, geopolitical monitoring, and infrastructure tracking in a unified situational awareness interface

86k

Universal provider proxy for OpenAI Codex & Claude Code — use any LLM (Claude, Gemini, Grok, DeepSeek, Ollama…) with Codex CLI, App, SDK, and Claude Code

14k
noskillish/
bankmcp

BankMCP™: your AI can now read your bank. Self-hosted, read-only MCP server for your own bank accounts via open banking (Enable Banking). Standard MCP; tested with Claude and Ollama.

177

Open-source auth gateway connecting 1400+ SaaS providers to AI agents through SDK, CLI, MCP, HTTP, and OpenAPI.

5.7k

Open-source 3D architectural editor with a local CLI, MCP tools, and practical workflows for humans and AI agents.

23k
cinderline/
northcinder

Open-source MCP server for comparing products and asking the buyer before purchase.

1.2k