imap
A powerful Model Context Protocol (MCP) server for IMAP email integration with Claude
claude mcp add --transport stdio nikolausm-imap-mcp-server node /path/to/ImapClient/dist/index.js
How to use
This MCP server provides a comprehensive IMAP integration with secure account management, multiple account handling, and full email operations. It exposes tools for managing IMAP accounts, performing email searches, retrieving full messages, sending emails via SMTP, and manipulating folders and unread counts. After configuring the server in your Claude Desktop or runtime environment, you can use commands such as imap_add_account to add new accounts, imap_search_emails to search your inbox, imap_get_email to fetch full content, and imap_send_email to compose and send messages. The server also supports advanced actions like replying to and forwarding emails, marking read/unread, and listing folders with unread counts. The web-based setup wizard helps you pre-configure providers (Gmail, Outlook, Yahoo, and more) and automatically configures SMTP settings based on the chosen IMAP provider.
How to install
Prerequisites:
- Node.js and npm installed on your host
- Git installed for cloning the repository (optional if using the quick install script)
Quick Install (Recommended):
- macOS/Linux: curl -fsSL https://raw.githubusercontent.com/nikolausm/imap-mcp-server/main/install.sh | bash
- Windows (PowerShell as Administrator): iwr -useb https://raw.githubusercontent.com/nikolausm/imap-mcp-server/main/install.ps1 | iex
Manual Installation:
-
Clone the repository: git clone https://github.com/nikolausm/imap-mcp-server.git cd imap-mcp-server
-
Install dependencies: npm install
-
Build the project: npm run build
Optional post-install steps:
- Run the web-based setup wizard to configure accounts: npm run setup // or globally installed: imap-setup
Notes:
- The setup wizard provides pre-configured account providers and automates SMTP settings derivation.
- Ensure network access to the chosen IMAP/SMTP servers and that any required app passwords or OAuth permissions are configured in your provider accounts.
Additional notes
Tips and common issues:
- Encryption: Credentials are AES-256-CBC encrypted; the key is stored separately at ~/.imap-mcp/.key. Keep this key secure.
- Account configurations are stored at ~/.imap-mcp/accounts.json. Do not share this file.
- If you encounter connection issues, verify that IMAP is enabled for the account and that the provider allows app-specific passwords or OAuth access.
- For sending emails, ensure your account has SMTP access enabled or uses the provider's recommended SMTP settings; the setup wizard can auto-configure SMTP when possible.
- The CLI tools support multiple accounts and folders; use imap_list_accounts and imap_list_folders to understand your setup before performing actions.
- If running in Claude Desktop, ensure the mcpServers entry matches your local path to the built server script.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud