imap-mcp-server
by vivier
Overview
Provides an MCP interface for agents to interact with IMAP mailboxes, enabling email exploration, search, and content retrieval.
Installation
python mcp-server.pyEnvironment Variables
- IMAP_HOST
- IMAP_LOGIN
- IMAP_PASSWORD
- IMAP_TOKEN
Security Notes
The server constructs IMAP commands directly using string concatenation (f-strings and `str.join`) with user-provided inputs (`criteria` for `search`, `uids` and `keywords` for `change_keywords` and `get_keywords`). This pattern is vulnerable to IMAP command injection if a malicious or untrusted agent provides specially crafted input strings. While `imap-tools` might handle some sanitization, the direct construction of the command string without explicit parameterization for these specific IMAP operations in the provided code presents a significant risk.
Similar Servers
mcp-email-server
This server allows MCP clients to interact with email accounts via IMAP and SMTP protocols, enabling functionalities like listing, fetching, sending, and deleting emails.
gmail-mcp
Manages Gmail emails programmatically, enabling AI systems to read, send, archive, and perform other email operations on behalf of a user.
calendar-mcp
A unified Model Context Protocol (MCP) server that enables AI assistants to access multiple email and calendar accounts simultaneously across Microsoft 365, Outlook.com, and Google Workspace.
imap-readonly-mcp
Exposes read-only access to email mailboxes (IMAP, POP3, Microsoft Graph) via Model Context Protocol for AI agents.