imap-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IMAP_TLS | No | TLS mode: implicit, starttls, or none | implicit |
| IMAP_HOST | Yes | Hostname of the IMAP server, e.g. imap.example.net | |
| IMAP_PORT | No | Port of the IMAP server; defaults by TLS mode (993 for implicit TLS, 143 for STARTTLS/none) | |
| IMAP_USER | Yes | Account username, usually the address | |
| IMAP_MAILBOX | No | Mailbox the message tools default to | INBOX |
| IMAP_PASSWORD | Yes | Password or app-specific password | |
| IMAP_READ_ONLY | No | Exactly 'false' registers the five mailbox tools; default is true | true |
| IMAP_DENY_TOOLS | No | Comma-separated tool names or prefixes to subtract from the allow list | |
| IMAP_ALLOW_TOOLS | No | Comma-separated tool names, list_* prefixes, or 'essential' | |
| IMAP_DOWNLOAD_DIR | No | Setting it allows saving attachments to this directory | |
| IMAP_INSECURE_TLS | No | Exactly 'true' accepts a self-signed certificate | false |
| IMAP_MAX_MESSAGES | No | Default page size for listing messages | 100 |
| IMAP_SEEN_KEYWORD | No | Keyword for new-mail tracking; empty turns it off | AiSeen |
| IMAP_DRAFTS_MAILBOX | No | Overrides the folder found via the \Drafts flag | |
| IMAP_ATTACHMENT_TYPES | No | Comma-separated content-type allowlist for attachments | |
| IMAP_MAX_DOWNLOAD_BYTES | No | Ceiling for writing one attachment to disk | 26214400 |
| IMAP_TRUSTED_AUTHSERV_ID | No | The authserv-id your provider stamps on Authentication-Results headers | |
| IMAP_MAX_ATTACHMENT_BYTES | No | Ceiling for returning an attachment inline | 1048576 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
| resources | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| get_server_infoA | Reports what this account and server can do: the configured mailbox, IMAP capabilities, which flags the mailbox stores permanently, whether the new-mail keyword can be used, and which tool groups are enabled. Start here when a call fails for reasons that sound like configuration. |
| list_mailboxesA | Lists every folder in the account with its message and unseen counts, its special-use role (drafts, sent, trash, junk) and whether it can hold messages. Use the returned "path" verbatim wherever a tool takes a mailbox. |
| list_messagesA | Lists messages newest first, optionally narrowed by sender, recipient, subject, body text, date range or flags. With no criteria it simply pages through the mailbox. Every filter is applied by the mail server, so searching a large folder is cheap. Returns summaries only — use get_message for the body. |
| list_new_messagesA | Returns messages this server has not handed over yet, newest first, and then marks them with the "AiSeen" keyword so the next call returns only what arrived since. This is separate from the human read/unread state, which is never touched. Use dry_run to preview without marking. |
| get_messageA | Fetches one message by UID and returns its headers and text body, fenced as untrusted content, together with a server-side security assessment (SPF/DKIM/DMARC verdicts, prompt-injection and homoglyph signals) and the list of its attachments. Does not change the read state. Set include_thread to also list the surrounding conversation. |
| get_attachmentsA | Without part_id: lists the attachments of a message with their type, size, whether the policy allows fetching them and whether their text can be read. With part_id: returns that one attachment. Small text and images come back inline so you can read them; a PDF, Word, Excel, PowerPoint or OpenDocument file can be read as text with mode="text", which is the only way to read a document without access to this server's filesystem; anything else is written to the download directory, if one is configured, and you get the path. part_id must come from a listing call of this same tool. Executables are refused even when they claim to be something else — including when writing to disk. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 6 tools
Every tool targets a distinct concern: server configuration, mailbox listing, message summaries, new-message polling, full message retrieval, and attachment handling. The overlap between list_messages and list_new_messages is clearly resolved by the latter's purpose of returning only unseen-by-AI messages and marking them with AiSeen.
All tool names follow a consistent snake_case verb_noun pattern, with list_* for collection/summary operations and get_* for single-item or detail operations. list_new_messages is the only variation, but it still clearly follows the same verb_first structure.
Six tools is well-scoped for an IMAP read-and-retrieve server. Each tool covers a necessary step in the workflow: inspect configuration, navigate mailboxes, list and filter messages, poll for new mail, fetch full messages, and access attachments.
The toolset covers the full read-side workflow: mailbox discovery, message listing, incremental new-message handling, content retrieval, and attachment access. It does not offer send, delete, move, or flag mutation operations, but the descriptions consistently imply a read-only design, so this seems intentional rather than a gap.