# Inbox for AI agents — MCP server and CLI

Inbox keeps the user's paperwork (letters, invoices, receipts, contracts, tax and insurance documents) as PDFs in their
own iCloud Drive and reads each document on the device: kind, sender, date, amount, deadlines, references, line items
and the full text. On the Mac an AI agent can read all of this, read-only, through:

- **MCP**: `inbox-cli mcp`, a Model Context Protocol server over stdio, and
- **CLI**: `inbox-cli search|list|get|deadlines|file|status`.

Both use the same five tools, the same permission switch and the same access log.

## 1. Switch it on (the user, once)

In the Mac app: **Inbox › Einstellungen › KI-Zugang** → turn on "KI auf diesem Mac darf Dokumente lesen".
The section shows the exact commands below with the right path, ready to copy. Only the app can turn access on; the
CLI cannot. Turning it off blocks every tool immediately.

Program path (default install): `/Applications/Inbox.app/Contents/MacOS/inbox-cli`

## 2. Connect your agent

### Claude Code

```sh
claude mcp add inbox -- "/Applications/Inbox.app/Contents/MacOS/inbox-cli" mcp
```

### Claude Desktop

`~/Library/Application Support/Claude/claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "inbox": { "command": "/Applications/Inbox.app/Contents/MacOS/inbox-cli", "args": ["mcp"] }
  }
}
```

Restart Claude Desktop afterwards.

### Cursor, LM Studio and other MCP clients

Use the same `mcpServers` entry in the client's MCP configuration (Cursor: `~/.cursor/mcp.json`, LM Studio:
`mcp.json` in its settings). With a local model in LM Studio nothing leaves the Mac at all.

### Codex CLI

`~/.codex/config.toml`:

```toml
[mcp_servers.inbox]
command = "/Applications/Inbox.app/Contents/MacOS/inbox-cli"
args = ["mcp"]
```

### An agent on another machine of the user (SSH)

macOS does not let a process started over SSH read iCloud Drive. The running Inbox app answers instead: `inbox-cli mcp`
forwards to it over a local socket. Keep Inbox open on the Mac and register, on the other machine:

```sh
claude mcp add --scope local inbox -- ssh -o BatchMode=yes <user>@<mac> \
  "/Applications/Inbox.app/Contents/MacOS/inbox-cli" mcp --as <agent-name>
```

`--as` puts the agent's name in front of the client name in the access log. `inbox-cli status` says whether the app answers.

### Agents with a shell instead of MCP

Call the CLI directly:

```sh
INBOX="/Applications/Inbox.app/Contents/MacOS/inbox-cli"
"$INBOX" status
"$INBOX" deadlines --days 30
"$INBOX" search telekom rechnung
"$INBOX" get 6F1C0F7E-1111-2222-3333-444455556666
```

## 3. Tools (MCP) and commands (CLI)

| MCP tool | CLI | Arguments | Returns |
|---|---|---|---|
| `search_documents` | `search <words…> [--limit N]` | `query` (all words must occur), `limit` 1–100, default 20 | matching documents, newest first |
| `list_documents` | `list [--category C] [--year Y] [--limit N]` | `category`, `year`, `limit` 1–200, default 50 | documents, newest first |
| `get_document` | `get <id>` | `id` | Markdown dossier: all recognised facts and the full text |
| `upcoming_deadlines` | `deadlines [--days N]` | `days` 1–365, default 60 | open deadlines, earliest first, including ones overdue by up to 14 days |
| `document_file` | `file <id>` | `id` | absolute path of the PDF on this Mac |
| — | `status` | — | whether access is on, library and log location |

Categories: `invoice, receipt, hospitality, travel, contract, letter, tax, insurance, bank, payslip, health, identity, other`.

All MCP tools are annotated `readOnlyHint: true`. There are no tools that change, move, delete or send documents.

### Output format

One document per line, fields separated by ` · `:

```
- id <UUID> · <file name> · <kind> · <sender> · <document date YYYY-MM-DD> · <amount>
```

Deadlines: `- <YYYY-MM-DD> · <label, e.g. Zahlbar bis> · <document line as above>`.

Recommended flow: `upcoming_deadlines` or `search_documents` → pick ids → `get_document` for the details.

### Errors

- Access switched off: MCP result with `isError: true` and the text "Der KI-Zugang zu Inbox ist ausgeschaltet …";
  the CLI prints the same to stderr and exits with code 1. Ask the user to switch it on; do not retry in a loop.
- Unknown id, unknown category, missing argument: `isError: true` / exit code 1 with a German message.
- Bad CLI usage: exit code 2.

## Privacy

- Inbox reads documents on the device. It has no server and no account.
- The MCP server and the CLI run on the user's Mac and read the Inbox folder in their iCloud Drive. They do not open
  network connections.
- What an agent reads goes wherever that agent sends it. With a cloud model (Claude, GPT, Gemini …) the text of the
  documents it fetches goes to that provider; with a local model it stays on the Mac.
- Each access is written to `~/Library/Application Support/Inbox AI Access/access-log.jsonl`: time, client name and
  version, tool, what was asked (search words, not content) and which documents were returned. The app shows the
  latest entries under KI-Zugang and can clear the log.

## Limits

- Mac only. On iPhone and iPad the documents are available to Siri and Shortcuts through the app's own actions
  ("Dokumente suchen", "Offene Fristen", "Dossier für KI"), not through MCP.
- Web chat apps (ChatGPT, claude.ai in the browser) cannot reach a program on the user's Mac and therefore cannot use
  this server.
- Requires macOS 26.
