Skip to content

MCP Interface

madMarcus edited this page Jun 19, 2026 · 1 revision

Using the MCP interface

Canonical reference: docs/mcp.md in 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.

What it is

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).

Quick start

  1. Install the extra: pip install -e ".[mcp]"
  2. Launch: python -m vibe_cading.mcp
  3. 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.

The four tools (summary)

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.

FAQ

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.

🧩 vibe-cading


Canonical docs (repo = source of truth)

Clone this wiki locally