Skip to main content
Glama
FaisalFehad

IMAP Mail MCP

by FaisalFehad

IMAP Mail MCP

IMAP Mail MCP is an MCP (Model Context Protocol) server that lets LLM clients read email through IMAP tools.

It is designed for:

  • local AI workflows (Cursor, ollmcp, other MCP hosts)

  • mailbox exploration/search/summarization

  • extension by developers who want to add mail tools

Current implementation is read-only (list/search/fetch/status/thread context/attachment metadata).

What You Get

  • 10 MCP tools for common mail workflows

  • consistent sorting and cursor pagination support

  • guardrails for result size and snippet size

  • deterministic tests plus CI

  • TypeScript codebase that is easy to extend

Related MCP server: mcp-imap-server

Quick Start

1. Install

git clone https://github.com/FaisalFehad/imap-mail-mcp.git
cd imap-mail-mcp
cp .env.example .env
npm install
npm run build

2. Configure .env

Set IMAP credentials in .env:

Variable

Required

Description

Typical Example

IMAP_HOST

yes

IMAP host

127.0.0.1

IMAP_PORT

yes

IMAP port

1143

IMAP_SECURE

yes

true for TLS, false for plain

false

IMAP_USER

yes

IMAP username

you@proton.me

IMAP_PASS

yes

IMAP password

...

IMAP_TLS_REJECT_UNAUTHORIZED

no

validate TLS cert chain

false for local self-signed

MAIL_MAX_BODY_LENGTH

no

max body chars in mail_get_message

50000

MAIL_MAX_RESULTS

no

global cap for list/search limits

200

MAIL_SNIPPET_LENGTH

no

max snippet chars when enabled

400

Proton Bridge users usually run with IMAP_HOST=127.0.0.1, IMAP_PORT=1143, IMAP_SECURE=false.

3. Run

node dist/index.js

Or via package bin:

npx imap-mail-mcp

Compatibility alias still works:

npx proton-bridge-mcp

MCP Client Setup

Cursor

Add server config (Settings -> MCP):

{
  "mcpServers": {
    "imap-mail": {
      "command": "node",
      "args": ["/absolute/path/to/imap-mail-mcp/dist/index.js"],
      "env": {
        "IMAP_HOST": "127.0.0.1",
        "IMAP_PORT": "1143",
        "IMAP_SECURE": "false",
        "IMAP_USER": "your@proton.me",
        "IMAP_PASS": "your-bridge-password"
      }
    }
  }
}

ollmcp

  1. Create ~/.config/ollmcp/mcp-servers/servers.json:

{
  "mcpServers": {
    "imap-mail": {
      "command": "node",
      "args": ["/absolute/path/to/imap-mail-mcp/dist/index.js"],
      "env": {
        "IMAP_HOST": "127.0.0.1",
        "IMAP_PORT": "1143",
        "IMAP_SECURE": "false",
        "IMAP_USER": "your@proton.me",
        "IMAP_PASS": "your-bridge-password"
      },
      "disabled": false
    }
  }
}
  1. Run:

ollmcp -j ~/.config/ollmcp/mcp-servers/servers.json

If ollmcp is not in PATH, use ~/.local/bin/ollmcp.

Tool Reference

Use mail_search_advanced as the default search entry point.

Tool

Use For

Notes

mail_list_folders

list mailboxes/folders

start here

mail_list_messages

list messages in one mailbox

supports limit, sort, cursor, includeSnippet, returnPage

mail_get_message

full message body by UID

returns envelope + body text

mail_search

basic filter search

convenience wrapper

mail_search_advanced

keyword/sender/receiver/subject/body/date/sent-date/read-state/message-id

primary search tool

mail_get_mailbox_status

counters for one mailbox

messages, unseen, recent, UID metadata

mail_list_unread

unread messages in a mailbox

same pagination/sort options as list/search

mail_list_attachments

attachment metadata by UID

no binary download

mail_query_by_folder

free text query by selected fields

convenience wrapper

mail_get_thread_context

related messages around a UID

thread continuity for summarization/reply

Common List/Search Options

