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
The six tools mostly target distinct resources: server info, mailboxes, single message, attachments, and two message listings. The only mild overlap is between list_messages and list_new_messages (both enumerate messages), but the descriptions clearly separate server-side filter paging from AiSeen-keyword tracking of unhandled mail.
All names follow a strict verb_noun snake_case pattern (get_server_info, get_attachments, get_message, list_mailboxes, list_messages, list_new_messages). The get_ vs list_ distinction maps cleanly to single-item vs collection retrieval.
Six tools is a reasonable, well-scoped set for a read-oriented IMAP surface, with no redundant entries. It is slightly thin if write operations were intended, but each tool clearly earns its place.
The read path is well covered: server capabilities, mailbox listing, message search/paging, single-message retrieval with thread context, new-message tracking, and attachment extraction. The main gaps are write-side operations (send, move, delete, flag changes), which appear intentionally omitted given the descriptions' emphasis on never altering read state.