mail-index builds a local index of a Gmail mailbox by syncing metadata for the whole inbox and fetching message bodies selectively. It exposes that index through a local read-only MCP server so agents can search, summarize, and recall mailbox content without sending mail data off the machine.
From the registry: Local-first, read-only MCP server for recall over your Gmail: search, contacts, threads, digests.

$ npm install -g mail-indexhttps://www.npmjs.com/package/mail-index$ mail-index init$ mail-index sync --account <account-name> --since <time-range>Please install the `mail-index` MCP server into my current AI client (that's you).
Required prerequisites (do these first if not already done):
- **Install Node.js 24+** — mail-index requires Node 24 or newer.
- **Install mail-index CLI globally** — Install the published npm package so the mail-index and mail-index-mcp binaries are available locally. Run: `npm install -g mail-index` (https://www.npmjs.com/package/mail-index)
- **Initialize mail-index** — Scaffold the operator config and data directory before using the MCP server. Run: `mail-index init`
- **Connect a Gmail MailSource adapter and authenticate** — Set up a Gmail adapter (gog recommended, or gws) and authenticate with a Google OAuth client or the mail-index beta client. The MCP server only adds the server; it does not install the adapter, sign you in, or sync your mailbox. (docs/INSTALL.md#2-connect-a-mailbox-pick-an-oauth-path)
- **Perform initial mailbox sync** — Sync at least one mailbox so the local index has data for the MCP server to query. Run: `mail-index sync --account <account-name> --since <time-range>`
Canonical MCP server config (stdio transport):
- command: `mail-index-mcp`
- args: []
Note: Preferred portable config uses the installed mail-index-mcp binary. README also shows an npx form for Claude Code: `npx -y -p mail-index mail-index-mcp` (Windows via `cmd /c npx -y -p mail-index mail-index-mcp`). No MCP-specific environment variables are documented in the README.
Add this MCP server to my current client's config in the correct format for you. If you need secrets or credentials I haven't provided, ASK me — do not invent values or leave raw placeholders. After adding it, tell me how to verify the server is connected.MCP server for searching Airweave collections with natural language queries.