-
Notifications
You must be signed in to change notification settings - Fork 1
MCP Interface
Canonical reference:
docs/mcp.mdin the repository is the source of truth for the tool contract, argument / result shapes, error codes, and versioning. This page is a community-oriented orientation + FAQ; when the two disagree, the in-repo doc wins.
vibe-cading-engine is an optional MCP (Model Context Protocol) server that lets
an LLM client introspect the engine's model classes, read the live design context
(tolerance profile + Lego/Technic nominals), and compile a model class to
STEP/STL/SVG — over a local stdio transport (no network, no port, no API key).
- Install the extra:
pip install -e ".[mcp]" - Launch:
python -m vibe_cading.mcp - Register it with your client — e.g. Claude Code:
claude mcp add vibe-cading-engine -- python3 -m vibe_cading.mcp
Full client setup (Claude Desktop, generic mcpServers JSON, cwd notes) is in
docs/mcp.md → Connect a client.
| Tool | Does |
|---|---|
list_engine_classes |
List the engine's model classes (filterable by module / name). |
query_engine_class |
Full record for one class (constructors, doc, result accessor). |
get_design_context |
Live tolerance profile + curated Lego/Technic nominals + doc pointers. |
compile_model |
Compile a class locally to STEP/STL/SVG; returns artifact file paths. |
Argument and result shapes: docs/mcp.md → Tools.
Does the server expose a network port? No — stdio only (JSON-RPC on stdin/stdout). The client launches it as a local subprocess.
Why does python -m vibe_cading.mcp print an install hint and exit? The
mcp SDK is an optional extra. Run pip install -e ".[mcp]" first.
Where do compiled artifacts go? Into an OS temp dir (vibe_cading_mcp_*);
compile_model returns the file paths for the client to open locally. STEP/STL
are never inlined; SVG can be inlined with return_inline: true under a 256 KiB cap.
Which tolerance profile does compile_model use? Whatever the model class
resolves on its own (via .env / get_profile). Pass a fit through params if
the class exposes one. get_design_context reports the live profile.
Have a tutorial or tip to add? This is a community page — edit away. Keep the canonical contract in docs/mcp.md.
📍 The repo docs/ is canonical — this wiki is a light orientation layer. When the two disagree, the repo wins.
Canonical docs (repo = source of truth)