by dominik1001
Expose IMAP operations as tools for AI assistants, enabling draft email creation and other email interactions via the Model Context Protocol.
Imap Mcp provides a Model Context Protocol (MCP) server that maps common IMAP actions—such as creating draft emails—to callable tools for AI assistants. By connecting to any IMAP‑compatible mailbox, the server lets AI agents read, write, and manage email drafts directly from their context.
npx tsc
.node dist/index.js
(or invoke via the MCP‑server configuration using npx imap-mcp
).create-draft
tool from an AI assistant, passing to
, subject
, body
, and optionally from
.Q: Do I need a special IMAP server? A: No, any standard IMAP server works as long as you provide correct credentials.
Q: Which folder does the draft get saved to?
A: The server attempts INBOX.Drafts
first, falling back to Drafts
if the former does not exist.
Q: Can I send the draft after creation? A: Imap Mcp currently only creates drafts; sending can be performed by another tool or client.
Q: How is authentication handled?
A: Credentials are read from environment variables (IMAP_HOST
, IMAP_PORT
, IMAP_USERNAME
, IMAP_PASSWORD
, IMAP_USE_SSL
).
📧 An IMAP Model Context Protocol (MCP) server to expose IMAP operations as tools for AI assistants.
{
"mcpServers": {
...,
"imap": {
"command": "npx",
"args": [
"imap-mcp"
],
"env": {
"IMAP_HOST": "<IMAP host>",
"IMAP_PORT": "<IMAP port>",
"IMAP_USERNAME": "<IMAP username>",
"IMAP_PASSWORD": "<IMAP password>",
"IMAP_USE_SSL": "<true or false>"
}
}
}
}
npx tsc
node dist/index.js
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 addresssubject
(string, required): The email subject linebody
(string, required): The email body contentfrom
(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.
MIT
Please log in to share your review and rating for this MCP.
{ "mcpServers": { "imap": { "command": "npx", "args": [ "imap-mcp" ], "env": { "IMAP_HOST": "<IMAP host>", "IMAP_PORT": "<IMAP port>", "IMAP_USERNAME": "<IMAP username>", "IMAP_PASSWORD": "<IMAP password>", "IMAP_USE_SSL": "<true or false>" } } } }
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
An MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.
by danny-avila
Provides a self‑hosted ChatGPT‑style interface supporting numerous AI models, agents, code interpreter, image generation, multimodal interactions, and secure multi‑user authentication.
by block
Automates engineering tasks on local machines, executing code, building projects, debugging, orchestrating workflows, and interacting with external APIs using any LLM.
by RooCodeInc
Provides an autonomous AI coding partner inside the editor that can understand natural language, manipulate files, run commands, browse the web, and be customized via modes and instructions.
by pydantic
A Python framework that enables seamless integration of Pydantic validation with large language models, providing type‑safe agent construction, dependency injection, and structured output handling.
by lastmile-ai
Build effective agents using Model Context Protocol and simple, composable workflow patterns.
by mcp-use
A Python SDK that simplifies interaction with MCP servers and enables developers to create custom agents with tool‑calling capabilities.
by nanbingxyz
A cross‑platform desktop AI assistant that connects to major LLM providers, supports a local knowledge base, and enables tool integration via MCP servers.
by gptme
Provides a personal AI assistant that runs directly in the terminal, capable of executing code, manipulating files, browsing the web, using vision, and interfacing with various LLM providers.