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 and whether the policy allows fetching them. With part_id: returns that one attachment. Small text and images come back inline so you can read them; anything larger is written to the download directory 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 | |
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ni-c/imap-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server