# Reported issues for imap-mcp-server

Pod holds 18 of 28 problems reported by people outside the maintainer team. Issues filed by the project's own owners, members and collaborators are excluded entirely — a maintainer's release checklist is not a warning to a prospective user.

Back to [imap-mcp-server](/mcp/imap-mcp-server).

## Most discussed

### Strato IMAP: search/fetch always return empty despite non-zero messageCount; imap_folder_status throws

## Summary

Against a Strato-hosted IMAP account (`imap.strato.com:993`, TLS), `imap_test_account` correctly reports a non-zero `messageCount` for INBOX, but every read/search tool returns zero results — and `imap_folder_status` throws a hard error instead of returning data.

## Environment

- `imap-mcp-server` v1.5.2 (via `npx -y imap-mcp-server`, stdio MCP transport)
- Node v26.5.0, macOS 25.5.0 (Apple Silicon)
- Provider: Strato (`imap.strato.com:993`, `smtp.strato.com:465`, TLS/STARTTLS both

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/138) · 2026-08-03 · open · external user · 2 comments

### Support OAuth 2.0 / XOAUTH2 authentication for providers that have deprecated basic auth

## Problem

Microsoft 365 (Exchange Online) and other major providers have fully deprecated basic authentication for IMAP. App passwords are blocked at the tenant level even when the mailbox has IMAP enabled and an AllowBasicAuthImap authentication policy is assigned. The server responds with AUTHENTICATE failed for any password-based login.

This affects any user whose email provider requires OAuth 2.0 — Microsoft 365, Google (when "less secure apps" is off), and others moving away from static 

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/124) · 2026-07-18 · open · external user · 2 comments

### Feature Request: includeBody option for search and get_latest (N+1 query problem)

## Feature Request: `includeBody` option for search and get_latest (N+1 query problem)

### Problem

Fetching 5 emails with body requires 6 sequential MCP tool calls: 1× `imap_search_emails` to find them, then 5× `imap_get_email` to load each body. Each call is a full LLM roundtrip, so costs and latency scale linearly with the number of emails.

Benchmark with Claude Code (5 short emails):

| Metric | Value |
|---|---|
| MCP calls | 7 (2 search + 5 get) |
| Wall time | 2 min 22 sec |
| Cost | $0

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/106) · 2026-07-01 · closed · external user · 2 comments

### Enable Selective Tool Access via MCP Configuration

Is there a way to enable only a selected set of tools via the MCP? For instance, I would like the agent to have read-only access. It would be great if this could be configured as an argument.

```json
{
  "mcpServers": {
    "imap": {
      "command": "npx",
      "args": ["-y", "imap-mcp-server"],
      "env": {}
    }
  }
}
```

I can add this if you would like.

Thank you, and great work!

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/87) · 2026-06-12 · closed · external user · 2 comments

### Feat: Support direct npx execution for easier MCP configuration

Hi!

Thanks for this awesome IMAP MCP server. 

I would love to use this server seamlessly by just adding it to my configuration file via `npx`, without having to clone or install the repository locally.

Currently, running the server directly via `npx` fails.

Could you please update the configuration or the binary entrypoint so that running `npx github:nikolausm/imap-mcp-server` works out of the box? This would make setting up and updating the server incredibly easy for everyone.

Thank you fo

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/75) · 2026-05-29 · closed · external user · 8 comments

### Unable to edit account

Unable to edit account, i got this error message: "Failed to load account: can't access property "endsWith", domain is undefined"

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/73) · 2026-05-22 · closed · external user · 3 comments

### Better error message when IMAP access is disabled at provider (e.g. GMX)

During setup with GMX, the connection test fails with a generic 
"connection failed" error. The actual root cause is that IMAP access 
must be manually enabled in the GMX account settings first 
(Settings → Email → POP3 & IMAP → Enable access).

Suggestion: When the connection fails, check if the error could 
be related to IMAP being disabled at the provider level and show 
a more helpful message like:

"Connection failed. If you are using GMX, Web.de or similar providers, 
please make sure IMAP

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/41) · 2026-03-28 · closed · external user · 2 comments

### 3 high severity vulnerabilities

Howdy,

I'm keen to try this out.  And npm install gave this warning.

```
$ npm audit                                                                                                                                                        [8:04:31]
# npm audit report

semver  <5.7.2
Severity: high
semver vulnerable to Regular Expression Denial of Service - https://github.com/advisories/GHSA-c2qf-rxjj-qqgw
No fix available
node_modules/utf7/node_modules/semver
  utf7  >=1.0.2
  Depends on vulnerab

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/1) · 2025-09-25 · closed · external user · 2 comments

## Most recent

### Improve reliability and diagnostics for outgoing email attachments

## Summary

`imap_send_email` supports attachments supplied as base64 content or local file paths. A successful SMTP delivery can still leave clients unable to determine whether an attachment was correctly validated and composed as MIME.

## Expected behavior

When an attachment is requested, the server should either:

1. deliver a message containing the corresponding MIME part, or
2. fail before sending with an actionable, attachment-specific error.

## Proposed improvements

- Document one can

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/160) · 2026-08-28 · open · external user · 0 comments

### tls:false does not disable imapflow's opportunistic STARTTLS upgrade, so cert validation still fails on shared-cert hosts

## Summary

Setting `tls: false` on an account only maps to imapflow's `secure: false` (no *implicit* TLS on connect). It does not disable imapflow's **opportunistic STARTTLS** upgrade: if the server's CAPABILITY response advertises STARTTLS, imapflow still auto-upgrades and validates the certificate against the dialed host (see PR #119). For providers that advertise STARTTLS on a hostname covered only by a shared/wildcard cert, this fails even though the account was explicitly configured for a 

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/158) · 2026-08-27 · open · external user · 0 comments

### npm run web exits immediately on Windows (CLI entry point check fails)

## Problem

On Windows, `npm run web` prints the npm banner and exits immediately. No server starts, no error is shown.

```
> imap-mcp-server@1.5.2 web
> tsx src/web/server.ts

