Skip to content
MCP server

Email Smtp Imap MCP

Local MCP server to search, read, send and organise email across many SMTP/IMAP accounts

Runs locally

Email Smtp Imap MCP is an open-source MCP server for communication. It runs locally on your machine and is started by your AI client.

Pricing
Open source
Platforms
CLI, Self-hosted, macOS
Runs
Locally
What it can do
Can change data (2 tools)
Access
Needs a secret key or token

Similar MCP servers

Install

Add with the CLI

Run in a terminal

claude mcp add email-smtp-imap-mcp --env EMAIL_ACCOUNTS_JSON='<EMAIL_ACCOUNTS_JSON>' -- npx -y email-smtp-imap-mcp

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

Or share it with your project

Add to .mcp.json

{
  "mcpServers": {
    "email-smtp-imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-smtp-imap-mcp"
      ],
      "env": {
        "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "email-smtp-imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-smtp-imap-mcp"
      ],
      "env": {
        "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
      }
    }
  }
}

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "email-smtp-imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-smtp-imap-mcp"
      ],
      "env": {
        "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
      }
    }
  }
}

Use .cursor/mcp.json in a project to share it with the project.

Cursor setup guide

Add to ~/.copilot/mcp-config.json

{
  "mcpServers": {
    "email-smtp-imap-mcp": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "email-smtp-imap-mcp"
      ],
      "env": {
        "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
      }
    }
  }
}

Or put the same entry in .mcp.json at your workspace root to share it.

VS Code setup guide

Add with the CLI

Run in a terminal

codex mcp add email-smtp-imap-mcp --env EMAIL_ACCOUNTS_JSON='<EMAIL_ACCOUNTS_JSON>' -- npx -y email-smtp-imap-mcp

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.email-smtp-imap-mcp]
command = "npx"
args = ["-y", "email-smtp-imap-mcp"]
env = { EMAIL_ACCOUNTS_JSON = "<EMAIL_ACCOUNTS_JSON>" }

Codex setup guide

Add to your client's MCP settings (most use this shape)

