AI CAD Guide
INTERACTIVE MCP CONFIG GENERATOR

SolidCraft CLI Cheat Sheet & Parametric Prompt Builder

Build millimeter-accurate AI CAD prompts for Claude, Codex, and Cursor, and master solidcraft-cli headless scripting, auto-setup, and live viewport bridge mode.

1. Parametric AI Prompt (Claude / Codex / Cursor)

  
2. Matching solidcraft-cli Command

  

Runs 100% locally in your browser. Adjust dimensions in millimeters and paste directly into Claude Code, OpenAI Codex CLI, or Cursor.

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.

SolidCraft CLI architecture connecting headless scripts, live desktop bridge, and AI MCP agents to editable B-rep CAD files

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:

  1. Start the SolidCraft desktop application with its local control port enabled:
solidcraft --control 7878 &
  1. Point solidcraft-cli mcp at the running desktop instance on localhost:
solidcraft-cli mcp --connect 127.0.0.1:7878
  1. 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:

  1. 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.
  2. 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.
  3. Bake In Real-World FDM Clearances: Never prompt an M3 hole at 3.0 mm for a 3D printer. Specify 3.2 mm (+0.2 mm slip fit) for M3, 4.2 mm for M4, and 0.3 mm per-side clearance for snap-fit lids.
  4. End Every Prompt With Automated Verification: Tell the agent to check the final bounding box, confirm minimum wall thickness, save the native .sc source file, and export .step or .3mf for OrcaSlicer or Bambu Studio.

Next Steps Across the AI CAD Guide

SolidCraft CLI & Prompts FAQ

What can solidcraft-cli do?

solidcraft-cli runs headless CAD scripts, inspects solid geometry (volume, bounding box, center of mass), exports STEP, STL, and 3MF files, and hosts SolidCraft's built-in local stdio MCP server.

How do I watch Claude or Codex edit a 3D model live in SolidCraft?

Launch SolidCraft with solidcraft --control 7878 &, then connect the MCP server using solidcraft-cli mcp --connect 127.0.0.1:7878 so AI edits appear live inside your desktop viewport.

Does solidcraft-cli have an automatic MCP setup command?

Run solidcraft-cli mcp setup --dry-run first to inspect detected AI clients without modifying files, then run solidcraft-cli mcp setup to write the configuration automatically.

Can solidcraft-cli MCP edit an existing .sc file?

Yes. Pass the --in flag (for example, solidcraft-cli mcp --in part.sc) so the MCP session starts from your existing parametric project file instead of an empty document.

Which 3D export formats does solidcraft-cli support?

SolidCraft CLI exports STEP (.step), 3MF (.3mf), and STL (.stl) files for 3D printing and CAD interchange, as well as viewport snapshots and rendered PNG images.

Where do I get solidcraft-cli on macOS?

On macOS, Tangency Labs distributes solidcraft-cli both via the official Homebrew cask and as a standalone Universal ZIP archive on GitHub Releases and solidcraft.io/download.