Skip to main content
Glama

allinbox

All your inboxes, one query, any agent.

Let Claude, Codex, Gemini or Cursor search every email account you have, in a single call. Free, open source, and it runs on your machine.

CI License: MIT Node MCP Read-only by default


Why

You have a work inbox, a university one, a personal one and that old address you never closed. Your AI agent's built-in email connector reaches one of them.

allinbox gives the agent all of them at once:

You:    What do I have pending this week across all my email?

Agent:  • Thesis review moved to Friday              (uni)
        • Invoice #2041 is due Thursday               (work)
        • Ana: "Q4 budget, can you check slide 3?"    (work · also in personal)
        • Flight check-in opens tomorrow              (personal)

Related MCP server: IMAP Mail MCP

Quick start

npx allinbox

Using another package manager? pnpm dlx allinbox or bunx allinbox work the same.

A guided setup (English / Español) does the rest:

  1. Add your accounts. It recognizes your provider, including Google Workspace and Microsoft 365 domains such as a university or company address. It opens the right page in your browser to create an app password, already signed in to the right account, and checks the login before saving anything.

  2. Drafts (optional). Let your agent leave reply drafts, only to recipients you allow.

  3. Connect your agents. It finds Claude Code, Claude Desktop, Cursor, Gemini CLI and Codex on your machine and registers allinbox in each one, backing up their config first.

Restart your agent and ask it anything about your mail.

What's an app password? A separate password just for allinbox. You can revoke it anytime without touching your real password. Gmail needs 2-Step Verification turned on first; the setup walks you through it.

What you can ask

  • "What do I have pending this week across all my email?"

  • "Did anyone reply about the internship, in any account?"

  • "Summarize the whole thread with Ana about the Q4 budget."

  • "Draft a reply to the landlord saying Tuesday works." (drafts enabled)

How it works

flowchart LR
    A[Your agent<br/>Claude · Codex · Gemini · Cursor] -- MCP --> B[allinbox<br/>on your machine]
    B -- IMAP, read-only --> C[Gmail]
    B -- IMAP, read-only --> D[Google Workspace]
    B -- IMAP, read-only --> E[iCloud · Yahoo · Fastmail · your domain]

One search_all call fans out to every account in parallel. A slow account times out on its own without blocking the rest. Results are merged, duplicates are collapsed (same Message-ID across accounts), and everything is cleaned before your agent sees it: no quoted replies, signatures, HTML or kilometer-long tracking links. Your agent reads more mail with fewer tokens.

Works with

Agents

Email providers

Claude Code, Claude Desktop

Gmail, Google Workspace

Codex

iCloud, Yahoo, AOL

Gemini CLI

Fastmail, Zoho, GMX

Cursor, VS Code, any MCP client

Any IMAP server (your own domain)

Tools

Tool

What it does

list_accounts

The accounts allinbox can search

search_all

One query across every account. query, since_days (30), limit (25), optional accounts

read_email

One message by id, cleaned. max_chars (4000)

read_thread

The whole conversation, oldest first, in one call. max_chars (8000)

create_draft

Only if you enabled drafts. Saves to your Drafts folder and never sends. reply_to_id threads it

On Gmail, query accepts Gmail search syntax (from:ana has:attachment).

Security

Giving an AI access to your email deserves a straight answer:

  • It cannot send. There is no SMTP code in allinbox at all. Mailboxes are opened read-only (IMAP EXAMINE), so nothing is deleted, moved or even marked as read.

  • Drafts are opt-in and limited to recipients you approve. They land in your Drafts folder for you to review.

  • Prompt-injection aware. Every email reaches the agent wrapped in a tag with a random per-session id that a malicious email can't forge, together with an instruction never to follow orders found inside an email.

  • Local only. No server, no account, no telemetry. Passwords live in your OS keychain (Windows Credential Manager, macOS Keychain, libsecret). ~/.allinbox/config.json holds only hosts and usernames.

  • Pinned. Agents are registered with an exact version, so a future release never runs without you re-running setup.

Install as a plugin or extension

Run npx allinbox once first to add your accounts. Then, instead of letting the setup edit your agent's config:

Claude Code plugin (includes a skill that teaches Claude how to use allinbox)

claude plugin marketplace add tomasbenavidez/allinbox
claude plugin install allinbox@allinbox

Gemini CLI extension

gemini extensions install https://github.com/tomasbenavidez/allinbox

