# Documentation

> Learn how to install, configure and integrate Pigeon.

---

LLMS index: [llms.txt](/llms.txt)

---

Pigeon is a local-first email client in a single Go binary. It syncs IMAP
accounts into SQLite and exposes them through a REST API, an MCP server and a
command-line digest.

Start with the quick start, then jump to the guide for the feature you need.
The REST API guides are split by business area.

- [Quick Start](quickstart/) — Install, run and add your first account
- [Tokens & Auth](tokens/) — Manage API tokens for remote access
- [CLI](cli/) — `pigeon digest` and other commands
- [Backup & Restore](backup/) — Back up the database and secret key, and restore safely
- [Supported Providers](providers/) — Mailbox providers recognised out of the box
- [REST API Basics](api/) — Base URL, authentication, errors and conventions
- [Accounts & Autodetection](accounts/) — Create accounts and detect provider settings
- [Mailboxes & Sync](mailboxes/) — Mailbox listing, counts and IMAP synchronization
- [Messages & Flags](messages/) — Read mail, fetch bodies and change flags
- [Search](search/) — Search the local cache across accounts
- [Sending Mail](send/) — Send over SMTP and archive to the Sent mailbox
- [MCP Server](mcp/) — Connect AI clients over stdio or HTTP
- [Security & Deployment](security/) — Encryption, tokens and running remotely
- [Architecture](architecture/) — Components, data flow and storage layout
{.cards}

---

Section pages:

- [Quick Start](/docs/quickstart/): Install Pigeon, start the server and add your first mail account.
- [Features](/docs/features/): What makes Pigeon different — the highlights at a glance.
- [Tokens & Auth](/docs/tokens/): Create, list and revoke API tokens for remote clients and agents.
- [CLI](/docs/cli/): Serve, sync, digest and token management from the terminal.
- [Backup & Restore](/docs/backup/): Back up the database, secret key and manifest into one archive, and restore it safely.
- [REST API Basics](/docs/api/): Base URL, authentication, error format and the endpoint map.
- [Supported Providers](/docs/providers/): Mail providers Pigeon recognises out of the box.
- [Accounts & Autodetection](/docs/accounts/): Create, list, update and delete mail accounts, and detect provider settings.
- [Mailboxes & Sync](/docs/mailboxes/): List mailboxes, read counts and run incremental IMAP synchronization.
- [Messages & Flags](/docs/messages/): List and read mail, fetch bodies lazily and change read or flagged state.
- [Search](/docs/search/): Search cached mail across mailboxes and accounts.
- [Sending Mail](/docs/send/): Send mail over SMTP and archive a copy to the Sent mailbox.
- [Settings](/docs/settings/): Read and update web UI settings shared by every browser.
- [MCP Server](/docs/mcp/): Connect AI clients to Pigeon over stdio or Streamable HTTP.
- [Security & Deployment](/docs/security/): How Pigeon protects credentials and tokens, and how to run it remotely.
- [Architecture](/docs/architecture/): Data flow, synchronization and the on-disk storage layout.