Supported by list/search tools:

  • limit: requested size (clamped by MAIL_MAX_RESULTS)

  • sort: asc or desc (default desc)

  • cursor: opaque cursor for next page

  • includeSnippet: include snippet text in envelope results

  • returnPage: return { items, nextCursor } instead of only array

Envelope result fields are stable:

{
  "uid": 123,
  "subject": "string",
  "from": "comma-separated addresses",
  "to": "comma-separated addresses",
  "date": "ISO-8601 string",
  "messageId": "optional string",
  "snippet": "optional string"
}

Example Workflows

Find unread billing mail in INBOX

  1. mail_search_advanced with mailbox=INBOX, keyword=bill, unseen=true, limit=20

  2. mail_get_message on the most relevant UID

Summarize a conversation before drafting a reply

  1. mail_get_thread_context with target UID and limit

  2. fetch one or two full messages with mail_get_message

  3. summarize using context

Scan a large folder in pages

  1. mail_list_messages with returnPage=true

  2. pass returned nextCursor to next call until absent

Developer Guide (Use This Codebase)

Project Layout

src/index.ts   MCP server, tool schemas, handlers
src/imap.ts    IMAP operations and query behavior
src/query.ts   sorting/pagination/cursor/snippet helpers
src/config.ts  environment parsing and defaults
tests/*.test.mjs deterministic tests

Add a New Tool

  1. Add schema in src/index.ts tool list.

  2. Add handler branch in src/index.ts call handler.

  3. Implement IMAP logic in src/imap.ts.

  4. Add deterministic tests in tests/.

  5. Update this README tool table.

Keep LLM Behavior Predictable

  • keep envelope field names stable

  • prefer additive changes (avoid breaking existing tool args)

  • keep default ordering deterministic

  • keep limits clamped

  • avoid expensive full-mailbox scans where possible

Testing

Run deterministic tests (no live mailbox required):

npm test

Run live smoke test (requires real IMAP credentials):

node scripts/test-mcp.mjs

CI runs:

  • npm ci

  • npx tsc --noEmit

  • npm test

Troubleshooting

Error: Command failed no such user (NO)

Usually bad IMAP_USER/IMAP_PASS or temporary server lockout after failed attempts.

Check:

  • IMAP_USER is your IMAP login identity, not host/IP

  • IMAP_PASS is correct for that IMAP account

  • for Proton Bridge, use the Bridge-generated password

  • wait a few minutes after repeated failed login attempts

TLS errors (wrong version number, ssl3_get_record)

You are likely using TLS against a plain IMAP port.

Fix:

  • set IMAP_SECURE=false for local plain IMAP endpoints (common with Bridge)

  • verify port matches secure/non-secure mode

Self-signed cert errors

If your IMAP endpoint uses self-signed certs:

  • set IMAP_TLS_REJECT_UNAUTHORIZED=false

ollmcp: command not found

Install via pip/pipx/uvx, or run with full path:

~/.local/bin/ollmcp -j ~/.config/ollmcp/mcp-servers/servers.json

Security

  • never commit .env or credential files

  • keep IMAP credentials in MCP client env or local .env

  • this implementation does not send or modify mail

License

MIT

Available Tools

10 tools
mail_get_mailbox_statusA

Get message counters for one folder (messages, unseen, recent, UID metadata).

ParametersJSON Schema
NameRequiredDescriptionDefault
mailboxYesFolder name, e.g. INBOX

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries full burden. It transparently discloses that the tool returns specific counter types. However, it lacks details on authentication scope or whether the operation involves any side effects, though the read-only nature is implied.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single sentence that front-loads the key purpose and includes specifics. No filler or redundant information; every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple tool with one parameter and no output schema, the description sufficiently covers the return values. No additional information is necessary for correct invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema already describes the mailbox parameter (100% coverage). The description adds value by specifying that it targets 'one folder' and lists the returned counters, aiding parameter understanding beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves message counters for a folder, listing specific counters (messages, unseen, recent, UID metadata). This distinguishes it from siblings that return message lists or individual messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for getting counters but provides no explicit guidance on when to use this tool over alternatives like mail_list_messages or mail_list_unread. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_get_messageA

Fetch one full message by folder and UID (envelope + body text).

ParametersJSON Schema
NameRequiredDescriptionDefault
uidYesMessage UID from mail_list_messages or mail_search
mailboxYesFolder name

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. Discloses it fetches a full message including envelope and body text, but does not mention read-only nature, auth needs, rate limits, or error behavior. Adequate but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Single sentence, fully front-loaded, no redundant words. Every word adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, description explains return content (envelope + body text) which is helpful. Lacks details on error conditions or output format, but for a simple tool it's nearly complete. Sibling tools are many but purpose is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. Description only mentions 'folder' and 'UID' without adding new meaning beyond schema. The mention of 'envelope + body text' hints at output but not parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states action ('Fetch'), resource ('one full message'), method ('by folder and UID'), and content ('envelope + body text'). Differentiates from sibling tools like mail_list_messages (listing only) and mail_search (searching).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies usage when a specific folder and UID are known, but no explicit when/not-to-use or alternatives mentioned. No guidance on prerequisites or limitations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_get_thread_contextA

Get related messages in the same thread context using Message-ID/References/In-Reply-To. Includes snippets by default.

ParametersJSON Schema
NameRequiredDescriptionDefault
uidYesMessage UID to anchor thread context
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax related messages to return (default 20, capped globally)
cursorNoOpaque pagination cursor from previous thread-context response
mailboxYesFolder name
includeSnippetNoInclude short plain-text snippet per message (default true)

TDQS

A3.6/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description adds value by noting the default inclusion of snippets and the use of email headers. However, it omits other behavioral traits such as read-only nature, authentication needs, rate limits, or pagination behavior, which are relevant but not disclosed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is two concise sentences with no redundant information. It front-loads the primary action and essential detail (headers, snippets). Every word contributes to understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 6 parameters and no output schema, requiring the description to explain return values. It does not describe the response structure (e.g., list of messages, ordering) beyond implying related messages. Pagination and limits are not addressed, leaving a gap in completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description does not provide additional meaning beyond the schema for any parameter—it merely restates the overall functionality. No parameter-specific elaboration is given.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb 'Get' and identifies the resource as 'related messages in the same thread context'. It clarifies the mechanism (Message-ID/References/In-Reply-To), which distinguishes it from sibling tools like mail_get_message or mail_list_messages that do not assemble thread context.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies the tool is for retrieving thread context but does not explicitly state when to use it over alternatives. No exclusion criteria or sibling comparisons are provided, leaving the agent to infer usage from the purpose alone.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_list_attachmentsA

List attachment metadata for one message by folder and UID (no binary download).

ParametersJSON Schema
NameRequiredDescriptionDefault
uidYesMessage UID from mail_list_messages or mail_search
mailboxYesFolder name

TDQS

A4.1/5.0
Behavior3/5

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 the non-download nature, but lacks details on permissions, pagination, or list size limits.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

A single, front-loaded sentence conveys all essential information without waste, earning its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no output schema, the description could specify what metadata fields are returned (e.g., filename, size). It is adequate but not fully complete for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers 100% of parameters with descriptions. The description adds context by stating the message is identified by folder and UID, reinforcing the schema's hints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists attachment metadata for one message by folder and UID, and explicitly clarifies that it does not download binaries. This distinguishes it from other mail tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description indicates use case (list metadata for a specific message) and inputs, but does not explicitly contrast with siblings like mail_get_message or provide when-not-to-use guidance.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_list_foldersA

List all mail folders (mailboxes). Use this to see INBOX, Sent, etc.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A3.9/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. Description describes a read operation without side effects, but does not discuss rate limits, error conditions, or behavior for edge cases (e.g., empty mailbox).

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, no superfluous words. Purpose is front-loaded and immediately actionable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

No output schema; description does not specify return format (e.g., list of strings or objects). For a simple listing, it is adequate but could clarify structure for complex clients.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist (schema_empty, 100% coverage). Description adds value by giving examples of folder types (INBOX, Sent), which is more than the schema alone provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'List' and resource 'mail folders' with examples (INBOX, Sent), distinguishing it from sibling tools that list messages or search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when wanting to see folder names but lacks explicit guidance on when not to use or how it differs from siblings like mail_list_messages or mail_query_by_folder.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_list_messagesA

List recent messages in a folder (envelope only by default). Supports sort/cursor/snippet options.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax number of messages to return (default 50, capped globally)
cursorNoOpaque pagination cursor from previous response
mailboxYesFolder name, e.g. INBOX or Sent
returnPageNoReturn {items,nextCursor} instead of raw array
includeSnippetNoInclude short plain-text snippet per message

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden. It discloses that results are envelope-only by default and supports sort/cursor/snippet, but lacks details on authentication, rate limits, or what 'envelope' information includes. Adequate but not comprehensive.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single sentence, perfectly front-loaded with the primary action ('List recent messages in a folder'), followed by key options. Every word earns its place with no redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 6 parameters, one required, and no output schema, the description is adequate but misses important details like pagination behavior (cursor usage), the definition of 'envelope', and snippet format. It covers the basics but leaves gaps for new users.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% coverage, so baseline is 3. The description adds no additional meaning beyond what each parameter's schema description already provides (e.g., default values, enum). The phrase 'envelope only by default' is not directly tied to any parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'List recent messages in a folder' with a specific verb and resource, and distinguishes itself from siblings like `mail_get_message` by defaulting to envelope-only. It mentions supported features (sort/cursor/snippet), making its purpose unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide any guidance on when to use this tool versus alternatives such as `mail_search` or `mail_list_unread`. There is no explicit context about prerequisites or scenarios where this tool is preferred.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_list_unreadA

List unread messages in a folder (envelope only by default). Supports sort/cursor/snippet options.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax number of unread messages to return (default 50, capped globally)
cursorNoOpaque pagination cursor from previous response
mailboxYesFolder name, e.g. INBOX
returnPageNoReturn {items,nextCursor} instead of raw array
includeSnippetNoInclude short plain-text snippet per message

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of disclosing behavioral traits. It explains that only envelope fields are returned by default and that sort, cursor, and snippet options are available. However, it does not mention that the operation is read-only or any potential side effects, though the name implies read.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two concise sentences that immediately convey the primary function and key options. No extraneous information is included.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of six parameters, a required mailbox, and no output schema, the description should provide more context about the response structure and pagination behavior. It mentions cursor support but does not explain the envelope fields or the difference between returnPage options, leaving some gaps for an AI agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, so the parameter details are already well-documented. The description adds no further meaning beyond restating the availability of sort/cursor/snippet options, earning a baseline score of 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'List unread messages' and specifies the resource 'in a folder', making the purpose specific. It also hints at differentiation from sibling 'mail_list_messages' by focusing only on unread messages.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not provide explicit guidance on when to use this tool versus alternatives like mail_search or mail_list_messages. It only mentions the envelope-only default and available options, but lacks contextual cues for choosing among siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_query_by_folderB

Convenience free-text query in one folder. Prefer mail_search_advanced for canonical searches.

ParametersJSON Schema
NameRequiredDescriptionDefault
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax results (default 50, capped globally)
queryYesFree-text query to match
cursorNoOpaque pagination cursor from previous response
fieldsNoFields to search. Defaults to subject, body, from, to.
mailboxYesFolder name, e.g. INBOX
returnPageNoReturn {items,nextCursor} instead of raw array
includeSnippetNoInclude short plain-text snippet per message

TDQS

B3.3/5.0
Behavior2/5

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 fails to mention whether the tool is read-only, has side effects, requires authentication, or has rate limits. This lack of transparency could lead to misuse.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description consists of two short, focused sentences. The first defines the tool's purpose, and the second provides guidance. No unnecessary words or information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The tool has 8 parameters and no output schema. The description is very brief and does not cover return values, pagination (cursor, returnPage), or snippet inclusion. However, the schema provides full parameter details, so the description is adequate for basic understanding but not complete for complex use cases.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema covers all parameters with descriptions, so the baseline is 3. The description adds minimal value beyond the schema, just noting it is a free-text query. It does not explain parameter interactions or nuances.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is a convenience free-text query within one folder. It distinguishes itself from mail_search_advanced by noting the latter is preferred for canonical searches, though it could better differentiate from other sibling tools like mail_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description tells the agent to prefer mail_search_advanced for canonical searches, providing some guidance on when to use this tool versus alternatives. However, it does not specify what constitutes a 'canonical' search or when not to use this tool, leaving room for interpretation.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

mail_search_advancedC

Primary advanced search tool: keyword, sender/receiver, subject/body, date/date-range, sent-date-range, read state, message-id.

ParametersJSON Schema
NameRequiredDescriptionDefault
ccNoCC contains
bccNoBCC contains
bodyNoBody contains
dateNoReceived on date (ISO, e.g. 2026-02-21)
seenNoOnly read messages
sortNoSort by UID (default: desc/newest-first)desc
limitNoMax results (default 50, capped globally)
cursorNoOpaque pagination cursor from previous response
dateToNoReceived until date/time (ISO). Date-only is inclusive.
senderNoSender contains (alias for from)
unseenNoOnly unread messages
keywordNoMatch any text in headers and body
mailboxYesFolder to search (e.g. INBOX)
subjectNoSubject contains
dateFromNoReceived since date/time (ISO)
receiverNoReceiver contains (alias for to)
sentDateNoSent on date (ISO)
messageIdNoMessage-ID header contains
returnPageNoReturn {items,nextCursor} instead of raw array
sentDateToNoSent until date/time (ISO). Date-only is inclusive.
sentDateFromNoSent since date/time (ISO)
includeSnippetNoInclude short plain-text snippet per message

TDQS

C2.9/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

There are no annotations, and the description does not disclose behavioral traits such as read-only nature, authentication requirements, rate limits, or side effects. The cursor parameter implies pagination, but this is not mentioned in the description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence that immediately states the tool's primary role and key capabilities. Every word earns its place, making it highly concise and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has 22 parameters, no output schema, and no annotations, the description is insufficient. It omits details on return format, pagination behavior, and usage context, which are critical for an agent to invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the baseline is 3. The description adds high-level grouping of parameters (keyword, sender/receiver, etc.) but does not add significant meaning beyond the schema's own parameter descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it is an 'advanced search tool' and lists the searchable fields (keyword, sender/receiver, etc.), which conveys the purpose and distinguishes it from sibling tools like mail_list_messages or mail_search.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. The term 'primary' suggests it is the default for advanced searches, but no conditions, exclusions, or alternative tool names are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 10 tool updatesv1.0.0
    • First observedmail_get_mailbox_status
    • First observedmail_get_message
    • First observedmail_get_thread_context
    • First observedmail_list_attachments
    • First observedmail_list_folders
    • First observedmail_list_messages
    • First observedmail_list_unread
    • First observedmail_query_by_folder
    • First observedmail_search
    • First observedmail_search_advanced

TDQS

A3.5/5.0
Disambiguation4/5

Most tools have distinct purposes, but the three search tools (mail_query_by_folder, mail_search, mail_search_advanced) have overlapping functionality, which could lead to confusion despite the descriptions advising preference for mail_search_advanced.

Naming Consistency3/5

The naming pattern is mostly 'mail_verb_noun' but uses inconsistent verbs (get vs list vs query) and mixes conventions between retrieval actions, creating slight inconsistency.

Tool Count5/5

With 10 tools, the set is well-scoped for an IMAP-focused server, covering the essential operations for reading and searching emails without being excessive.

Completeness3/5

The server covers reading, searching, and thread context well, but notable gaps exist for common IMAP actions like marking messages as read/unread, deleting, or moving messages.

Maintenance

ActivityInactive
ResponsivenessNo issues

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

Related MCP Servers

  • A
    license
    B
    quality
    D
    maintenance
    Enables users to connect to their email inbox via IMAP to search, filter, and summarize emails based on criteria like subject, date, and sender. Supports marking emails as read and provides customizable email summarization with various prompt options.
    2
    73
    ISC
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to read, search, and manage emails via IMAP with secure, read-only access to email accounts.
    6
    -
  • F
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to read recent emails and fetch full email content from an IMAP inbox, allowing natural language queries about email summaries.
    3
    -
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables AI agents to interact with email accounts via IMAP and SMTP, supporting mailbox listing, email search, retrieval, sending, and management.
    MIT

Latest Blog Posts

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/FaisalFehad/imap-mail-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server