OpenSCAD MCP
An MCP server for OpenSCAD: the agent renders parts at a known scale, measures geometry and finds collisions in assemblies
- 170 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- Runs a local OpenSCAD on supplied code and, without an allowed-path list, reads any file the process can reach
- Writes export files and a render cache to disk
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/openscad-mcpDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- Runs a local OpenSCAD on supplied code and, without an allowed-path list, reads any file the process can reach
- Writes export files and a render cache to disk
This is third-party code. Review the repository files before installing.
What it does
The MCP server runs a local OpenSCAD and returns images together with a text digest: camera, view direction, scale and bounding box. The render tool produces views, exact cross-sections with a scale bar, parts in separate colours and before-and-after comparisons. The measure tool reports numbers taken from the geometry itself: bounding box, volume, area, mass and centre of mass, holes with diameter and depth, overhangs, islands and wall thickness for FDM printing. The check tool compares assembly parts with each other: interference with penetration depth, minimum clearance, contact area, hole alignment and motion. Check rules live in a YAML file and run from a shell with `openscad-mcp check checks.yaml`, exiting with 0, 1 or 2. export_model writes STL, 3MF, AMF, DXF, SVG, PDF and CSG, and packs an assembly into one 3MF with named objects. The reference tool holds fits, metric fasteners, heat-set inserts, bearings, magnets and FDM design rules. Every response carries errors, warnings and hints from OpenSCAD output, because a failed assert() still exits with code 0 and draws a blank scene.
Who it is for. Engineers and makers who design printable parts and assemblies in OpenSCAD with an agent and want dimensions verified by numbers rather than by eye.
Good fit when
- An enclosure with a lid is built from several parts and you need interferences and clearances found before printing
- The agent drew a part and you want to confirm its dimensions and wall thickness from a scaled image
- You need fits and hole diameters for M3 screws and a 608 bearing
- Assembly checks must run in a Makefile or CI with a clear exit code
- A finished assembly has to be exported to 3MF with named parts for a slicer
Not a fit when
- The model is built in FreeCAD or Fusion 360: the server understands OpenSCAD source only
- Scripts come from untrusted sources and there is no container or path restriction
- You need a free-form sculpted shape rather than a parametric part written in code
Example request
Cut a section of the lid 12 mm up the z axis and tell me the wall thickness, then check the clearance between the lid and the bodyMCP
- Transport
- stdio, http, sse
- Authentication
- not required
Environment variables
OPENSCAD_PATH- Path to the OpenSCAD executable when it is not detected automatically.
MCP_ALLOWED_PATHS- Directories scripts may read from. Unset means no path validation.
Limitations
A local OpenSCAD install is required, version 2021.01 or newer. The server runs through uv or Python 3.10 and newer. By default MCP_ALLOWED_PATHS is unset: OpenSCAD can read any file the process can reach through include, use and import, and there is no OS-level sandbox. For third-party scripts keep the server in a container. Each image costs about 640 vision tokens, so ask only for the views you need. Distances below the tessellation error check reports as unresolved and asks for higher quality.
How to disable. Remove the server with `claude mcp remove openscad` or delete the openscad entry from your MCP client config. The Claude Code plugin is disabled through /plugin.
FAQ
How do I connect OpenSCAD MCP to Claude Code?
Run `claude mcp add openscad --transport stdio -- uvx openscad-mcp`. OpenSCAD must be installed, otherwise pass its path with `--env OPENSCAD_PATH=/path/to/openscad`. The check_openscad tool reports the version and capabilities.
How is it different from running openscad in a terminal?
The agent gets numbers along with the image: scale, bounding box, volume, clearances and interference depth. OpenSCAD errors and warnings arrive in the response instead of being lost behind exit code 0.
Can assembly checks run in CI?
Yes. `uvx openscad-mcp check checks.yaml --allow /path/to/project` reads a rules file and exits with 0, 1 or 2, so it is easy to call from a Makefile.
Which agents does it work with?
Claude Code installs it in one command or as a plugin with the openscad-design skill. The README gives ready config snippets for Claude Desktop, Cursor, Windsurf and VS Code.
What if OpenSCAD exits cleanly but the scene is blank?
Read the errors, warnings and hints fields in the server response: OpenSCAD exits with code 0 even on a failed assert(), and the server surfaces such messages in the response.
Discussion
No questions or reviews yet.
Related
MCP serversA CAD MCP server for build123d: the agent builds a part step by step, checks renders, measures geometry and exports STEP and STL.
An MCP server for CAD modeling in SolidCraft: the agent builds parametric 3D parts, measures volume, looks at a screenshot and exports to STEP
FreeCAD MCP: an AI agent in parametric CAD
FreeCAD MCP (blwfish)
An MCP bridge between an agent and FreeCAD: 41 tools for parametric parts, CAM toolpaths, meshes and model diagnostics
The create-cad-files skill builds a dimensioned part from a plain description and returns validated STEP and STL files.
ClassCAD CAD MCP server: an agent builds parts and assemblies with scripts, views snapshots and saves STEP and STL
The openmcp CLI and a VS Code extension for debugging MCP servers: tools, prompts and resources, chat with a model, test cases
Comparison with similar tools
Cards that share the main search query, and how they differ.
| Tool | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| OpenSCAD MCP (this card) | no | not required | 170 | |
| FreeCAD MCP | no | not required | 3,310 | drives the FreeCAD application through an addon, while this server renders and checks OpenSCAD source |
| text-to-cad | no | 26,233 | a skill library for CAD, CAE and CAM with STEP, STL and 3MF export rather than a render-and-check server for OpenSCAD source |
README in short
A FastMCP server for designing printable parts in OpenSCAD: scaled rendering, measurements, assembly checks, export and a fastener reference. It installs through uvx from PyPI, with a Claude Code plugin and skill. The README covers the parts, quality, variables and include_paths parameters, environment settings and a threat model. MIT licence.