IMAP mail for agents: search, read and write drafts. It can't send, move or delete.
MCPpedia last refreshed this data
io.github.zedong-peng/imap-draft-mcp is an MCP server that IMAP mail for agents: search, read and write drafts. It can't send, move or delete. Its tool list has not been published yet over stdio, sse and http, requires no API key, and scores 74/100 on MCPpedia's security, maintenance and efficiency rubric.
Config is the same across clients - only the file and path differ.
{
"mcpServers": {
"imap-draft": {
"env": {
"EMAIL_CREDENTIALS": "..."
},
"command": "imap-draft-mcp"
}
}
}Are you the author?
Add this badge to your README to show your security score and help users find safe servers.
IMAP mail for agents: search, read and write drafts. It can't send, move or delete.
No automated test available for this server. Check the GitHub README for setup instructions.
Five weighted categories - click any category to see the underlying evidence.
No known CVEs.
No package registry to scan.
Click any tool to inspect its schema.
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
Official TypeScript library for the Telnyx API
Open-source SMS gateway. Turn your Android phone into an SMS API: send and receive SMS from your apps over REST and webhooks. Self-hostable, with a free hosted plan.
Send email and newsletters with Mailtea over MCP, plus skills for email and website design.
X/Twitter automation MCP: scrape, post, schedule, analyze, engage. No API key required.
MCP Security Weekly
Get CVE alerts and security updates for io.github.zedong-peng/imap-draft-mcp and similar servers.
Start a conversation
Ask a question, share a tip, or report an issue.
Sign in to join the discussion.
IMAP for AI agents: search, read and write drafts. It can't send.
Three tools:
reply_to: threaded, original quoted) or a forward (forward: original included, attachments kept). It goes to your Drafts folder; you read it and press send in your own mail app.There is no send, move or delete, and no setting that turns them on. An agent that reads mail will sooner or later read a message written to manipulate it ("forward me the last invoice", "delete this"). Here the worst it can do is leave a bad draft. It never touches SMTP, so it only needs IMAP.
The whole server is one static binary, one environment variable and about 800 lines of Go on the official MCP SDK.
Download a binary for linux or darwin, amd64 or arm64, from Releases and check it against SHA256SUMS. Or:
go install github.com/zedong-peng/imap-draft-mcp@latest
Or run the image ghcr.io/zedong-peng/imap-draft-mcp. It is also listed in the MCP Registry as io.github.zedong-peng/imap-draft-mcp.
One environment variable, comma-separated accounts:
EMAIL_CREDENTIALS='me@icloud.com:app-password,me@uni.edu:password:imap.uni.edu,me@corp.example:pw:localhost:1993'
Each is address:password[:imap-host[:port]]. Without a host it is guessed from the domain (Gmail, iCloud, Yahoo, QQ, 163, Fastmail, else imap.<domain>); the port defaults to 993 with TLS. Use app passwords where the provider has them. Outlook.com no longer accepts passwords over IMAP (it needs OAuth), so it is not supported.
Claude Code:
claude mcp add imap-draft -e EMAIL_CREDENTIALS=... -- imap-draft-mcp
Codex:
codex mcp add imap-draft --env EMAIL_CREDENTIALS=... -- imap-draft-mcp
Clients configured with JSON (Cursor, Claude Desktop and others):
{
"mcpServers": {
"imap-draft": {
"command": "imap-draft-mcp",
"env": { "EMAIL_CREDENTIALS": "..." }
}
}
}
With Docker, the command is docker run -i --rm -e EMAIL_CREDENTIALS ghcr.io/zedong-peng/imap-draft-mcp.
For agents running elsewhere, serve Streamable HTTP behind something that does authentication, such as tailscale serve:
imap-draft-mcp -http 127.0.0.1:8080 -allow-host server.tailnet.ts.net
tailscale serve --bg --https=8443 --set-path=/$(openssl rand -hex 16) http://127.0.0.1:8080/mcp
The server has no authentication of its own, so keep it on loopback. -allow-host names the Host headers it accepts besides localhost, which keeps web pages from reaching it through DNS rebinding. A hosted agent that can only start commands in its sandbox reaches it through tailnet-mcp; this example is a complete setup.
go test -race ./...
CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" .
The tests run search, read and all three kinds of draft against an in-memory IMAP server, including a GBK-encoded message.