Mcp Server Imap — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited Mcp Server Imap (Agent Skill) and scored it 100/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 0 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 0 flagged
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
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.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, theemail_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 \
[email protected] \
SMTP_PASS='app-password' \
SMTP_FROM='Me <[email protected]>' \
npx -y @aiwerk/mcp-server-imap aiwerk-send-email \
--to "[email protected]" \
--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 |
--body | One of body/html | Plain-text body |
--html | One of body/html | HTML body (both → multipart) |
--in-reply-to | No | Message-ID of original message (thread preservation) |
--references | No | Space-separated reference IDs |
--cc | No | CC recipients, comma-separated |
--bcc | No | BCC recipients, comma-separated |
| Variable | Required | Default | Description |
|---|---|---|---|
SMTP_HOST | Yes | — | SMTP server hostname |
SMTP_PORT | Yes | — | 587 for STARTTLS, 465 for implicit TLS |
SMTP_USER | Yes | — | SMTP username / email address |
SMTP_PASS | Yes | — | Password or app-specific password |
SMTP_FROM | Yes | — | Sender address (Name <email> or plain email) |
SMTP_TLS | No | false | true for implicit TLS (port 465); false for STARTTLS (port 587) |
Three ways to get email tools — pick the one that fits.
1. Quick (single email) — aiwerk-send-email CLI above: no MCP client needed, one command sends one email.
2. Direct stdio MCP server — all 10 email tools exposed to your AI agent:
npx -y @aiwerk/mcp-server-imap3. Local bridge with catalog UX — install via the AIWerk catalog for a guided setup:
npx -y @aiwerk/mcp-bridge install imap-email --catalog bridge.aiwerk.chNo local runtime, no env vars on your machine — credentials are AES-256-GCM encrypted server-side via HashiCorp Vault.
https://bridge.aiwerk.ch/u/<your-user-id>/mcpwith your Bearer token.
All 10 tools appear immediately. Install other AIWerk recipes from the same bridge.
Run directly — you manage the credentials:
IMAP_HOST="imap.example.com" \
IMAP_USER="[email protected]" \
IMAP_PASS="app-password" \
SMTP_HOST="smtp.example.com" \
npx @aiwerk/mcp-server-imapThe server starts immediately and responds to tools/list even without credentials — they're only required when a tool is actually called (lazy credentials).
| Tool | Purpose |
|---|---|
email_list | List emails from a folder |
email_read | Read a single message with full body |
email_search | Search by from/to/subject/date/unread |
email_folders | List all folders with message counts |
email_move | Move messages between folders |
email_flag | Set read/star/flag status |
email_delete | Move messages to Trash |
email_send | Send a new email (requires opt-in) |
email_reply | Reply to a message (requires opt-in) |
email_attachment | List or download attachments |
Add to claude_desktop_config.json:
{
"mcpServers": {
"email": {
"command": "npx",
"args": ["-y", "@aiwerk/mcp-server-imap"],
"env": {
"IMAP_HOST": "imap.example.com",
"IMAP_USER": "[email protected]",
"IMAP_PASS": "your-app-password",
"SMTP_HOST": "smtp.example.com"
}
}
}
}Same config format in the respective MCP settings.
If you want zero-setup, install via aiwerkmcp.com — see Option 1 above.
| Variable | Default | Description |
|---|---|---|
IMAP_HOST | — | IMAP server hostname |
IMAP_USER | — | Email address or username |
IMAP_PASS | — | Password or app-specific password |
IMAP_PORT | 993 | IMAP port |
IMAP_TLS | true | Use TLS |
IMAP_TIMEOUT | 30000 | Connection timeout (ms) |
| Variable | Default | Description |
|---|---|---|
SMTP_HOST | ${IMAP_HOST} | SMTP server hostname |
SMTP_PORT | 465 | SMTP port |
SMTP_USER | ${IMAP_USER} | SMTP username |
SMTP_PASS | ${IMAP_PASS} | SMTP password |
SMTP_TLS | true | Use TLS |
SMTP_FROM | ${IMAP_USER} | Sender address |
SMTP_SEND_ENABLED | false | Must be `true` to enable sending |
| Variable | Default | Description |
|---|---|---|
IMAP_DEBUG | false | Verbose IMAP protocol logging |
SMTP_SEND_ENABLED=true to enable.env or a secret manager — never commit them to gitTested with: Hostpoint, Gmail (app password), Outlook/Microsoft 365, Yahoo Mail, Fastmail, Dovecot, Postfix.
Works with any standards-compliant IMAP/SMTP server.
git clone https://github.com/AIWerk/mcp-server-imap
cd mcp-server-imap
npm install
npm run build
node dist/server.jsIssues and PRs are welcome! Please open an issue first for larger changes.
See CHANGELOG.md for version history.
Part of the [AIWerk MCP platform](https://aiwerkmcp.com) — curated, signed MCP recipes served either as npm packages for self-hosting or through our multi-tenant hosted service at aiwerkmcp.com.
Other AIWerk MCP servers:
Browse the full catalog (20+ recipes including GitHub, Linear, Notion, Stripe, …) at aiwerkmcp.com.
MIT — AIWerk
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.