Skip to main content
Glama
README.md
# mcp-imap-server

MCP (Model Context Protocol) server for IMAP email access. Connect Claude to your mailbox directly.

## Setup

```bash
npm install
npm run build
```

## Configuration

Copy `.env.example` to `.env` and fill in your IMAP credentials:

```bash
cp .env.example .env
```

## Claude Desktop / Claude Code Integration

Add to your MCP config (`~/.claude.json` or Claude Desktop settings):

```json
{
  "mcpServers": {
    "imap": {
      "command": "node",
      "args": ["/path/to/mcp-imap-server/dist/index.js"],
      "env": {
        "IMAP_HOST": "mail.datatp.cloud",
        "IMAP_PORT": "993",
        "IMAP_USER": "your-email",
        "IMAP_PASSWORD": "your-password"
      }
    }
  }
}
```

## Tools

| Tool | Description |
|------|-------------|
| `list_folders` | List all mailbox folders |
| `list_messages` | List recent messages in a folder |
| `get_message` | Fetch a single email by UID |
| `search_messages` | Search by subject, from, date, unseen |
| `mark_message` | Set/remove flags (read, flagged) |
| `move_message` | Move message to another folder |
| `delete_message` | Delete or trash a message |
| `create_draft` | Create a new draft email |
| `create_reply_draft` | Create a reply draft on an existing thread (preserves In-Reply-To/References) |

TDQS

A3.6/5.0

Scored across 9 tools

Disambiguation5/5

Every tool has a clearly distinct purpose with no ambiguity. Tools like create_draft and create_reply_draft are closely related but serve different functions (new draft vs. reply), while others like delete_message, move_message, and mark_message each handle specific message operations without overlap.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with snake_case throughout (e.g., create_draft, list_folders, search_messages). There are no deviations in naming conventions, making the set predictable and readable.

Tool Count5/5

With 9 tools, the count is well-scoped for an IMAP email server. Each tool earns its place by covering essential email operations like listing, creating, managing, and searching messages, without being excessive or too sparse.

Completeness5/5

The tool set provides complete CRUD/lifecycle coverage for email management: create (drafts/replies), read (get/list/search), update (mark/move), and delete (delete_message). It covers all core workflows from folder listing to message handling with no obvious gaps.

Maintenance

ActivityInactive
ResponsivenessNo issues