Skip to content

imap-mcpYour mailbox as tools, without a way to send

Find the mail, read it, file it — every message fenced as untrusted content, and the write tools off unless you turn them on

How imap-mcp sits between an MCP client and a mailboxAn MCP client speaks stdio to imap-mcp, which connects to an IMAP server over TLS; message bodies come back fenced as untrusted content.MCP clientClaude, Codex, …imap-mcp11 toolsasks a personIMAPany IMAP mailboxstdioIMAPTLSThis server never sends mail.
The server holds no state of its own beyond short-lived approvals; what the assistant has seen lives in the mailbox, as a keyword.

What it looks like ​

A terminal session: listing the tools registered under the read-only default, listing an inbox, then reading a phishing message — which comes back with the injection shapes named before anything else, the body fenced line by line with a per-call nonce, and the tracking beacon defused

Four calls against a throwaway mailbox. The last two are the point: the message asks the assistant to forward the inbox to a stranger and carries a tracking pixel, and both arrive labelled as what they are rather than acted upon. The recording is reproducible — docs/demo.tape and docs/demo-seed.mjs build the mailbox from scratch, and nothing in it comes from a real account.

Running it elsewhere ​

A client that cannot spawn a local process — ChatGPT connectors, Claude on the web, Cursor, LibreChat — cannot start imap-mcp the way Claude Code does. mcp-hub is the bridge: one container serves many stdio MCP servers over Streamable HTTP, with an OAuth 2.1 login behind a single password and long-lived tokens for the clients that cannot do OAuth. Its /hub endpoint puts every server behind six meta-tools, so one connector reaches all of them without N×tool schemas in the model's context, and it speaks both protocol revisions — a question this server asks travels through it to the person at the far end instead of ending at the gateway.

Its configuration is Claude Code's mcpServers format, so the entry you already have is the entry it takes: Through mcp-hub.

Released under the MIT License.