Expand description
brep_mcp — the BREP MCP automation server, hosted headlessly.
The server itself lives in brep_mcp_core. This crate re-exports its
main modules (server, http, host, session, tools, schema,
validate, script, program, runner, image, render_mesh,
generate, plm_fixture), so brep_mcp::server::BrepServer is the same
type the app embeds behind brep-app --mcp. It adds what needs the app
compiled in:
- the
headlesshost — the wholeBrepAppunderegui_kitteston a wgpu device — andheadless_backend, the backend everybrep-mcpserver runs on (one headless app per session); command_descriptions, the application’s static command metadata;- the
annotateoverlay the documentation walkthroughs are drawn with; - the
brep-mcpbinary (serve,schema,test,shot,render-mesh,skills).
See the README for installation, client configuration and the tool groups.
Modules§
- annotate
- The DOCS ANNOTATION overlay: the caption band and the highlight ring that turn a headless screen capture into a frame of a feature walkthrough.
- generate
- Render the registries to the checked-in generated docs: what a reviewer diffs to see what a change exposed, and what the freshness test compares against. Nobody edits these.
- headless
- The headless host: the whole
BrepAppinsideegui_kittest::Harnesson a wgpu device, stepped on demand on a dedicated thread (measured in §12). No window, no display. Answers thebrep_mcp_corehost protocol; the app’s own envelope and reply types are converted at the boundary. - host
- The host protocol. A host owns an app instance and answers
commands; the server talks to it through
HostHandle— a tokio channel in, a oneshot per reply out — so async tool handlers never block. - http
- The server over MCP’s streamable HTTP transport, for an app that is already
running (
brep-app --mcp): an agent connects tohttp://127.0.0.1:<port>/mcpinstead of launching a process. rmcp’s transport is a tower service; hyper serves it connection by connection on the listener the caller bound. - image
- Screenshot post-processing: PNG encode/decode, crop, downscale, diff, a
drawn cursor, and the animated-GIF encoder the docs walkthroughs are
written with. Pure CPU,
imagecrate, no fonts — the annotation a walkthrough carries (caption, highlight ring) is painted by the HOST, in egui, before the frame is captured, because there is no font here to rasterise with and nothing in the repo to load one from (BREP_mcp/src/headless.rs,annotate). - plm_
fixture - The PLM fixture: a real
brep-plm servefor onetest-mcpscript. - program
- test-mcp’s SCRIPT MODE: a
BREP_mcp/tests/scripts/*.jsprogram played through code mode, the way an agent drives the app throughrun. - render_
mesh - CPU mesh renderer and silhouette comparison.
- runner
- The
test-mcpscript runner: plays aScriptthrough aToolSet, checks everyexpect, saves and compares images, and writes the per-step artefacts (NNNN-<tool>.json, images,result.json) under an output directory. It knows nothing about hosts or sessions: the tool set it is handed is whatever the session generated, so a script written against the running app and one written against the catalogue tools run the same way. - schema
- The kernel’s feature catalogue (
brep_kernel::feature_schema_catalogue, reached throughbrep_render::features) rendered as JSON Schema. - script
- The
test-mcpscript format (spec Appendix E): a session description plus a list of tool calls, each with optional expectations on the tool’s JSON result and optional image capture / comparison. - server
- The dynamic
rmcp::ServerHandler. - session
- A session: one app instance under one host, plus the session directory
(store, shots, exports, log) and the recorder. Where the
directory and the log ARE is the host’s platform’s business
(
crate::host::Platform): a directory tree natively, a name and a blob URL in a browser page. - tools
- The server’s view of a tool.
- validate
- Feature-parameter validation against the kernel catalogue, run in the
server before a
feature_add/feature_set_paramsreaches the engine.
Functions§
- command_
descriptions - Static application command metadata; discovery does not create a GPU.
- headless_
backend - The backend every
brep-mcpserver runs on: one headless app per session.