Read, search and organise any IMAP mailbox, with writes off by default
To add IMAP mailbox to Claude, run the install command below or copy the ready-made config for Claude Code, Claude Desktop, Cursor and VS Code further down. Restart your client after adding it and its tools show up in your next conversation. It needs 19 environment variables, listed below.
Install
npx -y @ni-c/imap-mcp@0.5.3Environment variables
IMAP_HOSTSet in your MCP configIMAP_USERSet in your MCP configIMAP_PASSWORDSet in your MCP configIMAP_PORTSet in your MCP configIMAP_TLSSet in your MCP configIMAP_MAILBOXSet in your MCP configIMAP_SEEN_KEYWORDSet in your MCP configIMAP_READ_ONLYSet in your MCP configIMAP_ALLOW_TOOLSSet in your MCP configIMAP_DENY_TOOLSSet in your MCP configIMAP_DOWNLOAD_DIRSet in your MCP configIMAP_INSECURE_TLSSet in your MCP configIMAP_DRAFTS_MAILBOXSet in your MCP configIMAP_MAX_MESSAGESSet in your MCP configIMAP_MAX_ATTACHMENT_BYTESSet in your MCP configIMAP_MAX_DOWNLOAD_BYTESSet in your MCP configIMAP_MAX_EXTRACT_BYTESSet in your MCP configIMAP_ATTACHMENT_TYPESSet in your MCP configIMAP_TRUSTED_AUTHSERV_IDSet in your MCP configInstall with your client
claude mcp add imap-mailbox --env IMAP_HOST=<YOUR_IMAP_HOST> --env IMAP_USER=<YOUR_IMAP_USER> --env IMAP_PASSWORD=<YOUR_IMAP_PASSWORD> --env IMAP_PORT=<YOUR_IMAP_PORT> --env IMAP_TLS=<YOUR_IMAP_TLS> --env IMAP_MAILBOX=<YOUR_IMAP_MAILBOX> --env IMAP_SEEN_KEYWORD=<YOUR_IMAP_SEEN_KEYWORD> --env IMAP_READ_ONLY=<YOUR_IMAP_READ_ONLY> --env IMAP_ALLOW_TOOLS=<YOUR_IMAP_ALLOW_TOOLS> --env IMAP_DENY_TOOLS=<YOUR_IMAP_DENY_TOOLS> --env IMAP_DOWNLOAD_DIR=<YOUR_IMAP_DOWNLOAD_DIR> --env IMAP_INSECURE_TLS=<YOUR_IMAP_INSECURE_TLS> --env IMAP_DRAFTS_MAILBOX=<YOUR_IMAP_DRAFTS_MAILBOX> --env IMAP_MAX_MESSAGES=<YOUR_IMAP_MAX_MESSAGES> --env IMAP_MAX_ATTACHMENT_BYTES=<YOUR_IMAP_MAX_ATTACHMENT_BYTES> --env IMAP_MAX_DOWNLOAD_BYTES=<YOUR_IMAP_MAX_DOWNLOAD_BYTES> --env IMAP_MAX_EXTRACT_BYTES=<YOUR_IMAP_MAX_EXTRACT_BYTES> --env IMAP_ATTACHMENT_TYPES=<YOUR_IMAP_ATTACHMENT_TYPES> --env IMAP_TRUSTED_AUTHSERV_ID=<YOUR_IMAP_TRUSTED_AUTHSERV_ID> -- npx -y @ni-c/imap-mcp@0.5.3
Run this in a terminal to add the server to Claude Code.
What this does
IMAP mailbox exposes a set of tools to Claude over the Model Context Protocol. After you add it to claude_desktop_config.json (snippet above) and restart Claude Desktop, those tools become callable inside any conversation.
Requirements
This server needs the following environment variables to be set before it can run:
IMAP_HOST IMAP_USER IMAP_PASSWORD IMAP_PORT IMAP_TLS IMAP_MAILBOX IMAP_SEEN_KEYWORD IMAP_READ_ONLY IMAP_ALLOW_TOOLS IMAP_DENY_TOOLS IMAP_DOWNLOAD_DIR IMAP_INSECURE_TLS IMAP_DRAFTS_MAILBOX IMAP_MAX_MESSAGES IMAP_MAX_ATTACHMENT_BYTES IMAP_MAX_DOWNLOAD_BYTES IMAP_MAX_EXTRACT_BYTES IMAP_ATTACHMENT_TYPES IMAP_TRUSTED_AUTHSERV_ID
Set these via the env object in your MCP config (see claude_desktop_config.json snippet above).
Frequently asked questions
How do I install IMAP mailbox?
Run the Claude Code command in the install section to add IMAP mailbox to Claude Code, or copy the ready-made config for your client from the install section on this page. Restart your client afterwards and the tools appear in your next conversation.
Which clients work with IMAP mailbox?
This page carries setup and config for Claude Code, Claude Desktop, Cursor and VS Code. Any other MCP client that accepts a standard server config can connect to IMAP mailbox as well.
Does IMAP mailbox need an API key?
Yes. Before it can run, set these environment variables: IMAP_HOST, IMAP_USER, IMAP_PASSWORD, IMAP_PORT, IMAP_TLS, IMAP_MAILBOX, IMAP_SEEN_KEYWORD, IMAP_READ_ONLY, IMAP_ALLOW_TOOLS, IMAP_DENY_TOOLS, IMAP_DOWNLOAD_DIR, IMAP_INSECURE_TLS, IMAP_DRAFTS_MAILBOX, IMAP_MAX_MESSAGES, IMAP_MAX_ATTACHMENT_BYTES, IMAP_MAX_DOWNLOAD_BYTES, IMAP_MAX_EXTRACT_BYTES, IMAP_ATTACHMENT_TYPES, IMAP_TRUSTED_AUTHSERV_ID. They go in the env block of your MCP config.
Imported from the Official MCP Registry. The details above come from the registry entry; the maker can claim this listing to correct them, add docs, and see its traffic.
Is this your MCP server?
Claim this listing to see its traffic, fix details yourself, and skip the review queue on future updates.
Add this badge to your README
Show visitors this server is listed in the ClaudeRules directory. The badge links straight to this listing.
[](https://clauderules.net/mcp/io-github-ni-c-imap-mcp)<a href="https://clauderules.net/mcp/io-github-ni-c-imap-mcp" target="_blank" rel="noopener noreferrer"><img src="https://clauderules.net/api/badge/io-github-ni-c-imap-mcp" alt="Listed on clauderules.net" /></a>More Search MCP servers
GitHub
Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.
Serena MCP: the IDE for your agent
A powerful toolkit for coding, providing semantic retrieval and editing capabilities.
mediar-ai/screenpipe
🎖️ 🦀 🏠 🍎 Local-first system capturing screen/audio with timestamped indexing, SQL/embedding storage, semantic search, LLM-powered history analysis, and event-triggered actions - enables building c
MCP Toolbox for Databases
MCP Toolbox for Databases enables your agent to connect to your database.