Claude Desktop: download allinbox.mcpb from the latest release and open it (or drag it into Settings → Extensions).

Connect an agent manually

The setup does this for you. If you prefer to do it by hand:

Claude Code

claude mcp add --scope user allinbox -- npx -y allinbox serve

Claude Desktop · Cursor · Gemini CLI · VS Code: add this to the client's MCP config (claude_desktop_config.json, ~/.cursor/mcp.json, ~/.gemini/settings.json). Close Claude Desktop first: it rewrites its config while it runs.

{ "mcpServers": { "allinbox": { "command": "npx", "args": ["-y", "allinbox", "serve"] } } }

Codex (~/.codex/config.toml)

[mcp_servers.allinbox]
command = "npx"
args = ["-y", "allinbox", "serve"]

On Windows, use "command": "cmd" with "args": ["/c", "npx", "-y", "allinbox", "serve"].

CLI

allinbox              guided setup (in a terminal) / MCP server (when an agent runs it)
allinbox add          add one account
allinbox connect      connect allinbox to your installed agents
allinbox list         show accounts and draft settings
allinbox test [id]    check that accounts can log in
allinbox remove <id>  remove an account and its stored password

FAQ

Does my email go through any server? No. allinbox talks IMAP directly from your computer to your provider. What your agent does with the text it reads is up to the agent you use.

Outlook, Hotmail or Microsoft 365? Not yet. Microsoft blocks password logins for these accounts, so they need OAuth, which is next on the roadmap.

Gmail says "The setting you are looking for is not available for your account". Turn on 2-Step Verification first. On school or company Google accounts, your administrator may have disabled app passwords entirely.

Why not Gmail OAuth instead of app passwords? Google requires a paid yearly security assessment before an app can read Gmail through a shared OAuth client. App passwords keep allinbox free, local and set up in two minutes.

Roadmap

Token benchmark · local full-text index for years of mail · Outlook OAuth · one-click install bundles for every agent. See ROADMAP.md.

Contributing

Issues and PRs are welcome.

pnpm install
pnpm test     # unit tests + IMAP integration tests against GreenMail in Docker
pnpm build

Please read the invariants in CLAUDE.md before touching anything near sending, flags or the untrusted-content wrapper.

License

MIT © Tomás Benavidez

Available Tools

4 tools
list_accountsA
Read-only

List the email accounts allinbox can search.

Inputs: no named parameters.

read_emailA
Read-only

Read one email by id. Quoted replies, signatures and HTML are stripped.

Inputs: id (required), max_chars.

read_threadA
Read-only

Read the whole conversation an email belongs to, oldest first, each message cleaned. Cheaper than several read_email calls: the char budget is split across messages.

Inputs: id (required), max_chars.

search_allA
Read-only

Search ALL email accounts in one call. Returns one line per message: id | date | from | subject. Duplicates across accounts (same Message-ID) are merged. Empty query = latest messages.

Inputs: limit, query, accounts, since_days.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 4 tools

    Disambiguation5/5

    Each tool has a clearly distinct role: account discovery, cross-account search, single-message reading, and thread reading. Search vs. read vs. list boundaries are explicit, and the descriptions clarify when to use read_thread instead of repeated read_email calls.

    Naming Consistency5/5

    All tool names use lowercase snake_case and begin with a clear verb: list_accounts, search_all, read_email, read_thread. The pattern is predictable and easy to map to actions.

    Tool Count5/5

    Four tools is well-scoped for a read-only, cross-account email search and reading server. Each tool earns its place without redundant or overlapping operations.

    Completeness4/5

    The core read-only workflow is covered: list accounts, search messages, read a message, and read a thread. Minor gaps exist around pagination or result limits and searching within a specific account, but agents can work around these for the stated purpose.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables LLMs to read, search, and manage emails via IMAP with secure, read-only access to email accounts.
      6
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LLM clients to read and search email via IMAP with tools for listing folders, searching messages, and fetching message content. It supports pagination, snippets, and thread context, and is designed for local AI workflows.
      10
      17 npm
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI assistants to read IMAP mailboxes and create drafts without sending them. Supports multiple accounts and folders, read-only message fetching, and search, with sending deliberately disabled so drafts are reviewed and sent manually.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables an AI agent to search and read a single IMAP mailbox through a local, read-only index and write Markdown drafts without ever sending mail.
      MIT