imap-readonly-mcp
Verified Safeby AzizMarashly
Overview
Exposes read-only access to email mailboxes (IMAP, POP3, Microsoft Graph) via Model Context Protocol for AI agents.
Installation
docker run --rm -v "$(pwd)/config/accounts.yaml:/app/config/accounts.yaml:ro" -p 8765:8765 -e FASTMCP_TRANSPORT=streamable-http -e FASTMCP_HOST=0.0.0.0 -e FASTMCP_PORT=8765 -e FASTMCP_STREAMABLE_HTTP__PATH=/mcp -e MAIL_CACHE_PATH=/tmp/email_cache.sqlite ghcr.io/azizmarashly/imap-readonly-mcp:v0.4.0 --transport streamable-httpEnvironment Variables
- MAIL_CONFIG_FILE
- MAIL_CACHE_PATH
- MAIL_FETCH_CONCURRENCY
- FASTMCP_TRANSPORT
- FASTMCP_HOST
- FASTMCP_PORT
- FASTMCP_STREAMABLE_HTTP__PATH
- FASTMCP_LOG_LEVEL
Security Notes
The server is designed for read-only operations, minimizing potential for mutation. It uses Pydantic's `SecretStr` for sensitive credentials (passwords, client secrets) which is a good practice. OAuth token acquisition for Microsoft Graph is handled via `msal`. Input validation is present for tools. The SQLite cache is managed internally without exposing direct user control over file paths, and cursor decoding handles potential `ValueError` and `JSONDecodeError`. No `eval` or `exec` found. HTML to text conversion uses regex, which can sometimes be a vector, but appears to be for content stripping rather than arbitrary code execution. Overall, appears robust for its stated read-only purpose.
Similar Servers
ms-365-mcp-server
Interacting with Microsoft 365 and Office services through the Graph API via a Model Context Protocol (MCP) server.
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.
outlook-mcp
Enables AI assistants to interact with Microsoft Outlook for email, calendar, and SharePoint operations through the Microsoft Graph API.
outlook-mcp-server
AI-powered local email management for Microsoft Outlook, enabling search, composition, organization, and batch forwarding of emails using natural language commands.