PS C:\Users\me\imap-mcp-server>
```

## Cause

The CLI entry point guard at the end of `src/web/server.ts`:

```ts
if (import.meta.url === `file://${process.argv[1]}`) {
```

On Windows the two sides can never match:

- `import.meta.url` → `file:///C:/Users/me/imap-mcp-server/src/web/server.ts` (forward slashes, three sl

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/136) · 2026-07-31 · closed · external user · 0 comments

### [bug report] imap_send_email: array input for to/cc corrupts headers, 100% delivery failure

## Summary

Calling the `imap_send_email` MCP tool with `to` and/or `cc` as a JSON array of `"Name <email>"` strings produces a malformed address header. Every recipient in the array gets merged into a single broken address (literal `[`/`]` characters end up inside a quoted local-part, in front of `@domain`). Every mail server that received these messages rejected every recipient — 3 out of 3 test sends bounced completely.

## Tool

`imap_send_email`. Reproduced on v1.5.2.

**Note on schema:** I

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/127) · 2026-07-19 · closed · outside contributor · 0 comments

### Sent-folder auto-save fails silently for non-default folder names

**Description:**

When sending via `imap_send_email`, the tool appears to attempt saving a copy
of the sent message to a folder, but the target folder name seems to be
hardcoded (e.g. `"Sent"`). On accounts where the actual "Sent" folder has a
different name, this save fails silently — the response returns
`"savedToSent": false` with no error and no indication of what to do about it.

**Evidence across 4 real accounts (same MCP server instance):**

| Account type        | Actual sent folder name

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/125) · 2026-07-18 · closed · external user · 0 comments

### Feature Request: Header-based spam indicators in imap_check_spam

## Problem

`imap_check_spam` currently checks sender domains against known spam/disposable domain lists. This misses spam from freshly registered or one-off domains where the technical mail headers reveal clear spam patterns.

## Proposal

Add deterministic header checks to `imap_check_spam` — pure string matching on raw headers, no external dependencies:

- **X-Mailer**: Flag known bulk-mail tools (Sendy, PHPMailer, etc.)
- **Precedence**: `bulk` or `list` on non-mailing-list messages
- **Auth

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/115) · 2026-07-13 · closed · external user · 1 comment

### error with imap setup (cli)

`npx -p imap-mcp-server imap-setup`

```
const zeroWidthClusterRegex = /^(?:\p{Default_Ignorable_Code_Point}|\p{Control}|\p{Format}|\p{Mark}|\p{Surrogate})+$/v;
                              ^

SyntaxError: Invalid regular expression flags
    at ModuleLoader.moduleStrategy (node:internal/modules/esm/translators:152:18)
    at ModuleLoader.moduleProvider (node:internal/modules/esm/loader:299:14)

```

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/108) · 2026-07-02 · closed · external user · 1 comment

### imap_search_emails: limit returns oldest matches instead of newest

## Problem

When using imap_search_emails with a limit in a single folder, you do not get the newest matches back. You get the oldest ones instead.

## Cause

The single folder search path never sorts the matches by date. IMAP UID SEARCH returns UIDs in ascending order, meaning from oldest to newest. The code then cuts the list directly with slice(0, limit). This returns the oldest matches, not the newest.

The multi folder search path (searchAllFolders) is not affected, because it already sorts

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/107) · 2026-07-02 · closed · external user · 1 comment

### **Feature Request: Support IMAP folder/mailbox creation via the IMAP MCP connector**

Thanks for this project, I just started experimenting with it. When trying to follow my usual style of archiving messages, I struggled with it lacking the ability to create new folders. Maybe I overlooked something. I am not an experienced developer, but I tried to search the code to see if I (or Claude) just overlooked the feature, but I was unable to find anything, so I hope this suggestion is valid. Otherwise, please disregard.

## Summary

The IMAP MCP connector currently supports moving ema

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/64) · 2026-05-01 · closed · external user · 1 comment

### Feature: imap_find_thread_messages — find inbox messages belonging to a known thread

Use case: When organizing emails into folders, it's common to move one message from a thread but miss the replies that arrived later (or duplicates). We need a way to automatically find all inbox messages that belong to the same conversation thread as messages already sorted into a folder.

Proposed new tool: `imap_find_thread_messages`

Parameters:
    •    accountId — the account
    •    sourceFolder — folder with already-sorted messages (e.g. Review.Articles)
    •    searchFolder — folder t

[Read the thread](https://github.com/nikolausm/imap-mcp-server/issues/63) · 2026-04-26 · closed · external user · 1 comment

The remaining reports are on [the project's issue tracker](https://github.com/nikolausm/imap-mcp-server/issues).
