IMAP mailbox
MCP server by ni-c Community
Reads, searches and organises any IMAP mailbox from MCP clients such as Claude Code, Claude Desktop and Codex. Write tools are off by default, and the server cannot send mail.
Install IMAP mailbox
Built from the published package, never by AI.
claude mcp add imap-mailbox -e IMAP_HOST=YOUR_IMAP_HOST -e IMAP_USER=YOUR_IMAP_USER -e IMAP_PASSWORD=YOUR_IMAP_PASSWORD -- npx -y @ni-c/imap-mcpRun in your terminal. Add --scope user to use it in every project.
{
"mcpServers": {
"imap-mailbox": {
"env": {
"IMAP_HOST": "YOUR_IMAP_HOST",
"IMAP_USER": "YOUR_IMAP_USER",
"IMAP_PASSWORD": "YOUR_IMAP_PASSWORD"
},
"args": [
"-y",
"@ni-c/imap-mcp"
],
"command": "npx"
}
}
}Settings, Developer, Edit config. Paste into claude_desktop_config.json and restart.
{
"mcpServers": {
"imap-mailbox": {
"env": {
"IMAP_HOST": "YOUR_IMAP_HOST",
"IMAP_USER": "YOUR_IMAP_USER",
"IMAP_PASSWORD": "YOUR_IMAP_PASSWORD"
},
"args": [
"-y",
"@ni-c/imap-mcp"
],
"command": "npx"
}
}
}Add to ~/.cursor/mcp.json (all projects) or .cursor/mcp.json (this project).
{
"servers": {
"imap-mailbox": {
"env": {
"IMAP_HOST": "YOUR_IMAP_HOST",
"IMAP_USER": "YOUR_IMAP_USER",
"IMAP_PASSWORD": "YOUR_IMAP_PASSWORD"
},
"args": [
"-y",
"@ni-c/imap-mcp"
],
"command": "npx"
}
}
}Add to .vscode/mcp.json. VS Code uses "servers", not "mcpServers".
codex mcp add imap-mailbox --env IMAP_HOST=YOUR_IMAP_HOST --env IMAP_USER=YOUR_IMAP_USER --env IMAP_PASSWORD=YOUR_IMAP_PASSWORD -- npx -y @ni-c/imap-mcp{
"mcpServers": {
"imap-mailbox": {
"env": {
"IMAP_HOST": "YOUR_IMAP_HOST",
"IMAP_USER": "YOUR_IMAP_USER",
"IMAP_PASSWORD": "YOUR_IMAP_PASSWORD"
},
"args": [
"-y",
"@ni-c/imap-mcp"
],
"command": "npx"
}
}
}Add to ~/.gemini/config/mcp_config.json (all projects) or .agents/mcp_config.json (this project).
gemini mcp add imap-mailbox npx -y @ni-c/imap-mcpGemini CLI was replaced by Antigravity CLI in June 2026 and remains only for enterprise licences and paid API keys.
MCP servers run with your permissions and can read what you give them access to. Some need an API key: check the README and add it under env in the imap-mailbox block.
About
IMAP mailbox is a Model Context Protocol server for any IMAP mail account. It speaks IMAP rather than one vendor's API, so it works with whatever mail provider the user already has. MCP clients such as Claude Code, Claude Desktop and Codex can use it to read and search mail, organise messages into folders, save attachments and draft replies. Every message is fenced as untrusted content, and the server adds a security assessment of sender authentication and possible prompt-injection patterns.
Write tools are off until the user sets IMAP_READ_ONLY to false. The server cannot send mail. The save_draft tool places a reply in the Drafts folder, and the user sends it from their own mail client. Deleting and moving messages ask the user for confirmation where the client supports elicitation. It is aimed at people who want an assistant to work with their mailbox without giving it a way to send messages.
Written from the project's README and checked against it.
Tools it gives your assistant
list_mailboxesLists the mailboxes (folders) in the account, with a cleaned display name for each.list_new_messagesReturns messages not yet handed over, tagged with a custom keyword so each appears once.list_messagesLists messages in a mailbox, with a default page size set by IMAP_MAX_MESSAGES.get_messageReads one message, with its content fenced as untrusted and an authentication assessment.get_attachmentsReturns attachments inline or saves them to disk when IMAP_DOWNLOAD_DIR is set.set_message_flagsChanges flags on messages. This is a write tool and needs IMAP_READ_ONLY set to false.move_messagesMoves or copies messages between folders. Asks the user for confirmation where supported.delete_messagesDeletes messages. Asks the user for confirmation where the client supports elicitation.save_draftWrites a reply into the Drafts folder so the user can review and send it themselves.
What you need
- Node.js 24 or newer
- An IMAP account with host, username and password
- An app-specific password for providers with two-factor authentication
- Docker, optional, to run the published container image
| Setting | Needed | What it is |
|---|---|---|
IMAP_Environment variable | Required | Hostname of the IMAP server, e.g. imap.example.net |
IMAP_Environment variable | Required | Mailbox user name |
IMAP_Environment variable, secret | Required | Mailbox password or app password |
IMAP_Environment variable | Optional | Defaults to 993 with implicit TLS, 143 otherwise |
IMAP_Environment variable | Optional | implicit (default), starttls or none |
IMAP_Environment variable | Optional | Default mailbox to work in (default: INBOX) |
IMAP_Environment variable | Optional | IMAP keyword marking what the assistant has already seen (default: AiSeen) |
IMAP_Environment variable | Optional | Set to false to register the mailbox write tools; defaults to true |
IMAP_Environment variable | Optional | Comma-separated tool names or list_* prefixes to register; 'essential' selects a curated preset (default: all tools) |
IMAP_Environment variable | Optional | Comma-separated tool names or list_* prefixes to remove from whatever IMAP_ALLOW_TOOLS left |
IMAP_Environment variable | Optional | Directory attachments may be written to; unset means the server never touches the filesystem |
IMAP_Environment variable | Optional | Set to true to accept self-signed certificates, scoped to this connection |
IMAP_Environment variable | Optional | Drafts folder to save into; by default the one flagged \Drafts is used |
IMAP_Environment variable | Optional | Default number of messages a listing returns (default: 100) |
IMAP_Environment variable | Optional | Ceiling for returning an attachment inline (default: 1048576) |
IMAP_Environment variable | Optional | Ceiling for writing an attachment to disk (default: 26214400) |
IMAP_Environment variable | Optional | Ceiling for reading a document's text with mode=text (default: 10485760, maximum: 67108864) |
IMAP_Environment variable | Optional | Seconds one IMAP command may take before the call is abandoned (default: 30, maximum: 600) |
IMAP_Environment variable | Optional | Comma-separated content-type allowlist for attachments |
IMAP_Environment variable | Optional | authserv-id your provider stamps into Authentication-Results; without it every verdict is reported as forgeable |
From the publisher's entry in the official MCP Registry. Required settings are already in the install config below as placeholders.
Try asking
- Show me the new messages in my inbox since this morning
- Search my mail for invoices from last month and list them
- Save a draft reply to the latest message from my manager
Good to know
- Write tools are off by default and need IMAP_READ_ONLY set to false.
- The server cannot send mail. Replies are saved as drafts only.
- move_messages both moves and copies, so denying it removes both modes.
- IMAP_COMMAND_TIMEOUT_SECONDS applies per IMAP command, not per tool call.
Security check
ANo download-and-run commands, hidden instructions or signs of sending keys out were found.
Checked automatically: README.md, package.json. This looks for known risky patterns and is not a full audit. How grades work
Alternatives to IMAP mailbox
All alternatives →Jitsu MCP server lets AI assistants configure and operate Jitsu data pipelines. It covers destinations, streams, connections and functions, plus Live Events and connector syncs. It is aimed at teams that run event data pipelines.
Vexa sends a bot into Google Meet, Microsoft Teams, Zoom and Jitsi calls to capture speaker-labelled transcripts live or after the call. It suits teams that want meeting transcripts they can self-host.
Gives Claude and other MCP-compatible AI agents access to LinkedIn through your own browser session. It reads profiles, researches companies, finds jobs, and manages messages and connection requests.
Runs a NetSapiens phone system from Claude, ChatGPT, or any MCP client. Each person signs in as themselves, and their assistant gets role-aware tools for calls, voicemail, queues, and provisioning.
Resend MCP Server connects AI assistants to the Resend email platform. It lets them send and receive emails and manage contacts, broadcasts, templates, and domains. It suits developers and teams who use MCP clients such as Claude or Cursor.
The source does not describe labelhead-artist-momentum. It is a README for Paperclip, an open-source orchestration app for teams of AI agents.
Compare with Jitsu, Vexa or Linkedin MCP server
IMAP mailbox: common questions
Can the AI send emails from my account with this server?
No. The source says the server cannot send mail. The save_draft tool writes a reply to the Drafts folder, and the user sends it from their own mail client.
Are write actions enabled by default?
No. IMAP_READ_ONLY defaults to true, and only the exact value false registers the mailbox write tools.
Does this work with any email provider?
The server speaks IMAP rather than one vendor's API, so it is described as working with any IMAP mailbox and whatever provider the user already has.
How do I install IMAP mailbox?
In Claude Code run claude mcp add imap-mailbox -e IMAP_HOST=YOUR_IMAP_HOST -e IMAP_USER=YOUR_IMAP_USER -e IMAP_PASSWORD=YOUR_IMAP_PASSWORD -- npx -y @ni-c/imap-mcp. For Claude Desktop, Cursor and VS Code, paste the config shown above and restart. See the install guides.
Is IMAP mailbox the official server?
IMAP mailbox is a community project by ni-c, not verified by a company domain.
Is IMAP mailbox free?
The code is published under the MIT licence. The service it connects to may have its own pricing.
Is IMAP mailbox safe to use?
It scores 81 of 100. Grades: maintenance A, licence A, quality C. Security check: grade A, no risky patterns found in the files checked. Review the code before you install. How grades work.
What are alternatives to IMAP mailbox?
Similar MCP servers: Jitsu, Vexa, Linkedin MCP server, Netsapiens MCP.
Does IMAP mailbox work with ChatGPT?
Not directly. It runs locally, and ChatGPT only connects to remote servers with a URL. Use it in Claude Code, Claude Desktop, Cursor, VS Code or Codex.
