CAD to Print MCP
Allows inspecting FreeCAD .FCStd documents and exporting named solids to STL for downstream slicing and printing workflows.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@CAD to Print MCP export the bracket from my FreeCAD doc, slice it, then upload the G-code"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
CAD to Print MCP
A local MCP server that lets Codex and other MCP clients move a design through FreeCAD → STL → OrcaSlicer configuration → G-code → Moonraker printer. It uses stock OrcaSlicer's command-line interface and keeps every exported STL, derived preset, slice manifest, and G-code in a separate output location.
What it does
Inspect a FreeCAD
.FCStddocument and export a named solid to STL.Find, inspect, and derive OrcaSlicer machine, process, and filament presets. Derived presets are copies; originals stay untouched.
Preview and run a slice with specified presets and settings. Each run records input hashes, command arguments, effective settings, logs, and output artifacts.
Read G-code metadata, query a Moonraker printer, upload G-code, and start an uploaded print as a distinct step.
It does not edit the open OrcaSlicer GUI, paint supports, create CAD geometry from a text description, or control printers other than Moonraker yet. Agents can use their own CAD tools to create .FCStd files before using this server. OrcaSlicer itself is not bundled.
Related MCP server: FreeCAD MCP
Requirements
Python 3.10 or newer
FreeCAD with
FreeCADCmdfor.FCStdinspection/exportOrcaSlicer with command-line mode
Optional: a printer running Moonraker for status, upload, and print start
The server runs locally over MCP stdio. It does not open a listening port.
Install
git clone https://github.com/Kayrim/cad-to-print-mcp.git
cd cad-to-print-mcp
py -3 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .On macOS/Linux, use python3 -m venv .venv and .venv/bin/python -m pip install -e ..
Set these environment variables in your MCP client or shell:
Variable | Purpose |
| Path to |
| Path to |
| Optional user profile directory override |
| Optional output directory; defaults to |
| Moonraker URL, such as |
| Optional Moonraker API key; never put it in a repository |
Connect Codex
Use the Python executable from your new virtual environment. On Windows:
codex mcp add cad-to-print -- "C:\absolute\path\to\cad-to-print-mcp\.venv\Scripts\python.exe" -m cad_to_print_mcp.server
codex mcp listFor other MCP clients, configure a local stdio server with the same executable and -m cad_to_print_mcp.server arguments. Restart the client after adding it.
Example agent workflow
check_setupandinspect_freecad_documentto choose the printable solid.export_freecad_stlto create a mesh from the chosen FreeCAD object.find_profilesfor compatible machine, process, and filament presets.read_profileandderive_profilecan make a variant with support, infill, speed, or other settings.preview_slice, thenrun_slice. Or callprepare_print_jobto export the selected FreeCAD object and slice it in one step. Review the manifest, logs, and generated G-code. The preset files should match the actual printer, nozzle, material, and firmware.get_printer_status, thenupload_print_file. Uploading alone never starts a print.When ready, call
start_uploaded_printusing the returned upload ID. It refuses to start while the printer reports an active or paused job.
The run_slice tool accepts a .3mf with embedded settings or an STL/OBJ/STEP with all three preset JSON files. Common overrides such as layer_height, enable_support, support_type, sparse_infill_density, and wall_loops are directly validated. For other settings, derive a copy of a bundled preset and pass that copy to run_slice. OrcaSlicer validates the resulting configuration during slicing.
Safety and privacy
The server never runs shell commands assembled from tool inputs. It invokes FreeCAD and OrcaSlicer with argument arrays.
It never edits original CAD files or OrcaSlicer presets.
derive_profilerefuses script, G-code, print host, and credential fields.read_profileredacts credentials.upload_print_fileandstart_uploaded_printare separate calls. Print start checks that Klipper is ready and no job is active.Generated files and manifests can contain model names and local paths. The
outputs/directory is Git-ignored.Review G-code and printer preparation before starting a physical print. The server cannot check bed clearance, filament loading, or hardware condition.
Development
.\.venv\Scripts\python.exe -m unittest discover -s tests -vTests use local fixtures and mocked process/printer calls. A live smoke test should be run with your own FreeCAD, OrcaSlicer, presets, and Moonraker setup before printing. See docs/architecture.md for the adapter boundaries and roadmap.
License
MIT. This project is independent of FreeCAD, OrcaSlicer, and Moonraker.
Available Tools
15 toolscheck_setupB
Check local FreeCAD, OrcaSlicer and profile locations.
Inputs: no named parameters. Returns: object
derive_profileB
Create an isolated copy with new settings; original OrcaSlicer preset is unchanged.
Inputs: path (required), changes (required). Returns: object
export_freecad_stlB
Export one selected FreeCAD object to STL without altering the CAD document.
Inputs: path (required), object_name (required). Returns: object
find_profilesB
Find bundled or user OrcaSlicer machine, process, or filament presets by name.
Inputs: kind (required), limit, query. Returns: object
get_printer_statusA
Read Moonraker connection and current print state.
Inputs: no named parameters. Returns: object
inspect_freecad_documentB
List solid objects, dimensions and validity from a FreeCAD .FCStd document.
Inputs: path (required). Returns: object
list_supported_settingsA
List the validated print settings accepted by this server.
Inputs: no named parameters. Returns: object
list_user_profilesB
List local machine, process, and filament JSON presets available for slicing.
Inputs: no named parameters. Returns: object
prepare_print_jobC
Export one FreeCAD solid and slice it with explicit OrcaSlicer presets.
Inputs: cad_path (required), object_name (required), machine_profile (required), process_profile (required), +3 more. Returns: object
preview_sliceA
Validate a slice request and show inputs, settings, and hashes without slicing.
Inputs: model (required), settings, machine_profile, process_profile, +1 more. Returns: object
read_gcode_summaryB
Read available print time, filament, and layer metadata from G-code or sliced 3MF.
Inputs: path (required). Returns: object
read_profileB
Read a preset's settings, with credential fields redacted.
Inputs: path (required). Returns: object
run_sliceC
Slice with stock OrcaSlicer in a unique output folder; return artifacts and logs.
Inputs: model (required), settings, machine_profile, process_profile, +2 more. Returns: object
start_uploaded_printA
Start an uploaded G-code file after checking the printer is ready and idle.
Inputs: upload_id (required). Returns: object
upload_print_fileA
Upload G-code to Moonraker without starting the printer; return an upload ID.
Inputs: path (required). Returns: object
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 15 tools
Most tools have clearly distinct roles (inspect vs export vs preview vs run), but prepare_print_job strongly overlaps with export_freecad_stl + run_slice, and find_profiles vs list_user_profiles could be confused at a glance.
Predominantly consistent verb_noun snake_case (check_setup, inspect_freecad_document, run_slice), with only minor deviations where the verb is omitted (get_printer_status) or the pattern shifts to adjective_noun (list_supported_settings).
15 tools is a well-scoped set for a CAD-to-print pipeline spanning discovery, inspection, slicing, and printer upload; each tool has a distinct phase in the workflow.
The surface covers the full lifecycle from CAD inspection through slicing to printer control, but lacks cancellation or print-job status/monitoring beyond a single get_printer_status, which agents would likely need in practice.
Related MCP Connectors
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Build, test, publish, and run Kovca workflows from AI agents over remote MCP.
Related MCP Servers
- AlicenseBqualityBmaintenanceEnables interaction with 3D printer management systems through an MCP server, supporting STL file manipulation, slicing, and control of printers like OctoPrint, Klipper, Duet, and more.309,494 npm262GPL 2.0
- FlicenseNot gradedqualityCmaintenanceEnables AI clients to create, edit, and export CAD models and drawings in a locally installed FreeCAD via MCP.3-
- AlicenseNot gradedqualityBmaintenanceExposes MCP tools that slice models with headless OrcaSlicer, stage gcode on Moonraker-based Klipper printers, gate job starts behind explicit operator authorization, and report status, telemetry-derived events, snapshots, and alerts. It also manages spools and lets AI agents query job estimates, blockers, and start-precondition checks.1Apache 2.0
- AlicenseCqualityBmaintenanceEnables AI assistants to drive PrusaSlicer through MCP: select profiles, manage bed models, slice with verified settings, analyze G-code and print risks, and upload or control prints on networked printers.33AGPL 3.0