# IMAP MCP Server

> Manage IMAP mailboxes and email through MCP.

- **URL**: https://followmcp.com/en/servers/imap-mcp-server
- **Category**: Other
- **Origin**: Community
- **Stars**: 142
- **FMRS Score**: 55/100 (Grade C)
- **Source**: https://github.com/nikolausm/imap-mcp-server
- **Transports**: stdio (local process)
- **Runtimes**: Node.js 22.12+
- **Auth**: API key / credential required

## Overview
IMAP MCP Server gives AI assistants IMAP/SMTP email capabilities, including searching, reading, organizing, sending, replying to, and forwarding messages. It supports multiple accounts and stores credentials using AES-256 encryption.

## Best for
- Users who want an AI assistant to access one or more IMAP/SMTP mailboxes.
- Users who want to restrict exposed tools with read-only mode or a tool allowlist.

## Not for
- Users whose mail service does not support IMAP/SMTP.
- Users needing services or email operations outside the documented capabilities.

## Required permissions
- Needs to connect to configured accounts over IMAP; sending mail and saving sent copies also uses SMTP and corresponding mailbox permissions.
- Account credentials are stored locally; the README describes AES-256-CBC encryption and separate storage for the key and account configuration.
- The optional attachment path parameter reads local files; downloaded attachments are saved in a downloads directory.

## Risks
- Send, reply, forward, and delete tools can send messages or change mailbox contents; bulk deletion can affect multiple emails.
- Credential encryption depends on a key stored separately on the local machine; do not share or commit the key or account configuration.
- Environment-variable credentials are read at server startup; read-only mode or a tool allowlist can limit exposed functionality.
- The setup wizard uses plain HTTP when bound beyond loopback, which can expose its access token and entered passwords to network observers; the README recommends an SSH tunnel.

## Client config (JSON)
```json
{"mcpServers":{"imap":{"command":"npx","args":["-y","imap-mcp-server"],"env":{}}}}
```

## Tools (36)
- `imap_add_account`: Add an IMAP email account.
- `imap_update_account`: Update settings for an existing account.
- `imap_list_accounts`: List configured accounts.
- `imap_remove_account`: Remove an email account.
- `imap_connect`: Connect to an email account.
- `imap_disconnect`: Disconnect an account.
- `imap_test_account`: Test an account connection.
- `imap_search_emails`: Search emails using criteria.
- `imap_get_email`: Get the full content of an email.
- `imap_get_latest_emails`: Get recent emails.
- `imap_mark_as_read`: Mark email as read.
- `imap_mark_as_unread`: Mark email as unread.
- `imap_flag_email`: Flag an email.
- `imap_unflag_email`: Unflag an email.
- `imap_add_keyword`: Add a custom IMAP keyword to an email.
- `imap_remove_keyword`: Remove a custom IMAP keyword from an email.
- `imap_delete_email`: Delete one email.
- `imap_move_email`: Move email to another folder.
- `imap_find_thread_messages`: Find messages in the same conversation as messages already sorted elsewhere.
- `imap_download_attachment`: Download an attachment or extract PDF text.
- `imap_bulk_delete`: Delete specified emails in bulk.
- `imap_bulk_delete_by_search`: Delete emails matching criteria, with an optional preview.
- `imap_send_email`: Send a new email via SMTP.
- `imap_save_draft`: Save an email as a draft.
- `imap_reply_to_email`: Reply to an existing email.
- `imap_forward_email`: Forward an existing email.
- `imap_list_folders`: List mailbox folders.
- `imap_folder_status`: Get folder status, message counts, and flags.
- `imap_create_folder`: Create a mailbox folder.
- `imap_get_unread_count`: Count unread emails.
- `imap_check_spam`: Check spam.
- `imap_domain_stats`: Get domain statistics.
- `imap_list_spam_domains`: List spam domains.
- `imap_delete_spam`: Delete spam emails.
- `imap_delete_by_domain`: Delete emails by domain.
- `imap_upload_file`: Upload a file for use as an email attachment.
