# BREP_mcp — headless automation host
Runs the real BREP app
under `egui_kittest` and exposes the shared `BREP_mcp_core` server. Tools and
schemas come from the app registries.
From the repository root:
```sh
./build.sh mcp
./build.sh mcp-serve
./build.sh test-mcp
BREP_mcp/target/release/brep-mcp serve --http 8765
BREP_mcp/target/release/brep-mcp schema --write BREP-dev-data/reference/docs/developer/mcp/generated
BREP_mcp/target/release/brep-mcp shot model.BREP.json model.png
```
`test-mcp` runs core and host tests, the generated-document freshness check,
and the scripts under `../BREP-dev-data/testing/overlay/BREP_mcp/tests/scripts/`. The script CLI currently uses the
headless backend; the remote browser adapter remains planned.
To drive an existing native app window, run `brep-app --mcp` instead. That
host embeds the same core and exposes the window over loopback HTTP.
See the [automation guide](../docs/automation/index.md),
the automation build plan and the generated tool reference —
`reference/docs/developer/mcp-automation-build-spec.md` and
`reference/docs/developer/mcp/generated/commands.md` under `BREP-dev-data/`,
the private development submodule.