What Is solidcraft-cli? (Quick Summary)
solidcraft-cli is SolidCraft's native Rust command-line engine for headless parametric CAD scripting, geometry inspection, multi-format export (STEP, STL, and 3MF), and local Model Context Protocol (MCP) automation. Because the desktop application and solidcraft-cli execute the exact same B-rep engine commands, any part generated through a script or AI agent opens cleanly in the desktop or browser viewport with an intact feature timeline.
Official desktop and CLI packages—including the separate macOS Universal CLI archive—are distributed on solidcraft.io/download and github.com/tangency-labs/solidcraft.
solidcraft-cli Command Cheat Sheet
| Workflow | Command | What It Does |
|---|---|---|
| Verify Install | solidcraft-cli --version |
Confirms solidcraft-cli is reachable in your PATH and prints the build version |
| Headless MCP Server | solidcraft-cli mcp |
Starts an isolated local stdio MCP session with zero GUI overhead |
| Load Existing Part in MCP | solidcraft-cli mcp --in part.sc |
Opens an existing .sc file inside the MCP session so Claude or Codex edits it directly |
| Live Desktop Viewport Bridge | solidcraft --control 7878 & then solidcraft-cli mcp --connect 127.0.0.1:7878 |
Connects your AI agent to the open desktop app so you watch sketches and extrusions happen live |
| Preview Auto-Setup | solidcraft-cli mcp setup --dry-run |
Shows which local AI clients were detected and previews config edits without writing files |
| Automatic Client Setup | solidcraft-cli mcp setup |
Automatically registers SolidCraft MCP inside supported local AI clients |
Live GUI Bridge Mode: Watch Claude or Codex Model in Real Time
Headless solidcraft-cli mcp is ideal for batch generation and CI pipelines, but when iterating visually on an enclosure or mechanical mount, Live GUI Bridge Mode is dramatically faster than reopening files after every prompt:
- Start the SolidCraft desktop application with its local control port enabled:
solidcraft --control 7878 &
- Point
solidcraft-cli mcpat the running desktop instance on localhost:
solidcraft-cli mcp --connect 127.0.0.1:7878
- Prompt Claude Code, Claude Desktop, OpenAI Codex CLI, or Cursor to add a mounting boss, fillet an edge, or adjust wall thickness. Every command updates the live viewport immediately, and you can orbit, measure, or manually edit the timeline right alongside the AI agent.
Need full JSON or TOML configuration snippets for Claude Code, Claude Desktop, OpenAI Codex CLI, or Cursor? Use our SolidCraft MCP Config Generator.
Inspection, Measurement & Export Capabilities via CLI & MCP
One major reason engineers prefer solidcraft-cli over pure text-to-mesh tools is deterministic inspection and verification. Through the CLI and MCP tool surface, scripts and AI agents can:
- Query Exact Physical Properties: Inspect bounding-box dimensions (
X × Y × Z), exact solid volume, center of mass, and face indices before exporting a file to your 3D printer. - Select Geometry Deterministically: Perform ray-picking (
view.pick) and inspect named features so downstream fillets and holes land on the intended faces rather than guessing triangle indices. - Export Manufacturing & Slicer Formats: Write clean STEP (
.step), 3MF (.3mf), and STL (.stl) files alongside viewport snapshots or studio PNG renders for documentation and GitHub pull requests.
How to Write High-Precision SolidCraft AI Prompts
Using the interactive Parametric Prompt Builder at the top of this page—or writing your own prompts from scratch—follow four engineering rules that dramatically reduce failed rebuilds:
- Always Anchor to Named Parameters: Explicitly ask the agent to declare variables (
width,depth,wall_t,bolt_clear) before creating Sketch 1. That ensures resizing a bracket later modifies one parameter instead of forcing a full rebuild from scratch. - Separate Primary Solids From Edge Treatments: Instruct Claude or Codex to complete the base extrusion and subtractive cutouts first, inspect the bounding box, and apply fillets or chamfers as the final steps on the timeline.
- Bake In Real-World FDM Clearances: Never prompt an
M3hole at3.0 mmfor a 3D printer. Specify3.2 mm(+0.2 mmslip fit) forM3,4.2 mmforM4, and0.3 mmper-side clearance for snap-fit lids. - End Every Prompt With Automated Verification: Tell the agent to check the final bounding box, confirm minimum wall thickness, save the native
.scsource file, and export.stepor.3mffor OrcaSlicer or Bambu Studio.
Next Steps Across the AI CAD Guide
- Need platform installers or Windows/macOS
PATHfixes? Read our SolidCraft Install Guide. - Want to connect Claude Code, Claude Desktop, OpenAI Codex CLI, or Cursor? Open our SolidCraft MCP Setup Generator.
- Also working with FreeCAD? Read our FreeCAD MCP Setup & Comparison Guide or SolidCraft vs FreeCAD vs Fusion 360.
- New to constrained sketching? Start with our 10-Minute Beginner Tutorial or return to the SolidCraft Guide.