Skip to content
MCP server

Email (IMAP/SMTP)

Read, search, draft and send mail over IMAP and SMTP for iCloud, Gmail, Yahoo and Outlook

Runs locally

Email (IMAP/SMTP) 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
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 mcp-server-email-imap --env EMAIL_IMAP_EMAIL='<EMAIL_IMAP_EMAIL>' --env EMAIL_IMAP_PASSWORD='<EMAIL_IMAP_PASSWORD>' -- npx -y @mindstone/mcp-server-email-imap

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": {
    "mcp-server-email-imap": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-email-imap"
      ],
      "env": {
        "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
        "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
      }
    }
  }
}

Claude Code setup guide

Add to claude_desktop_config.json

{
  "mcpServers": {
    "mcp-server-email-imap": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-email-imap"
      ],
      "env": {
        "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
        "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
      }
    }
  }
}

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

Claude Desktop setup guide

Add to ~/.cursor/mcp.json

{
  "mcpServers": {
    "mcp-server-email-imap": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-email-imap"
      ],
      "env": {
        "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
        "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
      }
    }
  }
}

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

Cursor setup guide

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

{
  "mcpServers": {
    "mcp-server-email-imap": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-email-imap"
      ],
      "env": {
        "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
        "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
      }
    }
  }
}

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 mcp-server-email-imap --env EMAIL_IMAP_EMAIL='<EMAIL_IMAP_EMAIL>' --env EMAIL_IMAP_PASSWORD='<EMAIL_IMAP_PASSWORD>' -- npx -y @mindstone/mcp-server-email-imap

Or add to config.toml

Add to ~/.codex/config.toml

[mcp_servers.mcp-server-email-imap]
command = "npx"
args = ["-y", "@mindstone/mcp-server-email-imap"]
env = { EMAIL_IMAP_EMAIL = "<EMAIL_IMAP_EMAIL>", EMAIL_IMAP_PASSWORD = "<EMAIL_IMAP_PASSWORD>" }

Codex setup guide

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

{
  "mcpServers": {
    "mcp-server-email-imap": {
      "command": "npx",
      "args": [
        "-y",
        "@mindstone/mcp-server-email-imap"
      ],
      "env": {
        "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
        "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
      }
    }
  }
}
  • Gemini CLI and Antigravity

    Gemini CLI

    Add to ~/.gemini/settings.json

    {
      "mcpServers": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    Or run: gemini mcp add -s user -e EMAIL_IMAP_EMAIL='<EMAIL_IMAP_EMAIL>' -e EMAIL_IMAP_PASSWORD='<EMAIL_IMAP_PASSWORD>' mcp-server-email-imap npx -- -y @mindstone/mcp-server-email-imap

    Antigravity

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

    {
      "mcpServers": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

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

    Cline setup guide

  • Zed

    Add to Zed settings.json

    {
      "context_servers": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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": {
        "mcp-server-email-imap": {
          "command": "npx",
          "args": [
            "-y",
            "@mindstone/mcp-server-email-imap"
          ],
          "env": {
            "EMAIL_IMAP_EMAIL": "<EMAIL_IMAP_EMAIL>",
            "EMAIL_IMAP_PASSWORD": "<EMAIL_IMAP_PASSWORD>"
          }
        }
      }
    }

    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_IMAP_EMAILEmail addressRequired
  • EMAIL_IMAP_PASSWORDApp-specific passwordRequired
  • EMAIL_IMAP_PROVIDERProvider — icloud, gmail, yahoo, outlook, or custom (auto-detected from email domain if unset)
  • EMAIL_IMAP_IMAP_HOSTCustom IMAP host (for provider=custom)
  • EMAIL_IMAP_SMTP_HOSTCustom SMTP host (for provider=custom)
  • EMAIL_IMAP_IMAP_PORTCustom IMAP port
  • EMAIL_IMAP_SMTP_PORTCustom SMTP port
  • EMAIL_IMAP_MAX_RECIPIENTSSafety cap: maximum combined To+CC+BCC recipients per email_send call. Defaults to 25; raising bypasses spam-prevention guardrails against prompt-injection-driven mass sends.
  • EMAIL_IMAP_RATE_LIMIT_PER_HOURSafety cap: maximum email_send calls per rolling window. Defaults to 50; protects against runaway sends when injection content escapes the LLM's intent.
  • EMAIL_IMAP_RATE_LIMIT_WINDOW_MSSliding-window length for the rate limit (ms)
  • MCP_WORKSPACE_PATHWorkspace directory that email_get_attachment downloads into (fresh email-imap-attachment-* staging directories). Defaults to the system temp directory.

About Email (IMAP/SMTP)

This connector talks directly to mail servers with an app-specific password rather than OAuth. It recognises iCloud, Gmail, Yahoo and Outlook or Microsoft 365 from the address domain, and accepts custom IMAP and SMTP hosts and ports; if the domain is unknown it refuses to start instead of guessing a provider.

Sending has built-in brakes against prompt-injection mass mailing. email_send is capped at 25 recipients per call and 50 sends per rolling hour by default, returning structured errors with a retry time when exceeded. Raising those limits bypasses the guardrails, as the settings note. Attachments are downloaded into a private staging directory under a workspace path, and outbound attachments may be read only from inside it.

The README lists 17 tools across mailbox, message, draft and send operations, and configure_email_imap can switch accounts inside a running server. It needs Node.js 20 or newer and ships as an npm package from the Mindstone mcp-servers collection.

Tools this server provides (5)

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

From the tool list in its README, going by the names, 2 of 5 tools change data; 2 names don't say.

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

email_sendName suggests: changes
Sends an email, subject to recipient and rate caps.
email_get_attachmentName suggests: reads
Downloads an attachment into a staging directory.
email_save_draft
Saves a draft.
email_update_draftName suggests: changes
Updates an existing draft.
configure_email_imap
Switches accounts inside a running server.

What it does

Major providers
iCloud, Gmail, Yahoo, Outlook and custom IMAP hosts.
Provider auto-detection
Chooses a provider from the email domain, or refuses to start.
Send caps
Default 25 recipients per send and 50 sends per hour.
Draft management
Save and update drafts as well as send.
Attachment staging
Downloads go to a private directory under a workspace path.
Account switching
configure_email_imap changes accounts without a restart.

Good for

  • Search and summarise an iCloud inbox from an assistant
  • Draft replies and save them for review
  • Fetch an attachment into a workspace folder
  • Limit the damage of an injected send instruction

Pricing

Open source

More servers for the same service

Email (IMAP/SMTP) FAQ

How does Email (IMAP/SMTP) authenticate?

With an app-specific password in EMAIL_IMAP_PASSWORD, plus your address in EMAIL_IMAP_EMAIL.

What are the send limits?

25 combined recipients per call and 50 email_send calls per hour by default, both adjustable.

Can Email (IMAP/SMTP) use plain-text ports?

Yes, ports 143 and 25 are allowed if configured; the README says the host owns that decision.

What does Email (IMAP/SMTP) need to run?

Node.js 20 or newer.

Is Email (IMAP/SMTP) free?

Yes. Email (IMAP/SMTP) is open source, so you can use and self-host it for free.

How do I add Email (IMAP/SMTP) to Claude Code?

Run this command in your terminal: claude mcp add mcp-server-email-imap --env EMAIL_IMAP_EMAIL='<EMAIL_IMAP_EMAIL>' --env EMAIL_IMAP_PASSWORD='<EMAIL_IMAP_PASSWORD>' -- npx -y @mindstone/mcp-server-email-imap

What are the best alternatives to Email (IMAP/SMTP)?

The closest alternatives to Email (IMAP/SMTP) are TrendRadar, TryPost, Discord MCP, Gmail MCP and Getmitra.

Where this comes from

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

How AIPoweredBot checks servers