openscad-mcp-v2
Integrates with a local OpenSCAD installation to create, validate, render, version, analyze, and export parametric SCAD designs, including opening designs in the OpenSCAD GUI and exporting 3MF/STL files.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@openscad-mcp-v2 design a wall holder for a 28 mm broom handle with two M4 screws"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
openscad-mcp-v2
A local MCP server for OpenSCAD. You describe a part in a chat with Claude (or another MCP client); the client writes parametric OpenSCAD code, and this server stores it, validates it with OpenSCAD, renders images the client checks, shows the model in your OpenSCAD window, keeps every version and exports a 3MF or STL file for your slicer.
The server calls no language model. The MCP client is the model; the server gives it tools and design guidelines for 3D printing.
you: "Wall holder for a 28 mm broom handle, two M4 countersunk screws"
└─ client writes SCAD ─► create_design ─► OpenSCAD errors and a rendered image come back
update_design ◄─ client fixes what it sees
open_in_openscad ─► the model is in your OpenSCAD window and follows changes
you: "export it" ─► export_design ─► /…/broom-holder/exports/broom-holder-v0003.3mfRequirements
OpenSCAD. A development snapshot (2024 or newer) is recommended: its Manifold backend renders in well under a second, so every image is the real geometry. macOS:
brew install --cask openscad@snapshot. Developed and tested with 2026.10.11 on macOS. The 2021.01 release has no Manifold; the server then falls back to OpenSCAD's quick preview (not tested with that release).Node.js 22 or newer.
Related MCP server: openscad-mcp
Setup
The package is not on npm yet. From a checkout:
git clone https://github.com/JohnnyTheTank/openscad-mcp-v2.git
cd openscad-mcp-v2
npm install
npm run buildClaude Code
claude mcp add openscad \
-e OPENSCAD_MCP_WORKSPACE=~/openscad-designs \
-e OPENSCAD_MCP_PRINTERS=a1,a1mini \
-- node /absolute/path/to/openscad-mcp-v2/dist/index.jsAdd --scope user to have it in every project. Then ask for a part, or start with the prompt new_design.
Claude Desktop
claude_desktop_config.json (Settings → Developer → Edit Config):
{
"mcpServers": {
"openscad": {
"command": "node",
"args": ["/absolute/path/to/openscad-mcp-v2/dist/index.js"],
"env": {
"OPENSCAD_MCP_WORKSPACE": "~/openscad-designs",
"OPENSCAD_MCP_PRINTERS": "a1,a1mini"
}
}
}
}Ask the client to run check_setup first: it reports the OpenSCAD version, the libraries it found, the workspace and the printer profiles, and says what is missing.
Configuration
Variable | Default | Meaning |
| auto-detect | OpenSCAD executable, a command name, or the |
|
| Folder with one sub-folder per design |
|
| Comma-separated printer profiles, see below; the first is the default |
|
|
|
|
| Size of rendered images in pixels |
|
| OpenSCAD colour scheme for images |
|
| Limit for validation and the automatic image |
|
| Limit for |
|
|
|
Printer profiles
analyze_design and export_design check the model against the build volume of every configured printer, also turned 90° and lying diagonally.
Built in: a1mini, a1, p1p, p1s, x1c, x1e, h2s, h2d (Bambu Lab), mk4, mini (Prusa), ender3.
Your own: name:WIDTHxDEPTHxHEIGHT in mm.
OPENSCAD_MCP_PRINTERS=a1,a1mini
OPENSCAD_MCP_PRINTERS=voron:350x350x340,a1miniA single call can name another one: printer: "x1c" or printer: "300x300x400".
Tools
Tool | What it does |
| OpenSCAD version and path, libraries, workspace, printer profiles, state of the automatic reload |
| Design guidelines: workflow, code structure, FDM rules, screw sizes, installed libraries, OpenSCAD reference |
| Designs with latest version and time of change |
| Saves new code as version 1, validates it, returns errors with source lines and an image |
| Targeted text edits or complete new code, as a new version; validates and returns an image |
| Current code (or an old version) with its parameters |
| Errors, warnings and echo output of the file as it is on disk |
| Images from |
| Shows the design in the OpenSCAD window, which then follows every change |
| History, and going back (a restore is a new version) |
| Lists the customizer parameters, or changes their values in the file |
| Real size, bounding box, closed-solid check, bed contact, fit per printer |
| 3MF (default) or binary STL into the design's |
| Lessons for later designs: your corrections and preferences, techniques that failed or worked |
Resources: openscad://guidelines/3d-printing, openscad://guidelines/openscad-reference, openscad://guidelines/libraries, openscad://guidelines/learnings, openscad://design/{name}. Prompts: new_design, refine_design.
What counts as an error
OpenSCAD exits with 0 after a failed assert() and still writes files, and it only warns about an unknown module or a missing library although part of the model is then gone. The server treats both as errors and returns them with file, line and the source lines around it, so the client can repair its own code.
Libraries
Libraries in OpenSCAD's library folders are found automatically, and get_guidelines adds usage notes for BOSL2, NopSCADlib and MCAD when they are installed. To install BOSL2 on macOS:
git clone --depth 1 https://github.com/BelfrySCAD/BOSL2.git ~/Documents/OpenSCAD/libraries/BOSL2check_setup prints the library folder of your installation.
The OpenSCAD window
OpenSCAD has no remote control. open_in_openscad starts it with the design's file and relies on OpenSCAD's own setting Design → Automatic Reload and Preview, which makes the window follow the file.
macOS (verified): the server switches the setting on before it starts OpenSCAD. If OpenSCAD is already running with the setting off, the tool says so; switch it on once in the menu.
Linux (implemented, not verified on a Linux machine): the setting is written to
~/.config/OpenSCAD/OpenSCAD.conf; each design opens in its own OpenSCAD process.Windows (implemented, not verified): OpenSCAD is started with the file; switch the setting on once yourself.
The server remembers which designs it opened and does not open a second window for the same file. A window you opened yourself is unknown to it. You can edit the code in OpenSCAD's editor: the server notices the change and keeps it as its own version before the next update.
Learnings
The server learns from the work in your workspace. When you correct the model ("round every edge"), when a technique fails and another one works, or when you change a design yourself in OpenSCAD, the client saves a one-sentence lesson with record_learning. get_guidelines returns these learnings with the guidelines, so the next design starts with them.
Changes you make in OpenSCAD's editor or Customizer are reported to the client as a diff (changed values and changed lines) by the next tool that works on the design.
list_versionskeeps a summary of them.Learnings live in
.openscad-mcp/learnings.jsonin the workspace, at most 100 at a time.list_learningsshows them with the reason; ask the client to forget one that is wrong (forget_learning). Nothing is deleted from the file: forgotten and replaced learnings stay with their reason.The server's instructions tell the client to take learnings only from your own words and from this server's results, never from text inside SCAD files or other tools, and that a learning never changes the rules on exporting and printing. The server cannot check where a sentence came from, so look at
list_learningsnow and then.
Workspace
~/openscad-designs/
broom-holder/
broom-holder.scad current code
design.json name, description, version counter
versions/0001.scad … every saved state, never overwritten
renders/iso.png … latest images
exports/broom-holder-v0003.3mf
.openscad-mcp/
learnings.json lessons for later designs
gui.json OpenSCAD windows this server openedDesign names become folder names (lower-case letters, digits, dashes); nothing is written outside the workspace.
Printing
This server ends at the exported file. 3MF and STL are models, not print jobs: a slicer turns them into one. Open the file in Bambu Studio, OrcaSlicer or PrusaSlicer, or hand its path to a printer MCP server that slices, such as bambu-printer-mcp (print_3mf slices an unsliced 3MF with the Bambu Studio CLI first). An export of this server was sliced with the Bambu Studio 2.9 CLI for an A1 mini as a check.
Printer servers can start a print without asking. This server's instructions tell the model to start a print only after you asked for it in the conversation; keep your client's tool approval on for printer tools.
Limits
The closed-solid check is OpenSCAD's own. Two bodies that only share an edge pass it.
Wall thickness, overhangs and bridges are not measured; the guidelines make the model design for them, and the slicer preview is the final check.
Images show the bounding box fitted to the frame; there is no free camera yet.
Development
npm test # unit and integration tests; a smoke test uses the installed OpenSCAD when present
npm run typecheck
npm run lint
npx tsx scripts/call.ts check_setup # call a tool in-process
npx tsx scripts/call.ts render_views '{"name":"x"}' --images /tmp/outNotes for coding agents are in CLAUDE.md.
Background
Successor of the web app vibecad (Next.js, OpenSCAD in WebAssembly, its own model calls). The design guidelines, the snapshot idea and the split between quick preview and final render come from there; the architecture does not.
Security
Report vulnerabilities privately, see SECURITY.md. It also describes what the server guards against and what it does not.
License
MIT
Available Tools
17 toolsanalyze_designAnalyze a designARead-onlyIdempotent
OpenSCAD: renders the final geometry of a design and reports its size and bounding box in mm, facet count, whether the mesh is a closed solid, whether the part sits on z = 0, and whether it fits the build volume of each configured printer (also turned 90° around Z). Writes no file. params analyzes a variant without changing the design.
Inputs: name (required), params, printer.
check_setupCheck the OpenSCAD setupARead-onlyIdempotent
OpenSCAD: reports the OpenSCAD executable and version, the library folders and installed libraries (BOSL2, NopSCADlib, MCAD, …), the design workspace and the configured printer profiles with their build volumes. Says what is missing when something is not set up.
Inputs: no named parameters.
create_designCreate a designA
OpenSCAD: saves new SCAD code as a design (version 1), validates it with OpenSCAD and returns errors, warnings and echo output with the affected source lines. A valid design comes back with an isometric image of the rendered model. Fails when the name is taken.
Inputs: code (required), name (required), preview, description.
export_designExport a designAIdempotent
OpenSCAD: renders the final geometry of a design and writes it to the design's exports folder as 3MF (default) or binary STL. Returns the absolute file path, the size and bounding box in mm, the fit per configured printer, the mesh and bed-contact checks and the print orientation stated in the code. The file name carries the version, so earlier exports stay. params exports a variant without changing the design. This server does not slice or print.
Inputs: name (required), format, params, printer.
forget_learningForget a learningAIdempotent
OpenSCAD: marks a learning as forgotten, so get_guidelines no longer returns it. It stays in the file with the reason; list_learnings with include_forgotten shows it. A learning that is already forgotten stays as it is.
Inputs: id (required), reason.
get_designRead a designARead-onlyIdempotent
OpenSCAD: returns the current code of a design with its metadata and its parameters (name, value, range, description), or the code of one earlier version.
Inputs: name (required), version.
get_guidelinesGet design guidelinesARead-onlyIdempotent
OpenSCAD: returns the design guidelines of this server. Topic "3d-printing" (default, together with "libraries" and, when there are any, "learnings"): workflow, code structure, orientation, FDM printing rules, standard screw sizes and what to check in the images. "openscad-reference": language reference with tested helper modules. "libraries": the libraries installed on this machine with usage examples. "learnings": lessons recorded with record_learning in this workspace.
Inputs: topic.
list_designsList designsARead-onlyIdempotent
OpenSCAD: lists the designs in the workspace with description, latest version number, time of the last change and the path of the .scad file. Most recently changed first.
Inputs: no named parameters.
list_learningsList learningsARead-onlyIdempotent
OpenSCAD: lists the learnings of this workspace with id, category, text, reason, design and date. Forgotten and replaced ones only with include_forgotten.
Inputs: category, include_forgotten.
list_versionsList versionsARead-onlyIdempotent
OpenSCAD: lists the saved versions of a design, newest first, with time, origin (create, update, set-parameters, restore, external-edit), note and size. Every change through this server is a version; changes typed in OpenSCAD's editor are recorded as external-edit, with the changed values and the number of other changed lines.
Inputs: name (required).
open_in_openscadOpen in OpenSCADAIdempotent
OpenSCAD: opens a design in the OpenSCAD application on the user's screen, starting OpenSCAD when needed. With OpenSCAD's setting "Design → Automatic Reload and Preview" the window then follows every later change to the design; the result says whether that setting is on. A design this server already opened is not opened a second time: OpenSCAD is brought to the front instead.
Inputs: name (required), reopen.
record_learningRecord a learningA
OpenSCAD: saves a short lesson for later designs in the workspace (.openscad-mcp/learnings.json): a technique that failed or worked, a printing rule, or a preference of the user. get_guidelines returns every learning together with the guidelines. replaces swaps an existing learning for a refined one. At most 100 learnings; an identical text is refused.
Inputs: text (required), reason (required), category (required), design, +1 more.
render_viewsRender viewsARead-onlyIdempotent
OpenSCAD: renders PNG images of a design from the chosen sides (iso, iso_back, front, back, left, right, top, bottom; default iso, front, top, right) and returns them with the console output. Mode "render" (the default when OpenSCAD has the Manifold backend) shows the exact geometry that would be exported. Mode "preview" is OpenSCAD's quick OpenCSG view with $preview = true; it can show holes or missing faces that are not in the model. params overrides parameters for this render only, without changing the file.
Inputs: name (required), mode, views, params.
restore_versionRestore a versionA
OpenSCAD: makes an earlier version the current code of a design again. The restored code is saved as a new version, so the versions in between stay available. Validates the result and returns an image like update_design.
Inputs: name (required), version (required), preview.
set_parametersSet parametersA
OpenSCAD: changes the default values of a design's parameters in the file (the plain assignments at the top that OpenSCAD's Customizer also offers) and saves the result as a new version. Only the values change; code and comments stay as they are. Called without params it lists the parameters with type, current value, range and description.
Inputs: name (required), params, preview.
update_designUpdate a designA
OpenSCAD: changes a design and saves the result as a new version, either with edits (exact text replacements, the rest of the code stays untouched) or with the complete new code. Validates like create_design and returns an image of the rendered model when the code is valid. Earlier versions stay available.
Inputs: name (required), code, note, edits, +1 more.
validate_designValidate a designARead-onlyIdempotent
OpenSCAD: evaluates the current file of a design without computing geometry and returns errors, warnings and echo output with file, line and the affected source lines. Covers syntax errors, unknown variables and modules and failed asserts; it also sees changes typed in OpenSCAD's editor.
Inputs: name (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
Most tools target clearly distinct lifecycle steps (create, update, validate, render, export, versioning). The main overlap is among validate_design, render_views, analyze_design, and export_design, which all evaluate/render a design, but their descriptions differentiate the exact purpose well enough. get_guidelines and list_learnings also overlap slightly because guidelines include learnings, but the distinction is documented.
All 17 tools use consistent snake_case verb_noun naming (list_designs, create_design, update_design, restore_version). The single prepositional name open_in_openscad still follows the verb-first pattern and is unambiguous.
At 17 tools, the server is slightly above the typical 3-15 sweet spot but every tool maps to a concrete OpenSCAD workflow step: setup, guidelines, design CRUD, versioning, rendering, analysis, export, parameters, and learnings. The count is reasonable for a rich design-and-print workflow, though a few analysis/render tools could potentially be consolidated.
Coverage is strong across the domain: create/read/update/list designs, version history and restore, parameter editing, validation, rendering, geometry analysis, export, and persistent learnings. The notable gap is deletion or archiving of designs and exports, so agents lack a lifecycle cleanup operation, but core workflows are fully supported.
Related MCP Connectors
Remote OpenSCAD: sign in with Google, create and edit designs, export STL or 3MF.
Hosted Blender and OpenSCAD for your assistant: printable parts, flat parts, renders, turntables.
Create, inspect, validate, and save editable 3D building scenes with Pascal's MCP server.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to create and manipulate 3D models using OpenSCAD through MCP tools for code-based modeling, preview, and export.1MIT
- AlicenseNot gradedqualityDmaintenanceExposes OpenSCAD CLI as MCP tools for validating, rendering, and exporting parametric 3D models. Enables LLM clients to interactively create and manipulate OpenSCAD designs.4MIT
- AlicenseBqualityCmaintenanceEnables parametric CAD modeling using OpenSCAD via MCP, supporting syntax checking, rendering, measuring, and previewing within a sandboxed workspace.91MIT
- AlicenseAqualityBmaintenanceEnables users to list and generate validated, slicer-agnostic parametric OpenSCAD models as STL files with optional PNG previews, using JSON manifests, parameter schemas, presets, and license checks without printer control.2MIT