Skip to main content

dcc-mcp-openscad

DCC-MCP · OPENSCAD

Production OpenSCAD adapter for deterministic model inspection, validation, geometry export, and PNG rendering through DCC-MCP.

Parameterized OpenSCAD bracket moving through topology validation to a game-ready mesh

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/use references 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-core 0.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_sourcevalidate_modelexport_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=true is 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

dcc_mcp_openscad-0.1.2.tar.gz (16.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcc_mcp_openscad-0.1.2-py3-none-any.whl (17.1 kB view details)

Uploaded Python 3

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

Hashes for dcc_mcp_openscad-0.1.2.tar.gz
Algorithm Hash digest
SHA256 1b5befdeb27f3f37ac3b3eb191fca0af5698fac50a616e689ae8ea70294be630
MD5 1653d0c96880d68b826e73e7f2dc1af9
BLAKE2b-256 9f7419ae66faa780b49d7fc4be0358a784d460c232398020bc075d08e3ce00e0

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file dcc_mcp_openscad-0.1.2-py3-none-any.whl.

File metadata

File hashes

Hashes for dcc_mcp_openscad-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c1345969b62f4f6fd457c0caf5a20a3776afa8a26365e096054334758036927b
MD5 02d360c3b3276e7cdc43c9c53a4adb80
BLAKE2b-256 73dcd32e4116781858eea2f3d802f3a2d07f986de01bcbe8e7474dfbb2173e30

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page