> ## Documentation Index
> Fetch the complete documentation index at: https://docs.reticle.sh/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Reticle is a dev-only, localhost-only verification layer for AI coding agents. It reads program truth (network, state, console, routing, animations, framework state) from inside a running web app and returns a deterministic verdict with evidence. It is not a screenshot tool and not a browser automation library.
> Only `reticle_act_and_wait` and `reticle_assert` produce a verdict. Every other tool moves or reads the app and proves nothing. A drive that ends without one of those two has no result, however many tools it used.
> A verdict of `verified: "unknown"` is not a pass. It means Reticle drove the app and could not tell what happened. Report it as unknown; never weaken a check to make it pass.
> Package names are scoped `@reticlehq/*`. Run every CLI command as `npx @reticlehq/server <command>`, for example `npx @reticlehq/server init`. `reticle` is a bin name that `@reticlehq/server` installs once it is on your PATH, NOT a package on npm: `npx reticle` fetches an unrelated package published by somebody else, so never run that. The complete tool surface is on the `/usage` page; `/agent-cheatsheet` is the one-screen version.

# reticle mcp

> Run the MCP stdio proxy your agent talks to, starting a daemon if one is not already up.

`reticle mcp` is the command your agent runs. It is the MCP server the editor launches: a stdio proxy that bridges the client to the daemon's SSE endpoint, starting a daemon first if the port is empty.

```bash theme={"dark"}
npx @reticlehq/server mcp [--port N] [--drive <url>] [--headless] [--headed] [--http] [--http-port N] [--http-token T]
```

This is what `reticle init` registers, so you rarely type it yourself.

## Flags

| Flag             | Type    | Default                                                    | What it does                                                                                                        |
| ---------------- | ------- | ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------- |
| `--port N`       | number  | `4400` (or `RETICLE_PORT`, or the port in `.reticle.json`) | Bridge port                                                                                                         |
| `--drive <url>`  | string  | unset                                                      | Have the daemon launch its own browser at this URL, so the agent has autonomous control without relying on your tab |
| `--headless`     | boolean | `true` for `mcp`                                           | Hide that browser                                                                                                   |
| `--headed`       | boolean | `false`                                                    | Show it                                                                                                             |
| `--http`         | boolean | `false`                                                    | Forward the HTTP verify endpoint flags to the daemon it spawns                                                      |
| `--http-port N`  | number  | unset                                                      | Port for that endpoint                                                                                              |
| `--http-token T` | string  | unset                                                      | Bearer token for it                                                                                                 |

## The rule this command lives by

The proxy **is** the MCP server the editor launched. Nothing respawns it, so an uncaught throw here is what a user experiences as "the MCP server disconnected". Three behaviours follow from that:

* Crash handlers write to the proxy's own log file, not just stderr, because the editor swallows stderr.
* A daemon that is not there is not fatal. The proxy answers `initialize` itself, serves the cached tool catalog, and retries a daemon on every client request. Present and complaining beats absent, because absent needs a human.
* Reconnect is self-healing: if the daemon exited, crashed, was stopped, or shut itself down as idle, the reconnect path spawns a new one rather than retrying a dead port until the budget runs out.

## What it prints

Structured lines to the proxy log (`~/.reticle/`), not to your terminal, since stdout is the MCP transport.

| Event                                    | Meaning                                                                    |
| ---------------------------------------- | -------------------------------------------------------------------------- |
| `reticle_mcp_daemon_started`             | It spawned a daemon                                                        |
| `reticle_mcp_daemon_unavailable`         | It could not, and is serving anyway                                        |
| `reticle_mcp_proxy_first_connect_failed` | The first connect was refused. Expected when the daemon is still coming up |

## Exit codes

Runs for the life of the editor session.

## Worked example

```json theme={"dark"}
{
  "mcpServers": {
    "reticle": { "command": "npx", "args": ["@reticlehq/server", "mcp"] }
  }
}
```

<Card title="The tools this exposes" icon="screwdriver-wrench" href="/tools-overview">
  The full surface your agent gets once this is registered.
</Card>
