
How to add Email MCP Server (IMAP/SMTP) to Cursor
Provider-agnostic email MCP over IMAP/SMTP — read, search and send from any mailbox Paste the config into ~/.cursor/mcp.json and restart Cursor.
Last updated June 15, 2026 · 254★ · stdio · apikey
Cursor config for Email MCP Server (IMAP/SMTP)
uvx mcp-email-server@latest stdio{
"mcpServers": {
"email-mcp-server-imap-smtp": {
"command": "uvx",
"args": [
"mcp-email-server@latest",
"stdio"
]
}
}
}Requires `uv` (the Python package runner). Install it from https://docs.astral.sh/uv/ if `uvx` is not found.
Setup steps
- 1Open Cursor → Settings → MCP → Add new MCP server (or edit ~/.cursor/mcp.json directly).
- 2Paste the Email MCP Server (IMAP/SMTP) config below into the "mcpServers" object.
- 3Fill in placeholder secrets, then save.
- 4Cursor reloads MCP servers automatically — check Settings → MCP for a green status dot.
- 5Ask Cursor to use one of Email MCP Server (IMAP/SMTP)'s tools to confirm it's connected.
Before you start
- Python 3.10+ with the uv package manager (or use the prebuilt Docker image ghcr.io/ai-zerolab/mcp-email-server)
- IMAP server details for reading: host, port, SSL/STARTTLS settings
- SMTP server details for sending (optional — omit to run read-only): host, port, SSL/STARTTLS settings
- Mailbox credentials: email address, username, and password. For Gmail or other 2FA providers, generate an app-specific password rather than using your account password
- For ProtonMail, run ProtonMail Bridge locally and point IMAP/SMTP at it
What Email MCP Server (IMAP/SMTP) can do in Cursor
get_emails_contentRead, list, search and page through messages from a configured IMAP account
send_emailCompose and send a message over SMTP (hidden when SMTP is not configured)
download_attachmentDownload a message attachment to local disk (when attachment download is enabled)
save_to_mailboxSave a message into an IMAP folder, e.g. the Sent folder after sending
Security
Stores mailbox usernames and passwords (or app passwords) in a plaintext TOML config (~/.config/zerolib/mcp_email_server/config.toml) or env vars — use provider app-passwords rather than your primary password and protect that file. Omit the SMTP host to keep an account strictly read-only.
Email MCP Server (IMAP/SMTP) + Cursor FAQ
Where is the Cursor config file?
Cursor reads MCP servers from ~/.cursor/mcp.json. Paste the Email MCP Server (IMAP/SMTP) config there under the "mcpServers" key and restart the client.
Is Email MCP Server (IMAP/SMTP) safe to use with Cursor?
Stores mailbox usernames and passwords (or app passwords) in a plaintext TOML config (~/.config/zerolib/mcp_email_server/config.toml) or env vars — use provider app-passwords rather than your primary password and protect that file. Omit the SMTP host to keep an account strictly read-only.
Which email providers does it support?
Any provider that speaks standard IMAP and SMTP. Gmail and ProtonMail (via Bridge) are documented examples, but Fastmail, Outlook/Exchange over IMAP, and self-hosted servers all work.
How do I authenticate with Gmail?
Use an app-specific password generated in your Google account rather than your normal password, since Gmail blocks basic-auth logins on accounts with 2FA. There is no OAuth flow — it logs in with username/password over IMAP/SMTP.
Can I run it read-only?
Yes. Configure only the IMAP settings and leave SMTP unset; the send and compose tools are then hidden so the agent can only read and search mail.