dcc-mcp-openscad
Production OpenSCAD adapter for deterministic model inspection, validation, geometry export, and PNG rendering through DCC-MCP.
Illustrative workflow based on the live OpenSCAD → FreeCAD → Blender/Godot acceptance run; generated source is retained in docs/images/dcc-mcp-openscad-showcase-source.png.
Capabilities
- Detect the standalone OpenSCAD CLI and report version-specific capabilities.
- Inspect modules, functions, variables, and
include/usereferences without executing source. - Validate a parameterized model with structured warning/error diagnostics.
- Export STL (explicit binary or ASCII), 3MF, AMF, OFF, CSG, DXF, SVG, PDF, and OpenSCAD diagnostic formats.
- Render bounded PNG previews or full geometry renders with typed camera, projection, color-scheme, size, and parameter inputs.
- Stage outputs atomically and return file size plus SHA-256 provenance.
The adapter does not accept arbitrary OpenSCAD command-line arguments or raw
-D expressions. JSON scalar/array parameters are encoded by the adapter.
Requirements
- Python 3.7+
dcc-mcp-core0.19.91+- OpenSCAD 2021.01 or newer
On Windows, point to openscad.com when possible; if openscad.exe is
configured and a sibling openscad.com exists, the adapter selects the console
launcher automatically.
Install
python -m pip install dcc-mcp-openscad
dcc-mcp-openscad
For development:
python -m pip install -e ".[dev]"
python -m pytest
Configuration
| Variable | Purpose | Default |
|---|---|---|
DCC_MCP_OPENSCAD_EXECUTABLE |
Exact OpenSCAD executable or install directory | PATH and standard install locations |
DCC_MCP_OPENSCAD_ALLOWED_ROOTS |
os.pathsep-separated source/output roots |
server working directory |
DCC_MCP_OPENSCAD_MAX_SOURCE_BYTES |
Maximum source size | 4 MiB |
DCC_MCP_OPENSCAD_MAX_TIMEOUT_SECS |
Maximum per-call deadline | 1800 seconds |
DCC_MCP_OPENSCAD_PORT |
Fixed adapter port when direct addressing is required | OS-assigned |
The service registers as a standalone DCC-MCP instance. It has no bound GUI PID and needs no OpenSCAD window.
Agent workflow
Use the standard discovery path:
dcc-mcp-cli list
dcc-mcp-cli search --query "OpenSCAD validate export STL"
dcc-mcp-cli load-skill openscad-pipeline --dcc-type openscad --instance-id <instance-short>
dcc-mcp-cli describe openscad.<instance-short>.openscad_pipeline__validate_model
Then call inspect_source → validate_model → export_model or
render_preview. Long calls are asynchronous and should be polled through the
core job tools returned by the call.
examples/production_smoke.scad is a parameterized enclosure used by the live
acceptance test. Override width, depth, height, wall, corner_radius,
or vent_count to verify safe parameter encoding and reproducible artifacts.
Safety contract
- Source and output paths must remain under configured allowed roots.
- Existing outputs are never replaced unless
overwrite=trueis explicit. - Exports use sibling temporary files and become visible only after success.
- Parameter names, values, nesting, count, image dimensions, formats, and deadlines are bounded.
- Cancellation and timeouts terminate the owned OpenSCAD child process.
- Captured process output is limited to 64 KiB per stream.
OpenSCAD CLI reference: https://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Using_OpenSCAD_in_a_command_line_environment
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dcc_mcp_openscad-0.1.2.tar.gz.
File metadata
- Download URL: dcc_mcp_openscad-0.1.2.tar.gz
- Upload date:
- Size: 16.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b5befdeb27f3f37ac3b3eb191fca0af5698fac50a616e689ae8ea70294be630
|
|
| MD5 |
1653d0c96880d68b826e73e7f2dc1af9
|
|
| BLAKE2b-256 |
9f7419ae66faa780b49d7fc4be0358a784d460c232398020bc075d08e3ce00e0
|
Provenance
The following attestation bundles were made for dcc_mcp_openscad-0.1.2.tar.gz:
Publisher:
release.yml on dcc-mcp/dcc-mcp-openscad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcc_mcp_openscad-0.1.2.tar.gz -
Subject digest:
1b5befdeb27f3f37ac3b3eb191fca0af5698fac50a616e689ae8ea70294be630 - Sigstore transparency entry: 2437671767
- Sigstore integration time:
-
Permalink:
dcc-mcp/dcc-mcp-openscad@40e5428c98e76342e938e8b153904eb9bfd3e7a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dcc-mcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40e5428c98e76342e938e8b153904eb9bfd3e7a7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dcc_mcp_openscad-0.1.2-py3-none-any.whl.
File metadata
- Download URL: dcc_mcp_openscad-0.1.2-py3-none-any.whl
- Upload date:
- Size: 17.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c1345969b62f4f6fd457c0caf5a20a3776afa8a26365e096054334758036927b
|
|
| MD5 |
02d360c3b3276e7cdc43c9c53a4adb80
|
|
| BLAKE2b-256 |
73dcd32e4116781858eea2f3d802f3a2d07f986de01bcbe8e7474dfbb2173e30
|
Provenance
The following attestation bundles were made for dcc_mcp_openscad-0.1.2-py3-none-any.whl:
Publisher:
release.yml on dcc-mcp/dcc-mcp-openscad
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dcc_mcp_openscad-0.1.2-py3-none-any.whl -
Subject digest:
c1345969b62f4f6fd457c0caf5a20a3776afa8a26365e096054334758036927b - Sigstore transparency entry: 2437671782
- Sigstore integration time:
-
Permalink:
dcc-mcp/dcc-mcp-openscad@40e5428c98e76342e938e8b153904eb9bfd3e7a7 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/dcc-mcp
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@40e5428c98e76342e938e8b153904eb9bfd3e7a7 -
Trigger Event:
push
-
Statement type: