BREP_mcp — drive the BREP CAD application from an agent, with no display
brep-mcp runs the real BREP CAD application headlessly (under
egui_kittest) and serves it as a
Model Context Protocol server, over stdio or
streamable HTTP. An agent — or a script, or a CI job — opens documents, adds
and edits features, moves the pointer, reads state and takes screenshots with
no window and no person at the machine.
The server is BREP_mcp_core, the
same one BREP_app embeds behind
brep-app --mcp to expose a visible window. Use brep-app --mcp to drive a
window you are watching, brep-mcp for everything else.
Install
Rendering goes through wgpu, so the machine needs a GPU or a software
Vulkan or OpenGL driver; it does not need a display server.
Quick start
Register it with an MCP client over stdio; for example, in a .mcp.json:
Or serve streamable HTTP on a loopback port (0 picks a free one; the URL is
printed on stderr):
Without an MCP client:
Sessions keep their store, screenshots and logs under the OS temporary
directory unless --session-root or BREP_MCP_SESSION_ROOT says otherwise.
The tools
The tool list is generated from the application's own registries, so it is
exactly what the application can do: about 190 tools, each with a JSON Schema
for its input in tools/list. The groups:
- session —
session_start,session_stop,session_restart,session_info, and recording a session's calls back out as a script. Each session is its own headless application. - document — new, open, save, activate and close documents;
document_import(STEP, IGES, STL, OBJ, 3MF) anddocument_export(native, STEP, STL, OBJ, IGES, glTF, flat-pattern DXF/SVG, drawing SVG/PDF); part attributes, families and templates. - features and history — the feature catalogue and schemas,
feature_add,feature_set_params, delete, reorder, roll back, undo and redo, expressions. - scene and camera — entities, picking, hover, selection, visibility,
mass properties;
camera_get,camera_set,zoom_to_fit,standard_view. - pointer, keyboard and widgets — real input through the application's own input path: move, press, drag, wheel, keys and text, and clicking a named widget.
- assembly, pmi, sheets, harness, ecad and metadata — assembly constraints and components, PMI views and annotations, drawing sheets, wire harnesses, the electronics workbenches, and custom metadata.
- state, settings, shell and frame — the application's published state, settings, windows and panes, and frame timing.
- capture —
wait_idle,wait_frames,wait_stateandscreenshot(the whole window, the viewport, or a region, returned inline and saved as PNG).
brep-mcp schema --write <dir> writes the full tool and feature reference
(Markdown and JSON) into a directory.
Feature flags
None.
Licence
The Autodrop3d licence in LICENSE.md, shipped in the crate (license-file
in the manifest). It is not an SPDX licence: read it before you modify or
redistribute the crate.