{
  "mcpServers": {
    "email-smtp-imap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "email-smtp-imap-mcp"
      ],
      "env": {
        "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e EMAIL_ACCOUNTS_JSON='<EMAIL_ACCOUNTS_JSON>' email-smtp-imap-mcp npx -- -y email-smtp-imap-mcp

    Antigravity

    Add to ~/.gemini/config/mcp_config.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Use .agents/mcp_config.json to add it to one workspace only.

    Gemini CLI and Antigravity setup guide

  • Devin Desktop (formerly Windsurf)

    Add to ~/.config/devin/mcp_config.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.

    Devin Desktop setup guide

  • Cline

    Add to cline_mcp_settings.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Open it from the MCP Servers icon → Configure → Configure MCP Servers.

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Open it with zed: open settings file. Merge context_servers into the settings you already have.

    Zed setup guide

  • JetBrains AI Assistant and Junie

    AI Assistant

    Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    The AI Assistant docs only show command and args. If the env block is ignored, use Junie for this server.

    Junie

    Add to ~/.junie/mcp/mcp.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Use .junie/mcp/mcp.json to share it with a project.

    JetBrains AI Assistant and Junie setup guide

  • Kiro

    Add to ~/.kiro/settings/mcp.json

    {
      "mcpServers": {
        "email-smtp-imap-mcp": {
          "command": "npx",
          "args": [
            "-y",
            "email-smtp-imap-mcp"
          ],
          "env": {
            "EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>"
          }
        }
      }
    }

    Use .kiro/settings/mcp.json to add it to one workspace only.

    Kiro setup guide

Using several servers? Build one config file with the MCP config generator.

Configuration

  • EMAIL_ACCOUNTS_JSONJSON object keyed by account name with SMTP and IMAP settings and credentials; see the repository setup guide.Required
  • DEFAULT_EMAIL_ACCOUNTDefault account name from EMAIL_ACCOUNTS_JSON; optional when the first account should be used.

About Email Smtp Imap MCP

Everything is configured through one JSON value, EMAIL_ACCOUNTS_JSON, which holds any number of named accounts with their SMTP and IMAP hosts and credentials. Tools take an optional account_name; leave it out and the server uses the default account or the first one listed. A single-account setup can use plain SMTP_* and IMAP_* variables instead.

The server runs locally over stdio, with no hosted relay. Both connections require TLS 1.2 or newer and a valid certificate, and when secure is false STARTTLS is mandatory before authentication, so plaintext-only relays are not supported. The README gives settings for Gmail and iCloud Mail, which use app passwords, and says any standard provider works.

Six tools cover the everyday mailbox: listing accounts without exposing credentials, finding messages, sending with attachments, replying or forwarding by UID, changing flags or folders, and listing folders with counts. It is MIT licensed and published on npm.

Tools this server provides (6)

Taken from the project documentation; the running server may differ.

From the tool list in its README, going by the names, 2 of 6 tools change data; 1 name doesn't say.

From the server's own tool labels and tool names; not verified by us.

accounts_listName suggests: reads
List every configured account and identify the default without exposing credentials.
emails_findName suggests: reads
Search by text, sender, recipient, subject, date, read state, flag state or attachments.
email_sendName suggests: changes
Send plain-text or HTML email with CC, BCC, sender aliases and base64 attachments.
email_respond
Reply, reply-all or forward by email UID with threading.
emails_modifyName suggests: changes
Mark read or unread, flag or unflag, or move messages to another folder.
folders_listName suggests: reads
List folders with optional total and unread counts.

What it does

Unlimited named accounts
Add work, personal or client inboxes and switch between them with an account name.
Advanced message search
Filter by text, sender, recipient, subject, date, read or flag state, and attachments.
Send with attachments
Send plain-text or HTML mail with CC, BCC, sender aliases and base64 attachments.
Reply and forward by UID
Reply, reply-all or forward with threading and optional original attachments.
Flag and move messages
Mark read or unread, flag, unflag or move messages to another folder.
Enforced TLS
Connections need TLS 1.2 or newer and a valid certificate, with mandatory STARTTLS when not using implicit TLS.

Good for

  • Triage unread mail across several inboxes from one chat
  • Draft and send replies from a chosen sender alias
  • Forward a message with its attachments to a colleague
  • Review folder unread counts for a client mailbox
  • Archive or flag messages matching a search

Pricing

Open source

MIT licence

More servers for the same service

Email Smtp Imap MCP FAQ

Is there a limit on how many accounts I can add?

No. The README says there is no application-level account-count limit.

Does Email Smtp Imap MCP work with Gmail or iCloud?

Yes, using an app password or app-specific password with the provider's SMTP and IMAP hosts.

How does the server get my credentials?

From the EMAIL_ACCOUNTS_JSON variable, either in an .env file referenced by EMAIL_ENV_FILE or set directly in the client's env block.

Does Email Smtp Imap MCP need a hosted service?

No. It runs locally over stdio, with no hosted relay or control panel.

Is Email Smtp Imap MCP free?

Yes. Email Smtp Imap MCP is open source, so you can use and self-host it for free.

How do I add Email Smtp Imap MCP to Claude Code?

Run this command in your terminal: claude mcp add email-smtp-imap-mcp --env EMAIL_ACCOUNTS_JSON='<EMAIL_ACCOUNTS_JSON>' -- npx -y email-smtp-imap-mcp

What are the best alternatives to Email Smtp Imap MCP?

The closest alternatives to Email Smtp Imap MCP are TrendRadar, Ha MCP, Concord MCP, TryPost and Open Sunsama.

Where this comes from

  • Description: written from the project's README.
  • Install steps: from the official MCP Registry entry.

How AIPoweredBot checks servers