Command Palette

Search for a command to run...

Home / Servers

mailindex-mcp

by alexanderkrauck

mailindex-mcp

release image CI licence: MIT MCP

A mail client for an AI agent. Everything you can do in Thunderbird — search, move, mark, delete, draft — over your own index, on your own machine.

Most email MCP servers forward each question straight to IMAP. That answers "show me my last 10 messages" and falls apart on everything else: SEARCH is inconsistent between providers, it cannot see inside attachments, it never tells the model whether it actually searched everything, and it cannot do a thing about what it finds.

So when you ask an assistant to clear eight thousand newsletters out of your inbox, it tells you that would be eight thousand tool calls and suggests you go and do it by hand in the web interface.

This one keeps its own copy of your mail and acts on it:

delete_mail(account_id=3, participants=["[email protected]", ...])
→ matched: 4147, affected: 4147, to: "[Google Mail]/Bin"

One call. One connection. Six seconds. That is the difference between a search box and a mail client.

Claude answering a question about a mailbox through this server

A real question against a live index of about 59,000 messages across six accounts. One string is blurred: a case number belonging to a real filing.

Why this instead of the other email MCP servers

This projectTypical email MCP
Can it change anythingMove, mark, delete, draft, manage folders — in bulk, by searchRead-only, or one message per call
SearchOwn PostgreSQL index, GIN full-text, stemmed across languagesLive IMAP SEARCH per call
Result completenessExact total_count, signed cursors, per-account coverageWhatever the folder returned
AttachmentsText extracted and indexed at sync time (PDF, DOCX, XLSX, PPTX, OCR)Base64 into the model's context, or not at all
Attachment binariesNever stored; refetched through a 5-minute signed URLStored on disk or inlined
TransportRemote HTTP endpointLocal stdio process on your machine
Setup on the clientPaste a URLInstall a runtime, edit config JSON, store credentials locally
UsersMulti-tenant, every row owner-scopedSingle user
Tool surface19 tools, all annotatedFrequently 40+

What it costs you, stated up front. You run PostgreSQL and a container. The index is about 28 MB per 1,000 messages — a 50,000-message archive is roughly 1.5 GB — and the image is 1.25 GB because it carries OCR language data. The first sync downloads every message once; search works on what has arrived while the rest continues in the background, and each account reports its own coverage so the model knows what it has not seen yet.

In exchange your assistant can answer questions about mail from years ago, including text inside attachments, and then act on the answer. None of it leaves your machine.

Quickstart

Five minutes, local only, no accounts to create anywhere.

git clone https://github.com/alexanderkrauck/mailindex-mcp.git
cd mailindex-mcp
cp .env.example .env
docker compose up -d

Related servers

n8n

Updated today

by n8n-io

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

199,260

mcp-server-git

OfficialUpdated today

by modelcontextprotocol

A Model Context Protocol server providing tools to read, search, and manipulate Git repositories programmatically via LLMs

89,176

mcp-server-fetch

OfficialUpdated today

by modelcontextprotocol

A Model Context Protocol server providing tools to fetch and convert web content for usage by LLMs

89,176

@modelcontextprotocol/server-everything

OfficialUpdated today

by modelcontextprotocol

MCP server that exercises all the features of the MCP protocol

89,176