dcc-mcp-freecad
Production FreeCAD adapter for typed, durable parametric modeling and CAD exchange through DCC-MCP.
Illustrative workflow based on the live OpenSCAD → FreeCAD → Blender/Godot acceptance run; generated source is retained in docs/images/dcc-mcp-freecad-showcase-source.png.
Capabilities
- Detect FreeCADCmd and report the actual FreeCAD/Python runtime.
- Create, inspect, recompute, validate, copy, and dependency-safely edit FCStd documents.
- Add and update boxes, cylinders, spheres, cones, and tori with typed dimensions and placements.
- Create parametric union, cut, and intersection features.
- Import or export STEP, IGES, BREP, STL, and OBJ geometry.
- Return object links, placements, shape/mesh topology counts, volume, area, bounding boxes, file size, and SHA-256 provenance.
No arbitrary Python, macros, module paths, or FreeCAD command-line flags are accepted. The adapter invokes only its packaged method-dispatch driver.
Requirements
- Python 3.7+
dcc-mcp-core0.20.36+- A FreeCAD version covered by the compatibility matrix below, with a working
FreeCADCmd/freecadcmd
FreeCAD compatibility matrix
Supported host versions are declared in
compat_matrix.json — that file is the
contract, this section only points at it:
| FreeCAD | Status |
|---|---|
| 1.0.x | supported |
| 1.1.x | supported |
| anything else | rejected with an explicit error code |
Both supported lines are exercised end-to-end on real FreeCAD in CI. A version
outside the matrix is not silently downgraded to "probably fine":
dcc-mcp-freecad doctor --json fails with an error_code
(freecad_host_version_unsupported, freecad_host_version_unverified,
freecad_host_version_unlisted, or freecad_host_version_unparsable), the
supported ranges, and the command that pins a supported one. The same matrix is
re-checked inside FreeCAD before any geometry work, so a skipped preflight does
not turn into a silent modelling bug.
Install
Install the published wheel, prove the standalone FreeCAD runtime, then start the service:
python -m pip install --upgrade dcc-mcp-freecad
dcc-mcp-freecad doctor --json
dcc-mcp-freecad verify --json
dcc-mcp-freecad
See install.md for Windows, macOS, and Linux discovery, stable doctor exits, configuration, wheel upgrades, uninstall, and troubleshooting. FreeCAD remains OS/package-manager owned; the adapter does not download or cache external binaries.
Configuration
| Variable | Purpose | Default |
|---|---|---|
DCC_MCP_FREECAD_EXECUTABLE |
Exact FreeCADCmd executable or install directory | PATH and standard locations |
DCC_MCP_FREECAD_ALLOWED_ROOTS |
os.pathsep-separated document/import/export roots |
server working directory |
DCC_MCP_FREECAD_MAX_DOCUMENT_BYTES |
Maximum FCStd input size | 2 GiB |
DCC_MCP_FREECAD_MAX_TIMEOUT_SECS |
Maximum per-call deadline | 1800 seconds |
DCC_MCP_FREECAD_PORT |
Fixed adapter port when direct addressing is required | OS-assigned |
The service is a standalone DCC-MCP instance with no GUI PID. Every operation launches a clean FreeCADCmd process in safe mode with a temporary user config.
Agent workflow
dcc-mcp-cli list
dcc-mcp-cli search --query "FreeCAD create boolean export STEP"
dcc-mcp-cli load-skill freecad-session --dcc-type freecad --instance-id <instance-short>
dcc-mcp-cli load-skill freecad-modeling --dcc-type freecad --instance-id <instance-short>
Typical sequence: create_document → add_primitive → transform_object →
boolean_operation → validate_document → export_geometry.
Safety contract
- Requested documents and geometry stay under configured allowed roots.
- Existing outputs require explicit
overwrite=true. - FCStd mutations happen on sibling staging copies and replace the original only after a successful, non-empty save.
- Failed mutations leave the original document byte-for-byte unchanged.
- Object names, dimensional fields, placements, formats, tessellation, result size, process output, and deadlines are bounded.
- Cancellation and timeouts terminate the owned FreeCADCmd process.
- Cascade removal is explicit and reports every removed dependent.
FreeCAD Python API reference: https://www.freecad.org/api/
Metadata
Release files for dcc-mcp-freecad 0.3.0
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_freecad-0.3.0.tar.gz | 44.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dcc_mcp_freecad-0.3.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 82.0 kB
Release files / dcc_mcp_freecad-0.3.0.tar.gz
| Download URL | dcc_mcp_freecad-0.3.0.tar.gz |
|---|---|
| Size | 44.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b870d09e76fca018ad47349529453a5495a09c3be855f0cf5902a91e8bf00d6b
|
|
BLAKE2b-256 checksum How to use checksums |
45a0e926ce43d6949523896cc7a8583a81bc893de9df23d187954d8b38058ff6
|
| 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 Sep 29, 2026.
Transparency logRelease files / dcc_mcp_freecad-0.3.0-py3-none-any.whl
| Download URL | dcc_mcp_freecad-0.3.0-py3-none-any.whl |
|---|---|
| Size | 37.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bfd21e4e7d1cd12076f4a93f65396b742e4c563e24c8b208a8663d9fc1e4f59f
|
|
BLAKE2b-256 checksum How to use checksums |
3ed454b4786c85a692e429a53f941145a406fb1d8444c4f85fa039469b196d76
|
| 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 Sep 29, 2026.
Transparency log