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.1.tar.gz (477.0 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.1-py3-none-any.whl (16.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dcc_mcp_openscad-0.1.1.tar.gz
  • Upload date:
  • Size: 477.0 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.1.tar.gz
Algorithm Hash digest
SHA256 09289f2093fc20143e43a7da0c381b5f3fac6734d7e935abaeac2d2f602445de
MD5 8fd730503412c9c0a7ca3486c7bdf9a6
BLAKE2b-256 05bea8f1dccec6740cac2ba2580ba98db7e5fc7ed8a2db9f2dc76b594606faea

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for dcc_mcp_openscad-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 89fb99fd5f24b36e4c9c67c53b6e58066600a0d1022256c77b4ce5f1f8e2c2b4
MD5 98249a81905e4290e08d7d0ab19b5577
BLAKE2b-256 f320a4b368a6b5a287d1ef382a3a49ee30c39fb4baab11fa72b2a1a2ec9f18b4

See more details on using hashes here.

Provenance

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