imap-mcp
๐ง An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
Documentation
imap-mcp
โจ Features
- Email Draft Creation: Create draft emails that are saved to your IMAP server's drafts folder
- IMAP Integration: Connect to any IMAP-compatible email server (Gmail, Outlook, etc.)
- Secure Authentication: Uses environment variables for secure credential management
- MCP Compatible: Works with Claude and other AI assistants that support the Model Context Protocol
- TypeScript: Full TypeScript support with proper type definitions
Setup
{
"mcpServers": {
...,
"imap": {
"command": "npx",
"args": [
"imap-mcp"
],
"env": {
"IMAP_HOST": "",
"IMAP_PORT": "",
"IMAP_USERNAME": "",
"IMAP_PASSWORD": "",
"IMAP_USE_SSL": ""
}
}
}
}Usage
1. Compile TypeScript to JavaScript:
npx tsc2. Run the MCP server:
node dist/index.jsAvailable Tools
`create-draft`
Creates a draft email message and saves it to the IMAP server's drafts folder.
Parameters:
- `to` (string, required): The recipient's email address
- `subject` (string, required): The email subject line
- `body` (string, required): The email body content
- `from` (string, optional): The sender's email address (defaults to IMAP_USERNAME)
Example:
{
"to": "recipient@example.com",
"subject": "Meeting Reminder",
"body": "Don't forget about our meeting tomorrow at 2 PM.",
"from": "sender@example.com"
}The tool will attempt to save the draft to either "INBOX.Drafts" or "Drafts" folder, depending on your email server's folder structure.
License
MIT
Frequently asked questions
What is imap-mcp?
imap-mcp is ๐ง An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
How do I install imap-mcp?
Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.
Is imap-mcp open source?
Yes โ it is hosted on GitHub at https://github.com/dominik1001/imap-mcp and has 8 stars.
Related MCP tools
A Minecraft MCP Server powered by Mineflayer API. It allows to control a Minecraft character in real-time, allowing AI assistants to build structures, explor...
Composio equips your AI agents & LLMs with 100+ high-quality integrations via function calling for the Model Context Protocol. Enhance AI assistants with powerf
๐ฆ Repomix is a powerful tool that packs your entire repository into a single, AI-friendly file. Perfect for when you need to feed your codebase to Large Lan...
AI Agents & MCPs & AI Workflow Automation โข (~400 MCP servers for AI agents) โข AI Automation / AI Agent with MCPs โข AI Workflows & AI Agents โข MCPs for AI Ag...
The TypeScript AI agent framework. โก Assistants, RAG, observability. Supports any LLM: GPT-4, Claude, Gemini, Llama. Built for the Model Context Protocol to enh
Rich-text editor with AI, MCP, and shadcn/ui TypeScript-based implementation. Trusted by 15300+ developers. Trusted by 15300+ developers.
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP