Config is the same across clients — only the file and path differ.
{
"mcpServers": {
"email": {
"env": {
"IMAP_HOST": "imap.example.com",
"IMAP_PASS": "your-app-password",
"IMAP_USER": "you@example.com",
"SMTP_HOST": "smtp.example.com"
},
"args": [
"-y",
"@aiwerk/mcp-server-imap"
],
"command": "npx"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
IMAP/SMTP MCP server that works with any email provider. Set host, user, pass — done.
Run this in your terminal to verify the server starts. Then let us know if it worked — your result helps other developers.
npx -y '@aiwerk/mcp-server-imap' 2>&1 | head -1 && echo "✓ Server started successfully"
After testing, let us know if it worked:
Five weighted categories — click any category to see the underlying evidence.
No known CVEs.
Checked @aiwerk/mcp-server-imap against OSV.dev.
Be the first to review
Have you used this server?
Share your experience — it helps other developers decide.
Sign in to write a review.
Others in communication
Asynchronous coordination layer for AI coding agents: identities, inboxes, searchable threads, and advisory file leases over FastMCP + Git + SQLite
A Model Context Protocol (MCP) server for interacting with Microsoft 365 and Office services through the Graph API
PubNub Model Context Protocol MCP Server for Cursor and Claude
MCP Security Weekly
Get CVE alerts and security updates for io.github.AIWerk/mcp-server-imap and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
IMAP/SMTP MCP server that works with any email provider. Set host, user, pass — done.
Unlike Gmail-only or Outlook-only MCP servers, this one speaks standard IMAP/SMTP — so it works with every email provider out of the box.
Most email MCP servers only work with one provider (Gmail, Outlook). This one works with any provider that supports IMAP:
One server, every mailbox.
IMAP_HOST, IMAP_USER, IMAP_PASS and you're connectedSMTP_SEND_ENABLED=false). Your AI agent can read emails but can't send anything until you explicitly opt inemail_send and email_reply are local-onlyIf you use this server through the AIWerk hosted service at aiwerkmcp.com, the two outgoing-mail tools are not exposed:
email_sendemail_replyThe other 8 read-side tools (email_list, email_read, email_search, email_folders, email_flag, email_move, email_delete, email_attachment) work normally on the hosted service.
Why? The hosted service shares an IP across all users. If outgoing mail went out from that shared IP, the IP would appear in every recipient's Received: headers — one bad actor could damage deliverability for every user. There is no shared-IP architecture where arbitrary user sends works safely.
How to send mail then? Run the server locally, where outgoing mail goes from your own IP and your own provider reputation. Three paths:
npx -y @aiwerk/mcp-server-imap with your IMAP_* and SMTP_* env vars including SMTP_SEND_ENABLED=true.@aiwerk/mcp-bridge — npx -y @aiwerk/mcp-bridge install imap-email --catalog aiwerkmcp.com, then point your client at the local bridge endpoint.In all three cases the mail goes from your home / office IP, not from the hosted service.
Note: On the AIWerk hosted service, the
email_sendandemail_replyMCP tools are not exposed (the service shares an IP across all users, so allowing arbitrary sends would risk every user's deliverability). Use any of the three paths below to send email locally.
Need to send a single email from the command line — for example, to deliver a draft your AI agent composed? Use aiwerk-send-email:
SMTP_HOST=smtp.gmail.com \
SMTP_PORT=587 \
SMTP_USER=me@gmail.com \
SMTP_PASS='app-password' \
SMTP_FROM='Me <me@gmail.com>' \
npx -y @aiwerk/mcp-server-imap aiwerk-send-email \
--to "alice@example.com" \
--subject "Re: invoice" \
--body "Got it, will pay Monday."
On success, exits 0 and prints JSON: {"ok":true,"messageId":"...","envelope":{...}}
On failure, exits 1 with the error on stderr. Credentials are never printed.
| Argument | Required | Description |
|---|---|---|
--to | Yes | Recipient(s), comma-separated |
--subject | Yes | Subject line |