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.20.14+- 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
See install.md for wheel-only setup, platform discovery, the
official six-verb Install SOP lifecycle, ownership receipts, rollback, and
troubleshooting.
python -m pip install dcc-mcp-openscad
dcc-mcp-openscad doctor --json
dcc-mcp-openscad install --yes --json
dcc-mcp-openscad
For an explicit standalone readiness check:
dcc-mcp-openscad verify --executable "C:\Program Files\OpenSCAD\openscad.com" --json
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
Metadata
Release files for dcc-mcp-openscad 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dcc_mcp_openscad-0.2.1.tar.gz | 46.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dcc_mcp_openscad-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 80.8 kB
Release files / dcc_mcp_openscad-0.2.1.tar.gz
| Download URL | dcc_mcp_openscad-0.2.1.tar.gz |
|---|---|
| Size | 46.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
feb936be5da4a016e33677dd660afbff621aabe4e28f7a0221d99e313f365568
|
|
BLAKE2b-256 checksum How to use checksums |
3ce3ea925c81abbac75e0eddd41c4af05cfd10a70180b1ac12af555771237695
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency logRelease files / dcc_mcp_openscad-0.2.1-py3-none-any.whl
| Download URL | dcc_mcp_openscad-0.2.1-py3-none-any.whl |
|---|---|
| Size | 34.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ef2ddb3d458fd693581071670165b13d35974e89bb45d78b5c02358d57459354
|
|
BLAKE2b-256 checksum How to use checksums |
ce0e3bcb11f2ebeab949859be9f68fa0391dae8fcbbfa89f14c946190522ecdb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 25, 2026.
Transparency log