imap-mail-mcp
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@imap-mail-mcpshow my last 5 emails from inbox"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
imap-mail-mcp
An MCP (Model Context Protocol) server that lets Claude read, search, and send email over standard IMAP/SMTP. Works with any provider that supports username/password authentication over IMAP and SMTP — IONOS, GMX, Web.de, and most other non-Gmail/non-Microsoft providers.
Tools
Tool | Description |
| List all folders (INBOX, Sent, Drafts, Trash, custom folders, ...) |
| List the most recent messages in a mailbox |
| Search by sender, recipient, subject, body text, or date range |
| Fetch the full text/HTML body and attachment metadata of one message |
| Mark a message as read/unread or flagged/unflagged |
| Send a new email or reply to an existing one |
Related MCP server: imail-mcp
Setup
Install dependencies and build:
npm install npm run buildCopy
.env.exampleto.envand fill in your mailbox credentials (only needed for local testing vianpm start— see below for how credentials are supplied when running through Claude Desktop).If your provider supports 2FA / app-specific passwords, use one of those instead of your main account password.
Using it with Claude Desktop
Add an entry to your claude_desktop_config.json
(~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
{
"mcpServers": {
"imap-mail": {
"command": "node",
"args": ["/absolute/path/to/imap-mail-mcp/dist/index.js"],
"env": {
"EMAIL_USER": "you@example.com",
"EMAIL_PASSWORD": "your-password-or-app-password",
"IMAP_HOST": "imap.example.com",
"IMAP_PORT": "993",
"SMTP_HOST": "smtp.example.com",
"SMTP_PORT": "587"
}
}
}
}Restart Claude Desktop fully (quit and reopen) after editing the config.
Environment variables
Variable | Required | Default | Notes |
| yes | — | Mailbox login (usually your email address) |
| yes | — | Password or app-specific password |
| yes | — | e.g. |
| no |
| IMAP over implicit TLS |
| yes | — | e.g. |
| no |
| STARTTLS; use |
For backwards compatibility, IONOS_EMAIL, IONOS_PASSWORD,
IONOS_IMAP_HOST, IONOS_IMAP_PORT, IONOS_SMTP_HOST, and
IONOS_SMTP_PORT are also accepted as aliases.
Security notes
Credentials are only ever read from environment variables. They are never logged, written to disk, or included in any response text beyond what the IMAP/SMTP server itself returns.
Claude Desktop's
mcpServersconfig stores theenvblock in plain text on your machine. Anyone with access to your user account can read it, same as any other locally saved password..envis git-ignored — never commit real credentials.
Requirements
Node.js 18+
Available Tools
6 toolsget_messageB
Fetch the full content (text, html, attachments metadata) of a single message by UID.
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | Message UID, from list_messages or search_messages | |
| mailbox | No | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must fully disclose behavioral traits. It states what is returned but does not mention whether the message is marked as read, if there are any side effects, or rate limits. For a read-like operation, the description could be more explicit about its non-destructive nature.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that conveys the core purpose without extraneous words. It is well-structured and easily scannable. A slight improvement could be front-loading the return value structure, but it is already efficient.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given no output schema and 50% parameter description coverage, the description is minimally complete for a simple fetch tool. It states what is returned but does not detail the structure (e.g., format of attachments metadata). Without annotations, it could provide more context about typical usage, but it covers the basics.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 50% (only uid described). The description does not add extra meaning beyond the schema; it only says 'by UID'. The mailbox parameter is mentioned in schema but its purpose (e.g., which mailbox to fetch from) is not elaborated. This leaves ambiguity for the agent.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'Fetch', the resource 'full content of a single message', and the method 'by UID'. It specifies exactly what content is included (text, html, attachments metadata), which distinguishes it from siblings like list_messages (which returns metadata only) and search_messages.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description does not explicitly state when to use this tool versus alternatives like list_messages (for listing) or search_messages (for searching). While the sibling list implies differentiation, the description lacks explicit usage guidance, such as 'Use this when you need the full message content rather than just the subject/date.'
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_mailboxesA
List all IMAP folders/mailboxes in the mailbox (e.g. INBOX, Sent, Drafts, Trash).
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
The description accurately reflects the tool's behavior as a read-only listing operation. With no annotations provided, the description correctly indicates no side effects or special requirements. It could add more detail (e.g., 'this operation is non-destructive'), but the simplicity of the tool limits the need.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence (17 words) that is front-loaded with the verb and resource, followed by examples. Every word earns its place, and there is no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool has no parameters, no output schema, and a straightforward purpose, the description fully covers what an agent needs to know: what it lists and representative examples. No additional information is necessary.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
No parameters exist in the schema, so the description does not need to explain parameters. The description adds no parameter semantics, but the baseline for zero parameters is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action 'List' and the resource 'all IMAP folders/mailboxes in the mailbox', with concrete examples (INBOX, Sent, Drafts, Trash). It distinguishes from sibling tools which deal with messages rather than folders.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly indicates when to use this tool (to list IMAP folders), and the context implicitly excludes alternatives since no sibling tool lists folders. It could be improved by explicitly stating 'use this to see the folder structure before working with messages', but the current text is sufficient.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
list_messagesC
List the most recent messages in a mailbox, newest first.
| Name | Required | Description | Default |
|---|---|---|---|
| limit | No | ||
| mailbox | No | Mailbox path, e.g. INBOX, Sent, Trash | INBOX |
| unseenOnly | No | Only return unread messages |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description must carry the full burden. It mentions ordering but omits key behavioral traits like pagination, rate limits, or whether the operation is read-only. The description is too sparse.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, concise sentence that front-loads the core purpose. Every word is necessary, and there is no redundancy or filler.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the simplicity of the tool (3 optional params, no output schema), the description covers the basic purpose but leaves gaps in behavioral context such as return format or pagination. It is minimally adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 67%, but the description adds no additional parameter information beyond what the schema provides. It does not explain the 'limit' parameter meaning or compensate for the missing schema descriptions.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'list', the resource 'messages in a mailbox', and the ordering 'newest first'. It provides a specific purpose but does not explicitly differentiate from sibling tools like 'search_messages'.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No guidance is given on when to use this tool versus alternatives (e.g., 'search_messages' for filtered queries). The description lacks context about prerequisites or exclusions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
mark_messageC
Change the read or flagged status of a message.
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | ||
| flag | Yes | ||
| mailbox | No | INBOX |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It only states it changes status, but does not disclose if the operation is destructive, requires authentication, or has side effects. The mutating nature is implied but not explicitly noted.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence, very concise with no redundant words. It effectively communicates the core action. However, it may be too brief, lacking necessary details, but conciseness alone is strong.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given three parameters, an enum, and no output schema, the description is insufficiently complete. It does not describe return values, behavior on errors, or the effect on the message. The tool's simplicity is not fully captured.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 0%, yet the description does not elaborate on any parameters. It does not explain the 'uid' (message identifier), the 'flag' values (seen, unseen, etc.), or the optional 'mailbox'. The enum is self-explanatory, but the description adds no value beyond the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the verb 'change' and the resource 'read or flagged status of a message', indicating the tool modifies message flags. It distinguishes from sibling tools like send_mail, list_messages, etc., which perform different operations. However, it does not mention that a specific message uid is required, which could be inferred from context.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
No usage guidelines are provided. The description does not indicate when to use this tool versus alternatives (e.g., get_message for reading, send_mail for sending). It lacks context on prerequisites or typical use cases.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
search_messagesA
Search messages in a mailbox by sender, recipient, subject, body text, or date range.
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Filter by recipient address/name | |
| from | No | Filter by sender address/name | |
| text | No | Filter by body text substring | |
| limit | No | ||
| since | No | ISO date, only messages on/after this date | |
| before | No | ISO date, only messages before this date | |
| unseen | No | Only unread messages | |
| mailbox | No | INBOX | |
| subject | No | Filter by subject substring |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries full burden. It discloses filtering capabilities but lacks details on return format, pagination (implied by limit), side effects (e.g., if messages are marked as read), or authentication requirements.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, lean sentence of 13 words that immediately states the tool's purpose, with no superfluous content.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given 9 parameters, no output schema, and no annotations, the description is adequate but incomplete. It doesn't explain output format, pagination, or potential combination logic, leaving gaps for an agent to infer.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is high (78%), so baseline 3 is appropriate. The description adds natural-language grouping of filter parameters but doesn't elaborate on how they combine or the meaning of limit and mailbox beyond defaults.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Search') and resource ('messages'), and lists common filtering criteria (sender, recipient, subject, body text, date range), clearly distinguishing this from sibling tools like list_messages or get_message.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies when to use this tool (when needing to filter by those criteria) but provides no explicit guidance on when not to use it or how it compares to alternatives like list_messages.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
send_mailA
Send a new email, or reply to an existing one, via SMTP.
| Name | Required | Description | Default |
|---|---|---|---|
| cc | No | ||
| to | Yes | Recipient address(es), comma-separated | |
| bcc | No | ||
| html | No | HTML body | |
| text | No | Plain text body | |
| subject | Yes | ||
| inReplyTo | No | Message-Id being replied to | |
| references | No | References header for threading |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations provided, so description carries full burden. Only mentions 'via SMTP', implying network and auth requirements, but no details on rate limits, size constraints, error handling, or whether replies require existing message IDs.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Single sentence with no unnecessary words. Information is front-loaded and easy to parse.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
With 8 parameters, no output schema, and no annotations, the description is too minimal. It lacks explanation of parameter formats (e.g., comma-separated recipients), required auth setup, success/error responses, and any limitations.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema coverage is 63%, so baseline is 3. Description does not add any additional meaning to parameters beyond what schema already provides. The reply functionality implies use of inReplyTo/references but is not explicit.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Clearly states verb 'Send' or 'reply', resource 'email', and method 'via SMTP'. Distinguishes between new and reply operations. No sibling tool has overlapping purpose.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
States when to use: sending new email or replying to existing. Does not explicitly state when not to use or alternatives, but siblings are distinct operations, so context is clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
Each tool targets a distinct action: flagging, sending, listing mailboxes, listing messages, searching, and fetching. No overlaps or ambiguity.
All tool names follow a consistent verb_noun pattern with lowercase and underscores (e.g., list_mailboxes, send_mail). No mixing of styles.
Six tools is well-scoped for an email server, covering essential operations without being too few or overly numerous.
Covers core email tasks (list, send, search, read, flag) but lacks operations like delete/move messages or manage mailboxes, which are minor gaps.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Email infrastructure for AI agents — send, receive, search, and reply to email over MCP.
Email inboxes for AI agents: send, receive, reply, search, and manage threaded email over MCP.
A MCP server for Gmail that lets you search, read, and draft emails and replies.
Read, search, send, organize, draft and schedule email across your inboxes from any MCP client.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server that lets Claude read, search, send, label, and manage your Gmail through OAuth2.MIT
- FlicenseBqualityBmaintenanceMCP server that connects Claude to iCloud Mail, enabling reading, searching, sending, and organizing emails via IMAP/SMTP.14
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol (MCP) server that enables Claude Desktop to manage emails via SMTP and IMAP. Send emails, fetch unread messages, and create draft replies directly from conversations.45MIT
- AlicenseNot gradedqualityDmaintenanceA cross-platform MCP server that provides Claude with email access via IMAP, supporting multiple email providers and account management.MIT
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/96b2gwbdg8-dev/imap_mail_connector'
If you have feedback or need assistance with the MCP directory API, please join our Discord server