Back to MCP Servers
🧩

IMAP mailbox MCP Server

API key required

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.

SearchAIDevTools

Install

npx -y @ni-c/imap-mcp@0.5.3

Environment variables

IMAP_HOSTSet in your MCP config
IMAP_USERSet in your MCP config
IMAP_PASSWORDSet in your MCP config
IMAP_PORTSet in your MCP config
IMAP_TLSSet in your MCP config
IMAP_MAILBOXSet in your MCP config
IMAP_SEEN_KEYWORDSet in your MCP config
IMAP_READ_ONLYSet in your MCP config
IMAP_ALLOW_TOOLSSet in your MCP config
IMAP_DENY_TOOLSSet in your MCP config
IMAP_DOWNLOAD_DIRSet in your MCP config
IMAP_INSECURE_TLSSet in your MCP config
IMAP_DRAFTS_MAILBOXSet in your MCP config
IMAP_MAX_MESSAGESSet in your MCP config
IMAP_MAX_ATTACHMENT_BYTESSet in your MCP config
IMAP_MAX_DOWNLOAD_BYTESSet in your MCP config
IMAP_MAX_EXTRACT_BYTESSet in your MCP config
IMAP_ATTACHMENT_TYPESSet in your MCP config
IMAP_TRUSTED_AUTHSERV_IDSet in your MCP config

Install with your client

Terminal
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.

Listed on clauderules.net

Add this badge to your README

Show visitors this server is listed in the ClaudeRules directory. The badge links straight to this listing.

Markdown
[![Listed on clauderules.net](https://clauderules.net/api/badge/io-github-ni-c-imap-mcp)](https://clauderules.net/mcp/io-github-ni-c-imap-mcp)
HTML
<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>