imap
đź“§ An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
claude mcp add --transport stdio dominik1001-imap-mcp npx imap-mcp \ --env IMAP_HOST="<IMAP host>" \ --env IMAP_PORT="<IMAP port>" \ --env IMAP_USE_SSL="<true or false>" \ --env IMAP_PASSWORD="<IMAP password>" \ --env IMAP_USERNAME="<IMAP username>"
How to use
The imap MCP server exposes IMAP operations as tools for AI assistants. By starting the server, you enable tools such as create-draft that can interact with your IMAP-compatible email account to create draft messages in your drafts folder. The server is configured to read credentials from environment variables to securely connect to your IMAP server. You can run the server using the provided npx command, and then call the available tools through any MCP-enabled assistant (like Claude) to draft emails without exposing raw credentials. The primary tool described is create-draft, which accepts recipient, subject, body, and an optional from address, and saves the resulting message as a draft on your IMAP server.
How to install
Prerequisites:
- Node.js (and npm) installed on your machine
- Access to the imap-mcp package on npm
Install and run:
-
Install dependencies (if you have a local clone): npm install
-
Compile TypeScript to JavaScript (if developing locally): npx tsc
-
Run the MCP server (per the README, using npx): npx imap-mcp
-
Alternatively, using the MCP configuration by creating the mcp.json as shown in the README and starting your own script to launch the server via the configured command.
Note: Ensure your environment variables for IMAP_HOST, IMAP_PORT, IMAP_USERNAME, IMAP_PASSWORD, and IMAP_USE_SSL are set before starting the server.
Additional notes
Environment variables are used to securely manage credentials. Ensure IMAP_USE_SSL correctly reflects your server (true/false). If you encounter authentication errors, verify that the IMAP server allows external connections and that the credentials are correct. The create-draft tool will attempt to place drafts in the typical drafts folders (INBOX.Drafts or Drafts) depending on the server. If your server uses a non-standard folder structure, you may need to adjust expectations or implement folder-mapping logic. Regularly update dependencies to keep the MCP server secure and compatible with IMAP servers.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.