email-smtp-imap-mcp — Claude Code MCP server: what it does
email-smtp-imap-mcp — an MCP server for Claude Code and Cursor that connects to multiple inboxes via SMTP and IMAP. Runs on every request to search, send, or read emails.
MIT ★ 25 updated 2026-11-02
claude mcp add --env EMAIL_ACCOUNTS_JSON=<EMAIL_ACCOUNTS_JSON> --env DEFAULT_EMAIL_ACCOUNT=<DEFAULT_EMAIL_ACCOUNT> --transport stdio email-smtp-imap-mcp -- npx -y email-smtp-imap-mcpWhat email-smtp-imap-mcp does
This MCP server manages an unlimited number of work and personal email accounts through a single local integration. The agent uses the tools to search messages, send plain text or HTML, reply, forward, and handle attachments. It connects to Gmail, iCloud Mail, and standard mail servers over SMTP and IMAP protocols. The setup requires credentials and environment variables such as EMAIL_ACCOUNTS_JSON.
The server runs via standard input and output using npx without any hosted relay. Configuration files map out host addresses, ports, and app-specific passwords for each mailbox. Without valid authentication details and environment variables, the server fails to connect to the mail providers.
What it helps with
- search through messages by sender, date, or text
- send plain text and HTML emails with attachments
- reply to messages and forward email threads
- manage folder structures and read statuses
Example prompts for the agent
- List my configured email accounts
- Send a plain-text email from my work account
How to install email-smtp-imap-mcp
Platform CLI
claude mcp add --env EMAIL_ACCOUNTS_JSON=<EMAIL_ACCOUNTS_JSON> --env DEFAULT_EMAIL_ACCOUNT=<DEFAULT_EMAIL_ACCOUNT> --transport stdio email-smtp-imap-mcp -- npx -y email-smtp-imap-mcpReplace <…> with your own values
Platform CLI
codex mcp add email-smtp-imap-mcp --env EMAIL_ACCOUNTS_JSON=<EMAIL_ACCOUNTS_JSON> --env DEFAULT_EMAIL_ACCOUNT=<DEFAULT_EMAIL_ACCOUNT> -- npx -y email-smtp-imap-mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"email-smtp-imap-mcp": {
"command": "npx",
"args": [
"-y",
"email-smtp-imap-mcp"
],
"env": {
"EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>",
"DEFAULT_EMAIL_ACCOUNT": "<DEFAULT_EMAIL_ACCOUNT>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"email-smtp-imap-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"email-smtp-imap-mcp"
],
"env": {
"EMAIL_ACCOUNTS_JSON": "<EMAIL_ACCOUNTS_JSON>",
"DEFAULT_EMAIL_ACCOUNT": "<DEFAULT_EMAIL_ACCOUNT>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e EMAIL_ACCOUNTS_JSON=<EMAIL_ACCOUNTS_JSON> -e DEFAULT_EMAIL_ACCOUNT=<DEFAULT_EMAIL_ACCOUNT> email-smtp-imap-mcp npx -y email-smtp-imap-mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about email-smtp-imap-mcp
How to install email-smtp-imap-mcp in Claude Code?
Run claude mcp add email-smtp-imap-mcp -e EMAIL_ACCOUNTS_JSON=<EMAIL_ACCOUNTS_JSON> -- npx -y email-smtp-imap-mcp in your terminal.
What does email-smtp-imap-mcp do?
It provides AI coding assistants with tools to search, read, send, reply, forward, and organize emails across multiple accounts.
What is needed to run email-smtp-imap-mcp?
You need Node.js, an MCP-compatible client, and valid mailbox credentials provided through environment variables.