Local-first, read-only MCP server for recall over your Gmail: search, contacts, threads, digests.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
mail-index downloads a preview of your whole inbox to your machine, then smartly fetches the full text of the messages that matter as you use it. That local index lets your AI agent run true summarization and recall over your entire mailbox β instead of being trapped behind Gmail's search bar.
It works through a local MCP server, so any agent (Claude, Codex, any MCP
client) can query it. Local-first β the default index never leaves your machine.
Operators who need an always-on connector can instead deploy the optional,
single-tenant remote Worker Deployment in their own
Cloudflare account; mail-index operates no hosting service.
Read-only by default β it never sends or mutates your mail unless you
explicitly opt into archive + label edits (a least-privilege gmail.modify
re-auth; never send or delete). See ADR-0007.
Ask a vague question β one local MCP call β ranked, snippet-first answer.
Interactive version β
Status: v1.5 β published. Progressive sync, the correspondence graph, the interest engine, curation, the full MCP surface, and the write-back loops are built and tested β and
mail-indexis live on npm with a.mcpbbundle. Still in progress: the bundled Option A OAuth client and signed one-click installers. Architecture lives in docs/PLAN.md; start with docs/INSTALL.md; every release is recorded in CHANGELOG.md.
[!TIP] New in v1.5 β the optional remote Deployment. mail-index can now also run as a single-tenant Cloudflare Worker in your own account: always-on, synced on a cron, and reachable by remote agents over authenticated MCP (plus a small A2A surface). It serves the same tool registry as the local server, backed by a D1 storage driver that passes the same FTS ranking conformance suite, and it can push β Trigger rules match new mail as it lands and fire signed webhooks. Long O(N) work becomes a queued Job instead of a command handback. You can seed a fresh Deployment straight from your existing local index with
mail-index exportβ D1 import, so it starts with your history already indexed. The local CLI + stdio path is unchanged and stays the default, and mail-index still operates no hosting service β the Worker is code you deploy to infrastructure you own. See docs/INSTALL-worker.md, docs/WORKER-SEED.md, ADR-0008.Also new locally: every MCP response carries a freshness block and any stale read now auto-triggers a background sync (previously only the digest composites did).
[!TIP] From v1.4 β opt-in mailbox writes + human-readable labels. mail-index can archive a message and edit its labels directly on Gmail β via the
archive/labelCLI commands and thearchive_message/modify_labelsMCP tools, on both the gog and gws adapters. It stays read-only by default: writes are unreachable until you opt in with a least-privilegegmail.modifygrant (never send or delete) β enable per account withmail-index setup --account <email> --enable-writesor the bundledscripts/enable-writes.sh. Labels render as their human names everywhere (the index caches Gmail's label catalogue and resolvesLabel_3546β¦β "Expedition Insure" in both directions), and you can pass a friendly label name tolabel --add/--remove. See ADR-0007.
Important messages prewarm a local index; the MCP reads from it, touching
Gmail again only when a needed body isn't there yet.
Interactive version β
Requires Node 24+ and a Gmail MailSource adapter β gog (recommended)
or gws. Reading Gmail needs a Google OAuth client, and you get one two
ways: use the mail-index beta client (skip Google Cloud entirely;
request access
to join the ~100-user test list) or bring your own Google Cloud client (no
cap, no request β we walk you through it). See
docs/INSTALL.md Β§2
and docs/oauth-and-verification.md.
(Prefer source? git clone β¦, pnpm install && pnpm build, then run the bins
as node dist/cli/index.js β¦.)
The MCP server registers in one step, but it still needs a mailbox connected
first (see the walkthrough). A .mcpb/claude mcp add only adds the server β
it doesn't install the adapter, sign you in, or sync.
claude mcp add --transport stdio mail-index -- npx -y -p mail-index mail-index-mcp
(on Windows, prefix with cmd /c: β¦ -- cmd /c npx -y -p mail-index mail-index-mcp β
bare npx/.cmd won't spawn. See docs/INSTALL.md Β§7.).mcpb bundle
and double-click it (unsigned during beta β you may need to allow it in System
Settings / Windows SmartScreen). The bundle is self-contained (ships its own
dependencies, run by Claude Desktop's bundled Node β no npx, network, or system
Node needed) so it installs identically on Windows/macOS/Linux. A signed
all-in-one installer that also installs the adapter, signs you in, and syncs is
still in progress; there is no claude:// install link.Teach your agent the common moves. The MCP server already tells the agent when to reach for it (purchases, receipts, bookings, "who said what", "catch me up"), and the repo ships a Claude Agent Skill with the typical recipes (find purchases, catch up, find a contact's mail, summarize a sender). Drop it in for Claude Code/Desktop:
Full walkthrough (auth, curation, enrichment, scheduled sync, desktop-app gotchas) β docs/INSTALL.md. Driving setup with an agent β docs/agent-install.md.
The index keeps metadata for every message and full text only where it earns it,
so it grows with message count, not mailbox size β about 1.5% of your Gmail.
First sync runs ~50 messages/min (one-time, incremental after); search is instant.
Start with --since 1mo for value in minutes, then expand. Sizing table & growth
path β docs/INSTALL.md Β§9.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/mail-index-2)<a href="https://allmcps.com/mcp/mail-index-2"><img src="https://allmcps.com/api/badge/mail-index-2?style=directory" alt="Mail Index on AllMCPs" /></a>