Back to Home
AzizMarashly icon

imap-readonly-mcp

Verified Safe

by AzizMarashly

Overview

Exposes read-only access to email mailboxes (IMAP, POP3, Microsoft Graph) via Model Context Protocol for AI agents.

Installation

Run Command
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-http

Environment 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

Stats

Interest Score30
Security Score9
Cost ClassHigh
Avg Tokens15000
Stars1
Forks0
Last Update2025-11-27

Tags

MCPEmailRead-OnlyIMAPPOP3Microsoft Graph