brlcad-mcp rc1
Pre-releaseBuild and edit BRL-CAD geometry by describing what you want. It talks to MGED
over the libmcpcad socket.
You need a listener for it to connect to. If you would rather not compile one,
there is a prebuilt
libmcpcad build.
Install
tar xzf brlcad-mcp-rc1.tar.gz
cd brlcad-mcp-rc1
python -m venv .venv
.venv/bin/pip install -r requirements-pinned.txt
.venv/bin/pip install -e .Use -e, since .env is read relative to the installed package.
Then put your key in .env:
OPENAI_API_KEY=sk-...
BRLCAD_PORT=5555
Run it
Start a listener, then:
.venv/bin/brlcad-mcp chatThings to ask it
To check both halves are talking:
what objects are in this database?
Build something:
make a 50mm cube at the origin named block
put a 10mm hole through it along Z
verify block
render block from an isometric view
Give it a drawing:
/image ~/drawings/bracket.jpg model this bracket in BRL-CAD, named bracket
It reads the dimensions off the sheet and confirms them with you before it
builds anything, then renders views of the result. Correcting a number at that
point is much cheaper than rebuilding afterwards.
Some other things it handles:
find the overlaps in this model and fix them
make the hole 12mm
undo the last change
/trace shows which step is running and which tool it called, which helps when
a result surprises you. /help lists the rest.
Without an API key
The tests and the eval harness in tool mode do not need one:
.venv/bin/python -m pytest
BRLCAD_BUILD=/path/to/brlcad/build ./evals/run.shThe harness builds models from known dimensions and checks what came out.
Notes
- The listener accepts local connections only and has no authentication. Treat
it as a development tool rather than something to leave running on a shared
machine. - A model that passes its checks matches the description the agent worked from.
Whether that description matched your drawing is a separate question, so read
the dimensions it reports back. - It records the assumptions it had to make. A long list usually means the
drawing left something open, and those are the quickest things to correct.