freecad-mcp
Provides tools for interacting with FreeCAD, enabling creation, listing, inspection, and saving of documents, as well as listing and retrieving objects and recomputing documents.
Click on "Install 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., "@freecad-mcpcreate a new document called 'my design'"
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.
FreeCAD MCP
FreeCAD MCP is an experimental effort to make AI-generated CAD reliable, parametric, and auditable.
The long-term aim is to help AI agents create FreeCAD models that express design intent, are fully and naturally constrained, remain stable when their parameters change, and can be inspected and repaired deterministically. The project exposes explicit CAD operations through the Model Context Protocol (MCP) instead of giving agents arbitrary Python execution.
Experimental status
FreeCAD MCP is unfinished research and development software. It is not production-ready. Its verified results cover bounded workflows and do not show that arbitrary sketches or complete 3D models can already be generated reliably. There is no guarantee that the project will ultimately reach sufficient general-purpose production quality.
FreeCAD MCP is an independent project. It is not endorsed by or affiliated with the FreeCAD project or the Model Context Protocol project.
The repository is mirrored on GitHub and Codeberg.
Related MCP server: FreeCAD MCP Server
Why this project exists
Creating geometry that looks correct once is not the same as creating a sound parametric model.
A useful CAD model must encode why geometry has its shape: which edges are horizontal or tangent, which features are equal, where the datum lies, and which dimensions are intended to drive later changes. It must also survive recomputation, parameter edits, undo and redo, persistence, and inspection by another tool or agent.
Those requirements make robust CAD automation substantially harder than drawing visible lines and arcs. An agent can produce a plausible profile while leaving hidden degrees of freedom, redundant constraints, unstable references, or a parameterization that fails as soon as a dimension changes.
FreeCAD MCP treats these problems as the core work:
representing design intent with meaningful geometry and constraints;
validating topology and solver state instead of trusting appearance;
changing parameters without silently changing the intended design;
making every controlled operation inspectable and auditable;
recovering exactly when a mutation fails;
refusing ambiguous or unsupported behavior conservatively.
The current implementation concentrates on Sketcher because reliable, parametric sketches are a prerequisite for dependable downstream 3D features.
What reliable AI-driven CAD means
For this project, reliable automation should eventually produce models that:
use natural geometric relationships rather than fixing geometry in place;
reach zero degrees of freedom when full constraint is intended;
expose meaningful driving parameters such as width, height, and radius;
remain semantically stable when those parameters change;
provide solver evidence for conflicts, redundancies, and under-constraint;
preserve names, expressions, ownership, attachment, construction state, and dependencies unless an operation explicitly changes them;
return structured state that another agent can inspect and reason about;
make failures atomic, leaving the model and its history unchanged;
never depend on arbitrary Python execution or unrestricted property access.
These are goals and design criteria, not claims that every item is solved for general CAD models today.
Why constraint engineering is difficult
Sketch constraints interact. A relationship that is locally reasonable can be globally redundant, conflicting, or subtly different from the intended topology. FreeCAD's solver and native bindings also have behaviors that must be measured rather than guessed: constraint ordering, degrees-of-freedom reductions, partial mutation, rollback, readback, and undo history all matter.
The project therefore uses a documentation-led, evidence-driven process:
define the intended topology, datum, dimensions, and expected solver state;
preflight every reference and dependency;
apply one controlled mutation;
recompute and inspect native readback;
verify the solver, complete sketch state, and history;
roll back exactly if any verification fails.
Bounded asymmetric-profile benchmark
One current development benchmark is a rectangle-like asymmetric profile with two square corners and two rounded corners on one side. It contains:
six geometry elements;
two square-corner joins expressed by topology
coincidentconstraints;four rounded joins expressed by point-to-point
tangent_pointsconstraints;four horizontal or vertical orientation constraints;
one equal-radius constraint;
one origin-datum
coincidentconstraint;width, height, and radius as three driving dimensions;
15 constraints in total.
The distinction between the Coincident constraints is important: two close the
profile at its square corners, while a separate third Coincident constraint
attaches the lower-left datum to the sketch origin. The four
tangent_points constraints each combine endpoint connection with the intended
tangent transition.
The maintained benchmark reaches zero degrees of freedom with no solver conflicts, redundancies, partial redundancies, malformed constraints, or unsupported readback. Verified edits to width, height, and radius preserve the design intent and clean solver state.
This is evidence for one deliberately bounded benchmark. It does not establish that arbitrary sketches, arbitrary fillet arrangements, or complete 3D models are solved. The reference plan and acceptance evidence are documented in the development guide and enforced by permanent fixtures and tests.
Current capabilities
The repository currently exposes exactly 59 typed MCP tools through an embedded FreeCAD workbench named MCP.
The tools cover these controlled areas:
document creation, listing, inspection, recomputation, explicit saving, and history;
one-step document undo and redo;
Part Design body and Sketcher sketch creation;
structured object, sketch, topology, profile, dependency, and solver inspection;
geometry creation for supported lines, circles, circular arcs, points, conics, and B-splines;
an 18-variant internal sketch-constraint contract, including controlled point-to-point tangency;
external-geometry references and a separately bounded mixed-reference constraint contract;
semantic rectangles, centred rectangles, equilateral triangles, regular polygons, straight slots, rounded rectangles, and polylines;
controlled geometry and constraint removal, construction state, constraint names, and a finite expression language;
bounded geometry editing, chamfering, filleting, trimming, splitting, and extending;
copy-only translation, rotation, scaling, mirroring, and arrays for supported sketch geometry;
copy-only whole-sketch translation, rotation, scaling, and axis/origin mirroring;
controlled driving/reference, active/inactive, and virtual-space constraint state;
read-only constraint diagnostics with structured candidate repair actions.
All public operations use strict schemas, deterministic validation, structured results, and controlled errors. The complete current wire-order list is the public MCP tool inventory.
The server uses a local Streamable HTTP endpoint:
http://127.0.0.1:8765/mcpIt binds to loopback by default. The workbench provides start, stop, status, start-on-launch, and tool-visibility controls. GUI commands and MCP tools share the same command handlers.
The project intentionally provides no arbitrary Python execution, generic
native-command bridge, unrestricted property mutation, or remote binding.
There is no automatic saving; a document is saved only when explicitly
requested through save_document.
Current verified development milestones
The current repository has permanent automated coverage and recorded native evidence for these development stages:
Area | Verified boundary |
Workbench and server | Embedded MCP workbench, centralized lifecycle, loopback Streamable HTTP, shared GUI/MCP handlers, and configurable tool visibility |
Controlled documents | Inspection, recomputation, explicit saving, body and sketch creation, and one-step undo/redo |
Sketch creation | Strict supported geometry and constraints with structured readback and solver facts |
Semantic profiles | Rectangles, centred rectangles, polygons, slots, rounded rectangles, and polylines within frozen contracts |
Inspection and dependencies | Profile analysis, open vertices, external geometry, dependency reporting, and controlled diagnostics |
Safe mutation | Removal, construction state, geometry edits, constraint replacement and datum edits, names, and expressions |
Topology and transforms | Bounded trim/split/extend, chamfer/fillet, selected-geometry transforms and arrays, and whole-sketch copy-only transforms |
Constraint diagnostics | Read-only classifications, issues, solver evidence, and non-binding repair candidates |
Constraint engineering | The six-geometry, 15-constraint asymmetric benchmark reaches zero degrees of freedom and remains stable under its verified parameter edits |
The currently verified live environment is FreeCAD 1.1.2R20260723 with
embedded Python 3.11.14 and PySide6 / Qt 6.8.3. The official MCP SDK is
constrained to stable v1 with mcp>=1.27.2,<2.
Automated pure-Python tests, native FreeCAD smoke tests, and public MCP endpoint acceptance are separate verification layers. A passing bounded milestone does not widen its public contract.
Current limitations
The most important limitations are:
the project is experimental, unfinished, and not production-ready;
current capabilities are centered on Sketcher, not complete 3D Part Design workflows;
there is no general planner that can reliably constrain arbitrary sketches;
supported geometry, constraints, references, and edits are finite explicit allowlists;
several topology-editing operations are restricted to evidence-backed geometry and dependency conditions;
copy-only transforms do not copy constraints or expressions;
whole-sketch arrays, cross-sketch copying, cross-document transforms, sketch merging, and destination-sketch creation are deferred;
external geometry is a controlled read-only reference boundary;
sketch geometry and constraint indices identify current state, not permanent entities, so clients must inspect again after mutation;
solver facts can be unavailable when FreeCAD's cached sketch state is stale;
some native FreeCAD states are reported as unsupported rather than guessed;
development and native acceptance are currently documented primarily for FreeCAD 1.1 on Windows;
installation is a development workflow rather than an end-user release.
Conservative refusal is intentional. Expanding a schema or bypassing a safety check without native evidence would make the project appear more capable while making its results less trustworthy.
Quick development setup
Python 3.11 is required for the project environment. Python 3.12, 3.13, and 3.14 are not supported for the development virtual environment.
From a PowerShell prompt in the repository:
py -3.11 -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e ".[dev]"
.\scripts\test.ps1The embedded server also needs the official MCP SDK in FreeCAD's Python environment. For the currently verified FreeCAD 1.1 Windows setup:
& "C:\Program Files\FreeCAD 1.1\bin\python.exe" -m pip install `
--target "$env:APPDATA\FreeCAD\v1-1\AdditionalPythonPackages\py311" `
"mcp>=1.27.2,<2"Install the development workbench link:
.\scripts\install-dev.ps1This links FreeCAD's per-user addon folder to the repository's src addon
root:
%APPDATA%\FreeCAD\v1-1\Mod\mcp -> <repository>\srcRestart FreeCAD under human control, select the MCP workbench, and choose Start Server.
If standalone CPython 3.11 is unavailable, FreeCAD's bundled Python can create the development virtual environment. Platform details, the verified fallback, native smoke commands, and the canonical quality gate are in the development guide.
Connecting an MCP client
With FreeCAD running and the server started, configure an MCP client for Streamable HTTP:
{
"mcpServers": {
"freecad": {
"type": "http",
"url": "http://127.0.0.1:8765/mcp"
}
}
}The exact configuration shape can differ between MCP clients. The endpoint and transport remain the same.
After connecting, begin with inspection. Tool indices refer to current FreeCAD state, and a client should inspect again after a mutation before issuing follow-up operations.
Architecture and safety principles
FreeCAD MCP separates transport, pure command logic, and FreeCAD-native adapters:
MCP or FreeCAD GUI
|
v
shared typed command handlers
|
v
narrow FreeCAD runtime adapters
|
v
main Qt thread, transaction, recompute, verificationThe main principles are:
explicit typed tools instead of general code execution;
pure schemas, validation, and result construction where possible;
narrow isolation of
FreeCAD,FreeCADGui,Part,Sketcher, and PySide;all GUI work and document mutation on FreeCAD's main Qt thread;
structured inspection instead of screenshot-based inference;
one owned transaction for a controlled mutation when required;
semantic verification from controlled readback before commit;
exact rollback verification on failure;
preservation of caller-owned transactions;
isolation of non-target documents, histories, GUI state, and saved files;
no automatic saving;
stable public schemas and controlled errors.
A successful mutation must prove the requested semantic result. A failed or refused operation must preserve controlled model state and history exactly. The detailed design and per-operation contracts are in Architecture.
Roadmap
The direction of travel is:
generalize evidence-based constraint planning beyond the maintained asymmetric benchmark;
improve deterministic diagnosis and controlled repair of under-constrained, conflicting, and redundant sketches;
broaden geometry and topology operations only where native behavior and rollback can be verified;
add controlled Part Design features and build toward complete parametric 3D models;
preserve design intent across deeper dependency graphs and parameter changes;
expand live acceptance across supported FreeCAD versions and platforms;
develop an installation and user experience suitable for broader experimentation.
Each step is contingent on evidence. Future work may reveal native limitations or reliability problems that prevent some goals from becoming general-purpose features.
Documentation
The structured catalogue in src/freecad_mcp/catalog/ is authoritative for
public tool identity, ordering, titles, and grouping. Documentation explains
the contract; it does not override the tested schemas.
Contributing
Contributions are welcome, especially in native FreeCAD research, strict validation, solver-aware inspection, transaction recovery, cross-platform verification, documentation, and permanent regression tests.
Before implementing a new public operation:
define a narrow public contract and explicit exclusions;
document relevant official and observed FreeCAD behavior separately;
use a strict schema and deterministic validation;
specify mutation, recompute, verification, rollback, persistence, and history behavior;
add production-path regression tests;
avoid arbitrary execution, unrestricted mutation, and generic native bridges;
run the canonical repository gate with
python scripts/ci.py.
Large proposals should be discussed and divided into bounded, reviewable slices. Please do not weaken refusal, solver verification, or rollback behavior to make a new capability appear to work.
Licence
FreeCAD MCP is licensed under the GNU Lesser General Public License,
version 2.1 or later (LGPL-2.1-or-later). See LICENSE.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityFmaintenanceThis project provides a robust integration between AI assistants and FreeCAD CAD software using the Model Context Protocol (MCP). It allows external applications to interact with FreeCAD through a standardized interface, offering multiple connection methods and specialized tools.Last updated24MIT
- AlicenseAqualityCmaintenanceBridges Claude with a live FreeCAD instance to provide deep access to runtime state, document structure, and shape topology. It enables AI-assisted CAD work, sketch diagnostics, and development debugging through direct interaction with FreeCAD's internal data and viewport.Last updated915GNU Lesser General Public v2.1 or later
- Alicense-qualityBmaintenanceA typed Model Context Protocol server that exposes KiCad 10 EDA workflows to language-model clients through validated tool calls.Last updatedMIT
- FlicenseBqualityDmaintenanceEnables AI assistants to perform 3D modeling and CAD operations in FreeCAD, including geometry creation, boolean operations, and document management.Last updated76
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to control Unreal E…
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/yonosoft/freecad-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server