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.

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.0.tar.gz (476.5 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.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file dcc_mcp_openscad-0.1.0.tar.gz.

File metadata

  • Download URL: dcc_mcp_openscad-0.1.0.tar.gz
  • Upload date:
  • Size: 476.5 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.0.tar.gz
Algorithm Hash digest
SHA256 3776b5bcca9e294265eed5a96887efd8479f519fb222ce30d36e55da4c4e5b45
MD5 2d2234f14d554ec0e8f5604306ffafc0
BLAKE2b-256 e531373c5f4f96454582c5ee2b5b2870f0f158f9abcd4cf50654c4fef1979d26

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_openscad-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dcc_mcp_openscad-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9bf0cb598ce85a234508e8b65f23ee8a8d64dc943d4e8823cb6f1748d516a187
MD5 dd06eb9c66cdcc4fe561c440302cb9ae
BLAKE2b-256 79b3877b7860eebe6b9efe6cf2285267d856ca3f836af3da040db0280787cabc

See more details on using hashes here.

Provenance

The following attestation bundles were made for dcc_mcp_openscad-0.1.0-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