MCP+
Provides tools for interacting with a live FreeCAD session, enabling AI assistants to build and inspect 3D models, run Python scripts, drive the GUI, manage CAM jobs, and perform document, object, PartDesign, export, import, and macro operations.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP+
MCP+ lets AI assistants (Claude Code and other MCP clients) work in your live FreeCAD session: build and inspect models, run Python, drive the GUI the way a user would, and review CAM jobs. It works with FreeCAD 1.1 and newer development builds.
MCP+ is built on spkane's MCP+ server and adds:
CAM tools: path statistics, A/B comparisons between two code trees, geometry finders, test fixtures, posting and G-code diffs, gouge and coverage checks, headless test runs, demo recording.
GuiDriver: run toolbar commands, fill in task panels, answer modal dialogs by rule (see GuiDriver).
Runs that outlast their timeout keep going: the answer carries a
job_token, andget_output_pagereads the rest of the output and the result page by page (after CREATeNG/freecad-mcp-bridge).bridge_status: what FreeCAD is busy with, or which modal dialog is blocking it, answered even while every other call would wait (after neka-nat/freecad-mcp).execute_python_file: run a script with__file__set and__name__ == "__main__".Safer bridge: every request must carry a per-user token, and requests from foreign web pages are refused (see Security and your data).
Fixes: Addon Manager crash on install, Qt imports through FreeCAD's
PySidewrapper, PartDesign/Sketcher tools on FreeCAD 1.x, screenshots,.envhandling.
Install it with FreeCAD's Addon Manager or with git (see Installation). The MCP server comes with the add-on; your AI client runs it from the add-on folder with uv.
Platforms. MCP+ runs on Linux, Windows and macOS. The exceptions are the tools that move a real
mouse and keyboard: cam_record_demo and GuiDriver's xmouse / xkeys_external helpers use X11
(XTest) and work only on Linux with X11. The other GuiDriver tools work everywhere.
The rest of this README is adapted from the original server's documentation.
Security and your data
What MCP+ allows. MCP+ lets an AI assistant run any Python code in your FreeCAD session, with your user's permissions, the same as a macro you run yourself. There is no sandbox: the code can read and write your files, start programs and reach the network. Your MCP client is the guardrail: use one you trust, and have it ask for your approval before it runs tool calls.
Who can reach the bridge. The bridge only runs while you start it (auto-start is off unless you
turn it on in Edit → Preferences → MCP+). It listens on localhost (ports 9875 and 9876 by
default), so other computers can't reach it. Every request must also carry a token:
On its first start the bridge creates a random token in a file only your user can read:
~/.config/mcp-plus/tokenon Linux,~/Library/Application Support/mcp-plus/tokenon macOS,%APPDATA%\mcp-plus\tokenon Windows. The MCP server reads the same file, so nothing needs configuring, while other users' programs on the same computer can't get in.Edit → Preferences → MCP+ → Security shows the token file, copies the token, or replaces it (takes effect at once). Turning the token off is possible for localhost only, and not recommended.
Requests sent by web pages in your browser (an
Originother than localhost) are refused.To use FreeCAD from another computer, prefer an ssh tunnel to its port. If you do set Listen on to another address, the MCP server there needs the token in
FREECAD_AUTH_TOKEN; the bridge never listens beyond localhost without one.
Where your data goes. The add-on and the MCP server collect nothing and send nothing to anyone; there is no telemetry. But whatever the assistant asks FreeCAD for becomes part of its conversation: object names and properties, file names and paths, geometry, the output of code it runs, and screenshots of your 3D view. Your MCP client sends that to your AI provider, under that provider's terms. Don't use MCP+ on designs you aren't allowed to share with your AI provider. Code the assistant runs can also reach the network, as any macro can.
Reporting a security problem. Please use GitHub's private vulnerability reporting (the repository's Security tab) rather than a public issue.
Related MCP server: FreeCAD MCP
Table of Contents
FreeCAD Forum: addon discussion post
Features
150+ MCP Tools: Comprehensive CAD operations including primitives, PartDesign, booleans, export
Multiple Connection Modes: XML-RPC (recommended), JSON-RPC socket, or embedded
GUI & Headless Support: Full modeling in headless mode, plus screenshots/colors in GUI mode
Macro Development: Create, edit, run, and template FreeCAD macros via MCP
Installation Requirements / Dependencies
For Users
This section covers installation and usage for end users who want to use the MCP+ server with AI assistants.
Quick Links
Resource | Description |
Original server's documentation and API reference | |
MCP+ releases and changelogs | |
Bug reports and feature requests |
MCP+ Server
Installation
MCP+ is one download: the FreeCAD add-on and the MCP server live in the same folder,
freecad-mcp-plus inside FreeCAD's Mod folder. Install it one of two ways.
Addon Manager (recommended)
Edit → Preferences → Addon Manager → Custom repositories → +, add
https://github.com/Connor9220/freecad-mcp-pluswith branchmain.Tools → Addon Manager, search for "MCP+", install it and restart FreeCAD.
Git
Clone the repository into FreeCAD's Mod folder and restart FreeCAD:
git clone https://github.com/Connor9220/freecad-mcp-plus.git <Mod folder>/freecad-mcp-plusFinding the add-on folder
Your MCP client needs the add-on folder's path. Run this in FreeCAD's Python console:
import os; print(os.path.join(App.getUserAppDataDir(), "Mod", "freecad-mcp-plus"))On Linux with FreeCAD 1.1 this is usually ~/.local/share/FreeCAD/v1-1/Mod/freecad-mcp-plus.
Configuration
MCP Client Configuration
Add something like the following to your MCP client settings, with --project pointing at the
add-on folder. For Claude Code, this is ~/.claude.json (or claude mcp add) or a project
.mcp.json file:
{
"mcpServers": {
"freecad": {
"command": "uv",
"args": ["run", "--project", "/path/to/FreeCAD/Mod/freecad-mcp-plus", "freecad-mcp"],
"env": {
"FREECAD_MODE": "xmlrpc"
}
}
}
}Environment Variables
Set these in the env block above.
Variable | Description | Default |
| Connection mode: |
|
| Path to FreeCAD's lib directory (embedded mode only) | Auto-detect |
| Socket/XML-RPC server hostname |
|
| JSON-RPC socket server port |
|
| XML-RPC server port |
|
| Execution timeout in ms |
|
Connection Modes
Mode | Description | Platform Support |
| Connects to FreeCAD via XML-RPC (port 9875) | All platforms (recommended) |
| Connects via JSON-RPC socket (port 9876) | All platforms |
| Imports FreeCAD directly into process | Linux only (crashes on macOS) |
Note: Embedded mode crashes on macOS because FreeCAD's FreeCAD.so links to @rpath/libpython3.11.dylib, which conflicts with external Python interpreters. Use xmlrpc or socket mode on macOS and Windows.
Usage
Starting the MCP Bridge in FreeCAD
Before your AI assistant can connect, you need to start the MCP bridge inside FreeCAD:
Switch to the MCP+ workbench.
Click the Start MCP Bridge button in the toolbar, or use the menu MCP Bridge -> Start Bridge. To start it with FreeCAD every time, turn on auto-start in Edit → Preferences → MCP+.
You should see in the FreeCAD console:
MCP Bridge started! - XML-RPC: localhost:9875 - Socket: localhost:9876
After starting the bridge, start/restart your MCP client (Claude Code, etc.) - it will connect automatically.
Updating
Addon Manager: Tools → Addon Manager → Check for updates, then update MCP+.
Git: run
git pullin the add-on folder.
Restart FreeCAD and your MCP client afterwards.
Uninstalling
Addon Manager: Tools → Addon Manager, select MCP+, click Uninstall, restart FreeCAD.
Git: delete the
freecad-mcp-plusfolder from FreeCAD'sModfolder and restart FreeCAD.
Remove the freecad entry from your MCP client settings as well.
Available Tools
The MCP+ server provides 150+ tools organized into categories. Tools marked with GUI require FreeCAD to be running in GUI mode; they will return an error in headless mode.
Execution & Debugging (8 tools)
Tool | Description | Mode |
| Execute arbitrary Python code in FreeCAD's context | All |
| Run a .py file as | All |
| Read a run that outlasted its timeout, page by page | All |
| What FreeCAD is busy with; answers even when FreeCAD is stuck | All |
| Get FreeCAD version, build date, and Python version | All |
| Check MCP bridge connection status and latency | All |
| Get recent FreeCAD console output (up to N lines) | All |
| Get MCP+ server environment (OS, hostname, instance_id) | All |
Document Management (7 tools)
Tool | Description | Mode |
| List all open documents with metadata | All |
| Get information about the active document | All |
| Create a new FreeCAD document | All |
| Open an existing .FCStd file | All |
| Save a document to disk | All |
| Close a document (with optional save) | All |
| Force recomputation of all objects | All |
Object Creation - Primitives (8 tools)
Tool | Description | Mode |
| Create a generic FreeCAD object by type ID | All |
| Create a Part::Box with length, width, height | All |
| Create a Part::Cylinder with radius, height, angle | All |
| Create a Part::Sphere with radius | All |
| Create a Part::Cone with two radii and height | All |
| Create a Part::Torus (donut) with radii and angles | All |
| Create a Part::Wedge (tapered box) | All |
| Create a Part::Helix curve for sweeps and threads | All |
Object Management (12 tools)
Tool | Description | Mode |
| List all objects in a document | All |
| Get detailed object info (properties, shape, etc.) | All |
| Modify properties of an existing object | All |
| Delete an object from a document | All |
| Set object position and rotation | All |
| Scale an object uniformly or non-uniformly | All |
| Rotate an object around an axis | All |
| Create a copy of an object | All |
| Mirror an object across a plane (XY, XZ, YZ) | All |
| Fuse, cut, or intersect objects | All |
| Get currently selected objects | GUI |
| Select specific objects by name | GUI |
| Clear all selections | GUI |
PartDesign - Sketching (14 tools)
Tool | Description | Mode |
| Create a PartDesign::Body container | All |
| Create a sketch on a plane or face | All |
| Add a rectangle to a sketch | All |
| Add a circle to a sketch | All |
| Add a line (with optional construction flag) | All |
| Add an arc by center, radius, and angles | All |
| Add a point (useful for hole centers) | All |
| Extrude a sketch (additive) | All |
| Cut into solid using a sketch (subtractive) | All |
| Revolve a sketch around an axis (additive) | All |
| Revolve a sketch around an axis (subtractive) | All |
| Create parametric holes with optional threading | All |
| Create a loft through multiple sketches | All |
| Sweep a profile along a spine path | All |
PartDesign - Patterns & Edges (5 tools)
Tool | Description | Mode |
| Create linear pattern of a feature | All |
| Create polar/circular pattern of a feature | All |
| Mirror a feature across a plane | All |
| Add fillets (rounded edges) | All |
| Add chamfers (beveled edges) | All |
View & Display (11 tools)
Tool | Description | Mode |
| Capture a screenshot of the 3D view | GUI |
| Set camera to standard views (Front, Top, etc.) | GUI |
| Zoom to fit all objects in view | GUI |
| Zoom in by a factor | GUI |
| Zoom out by a factor | GUI |
| Set camera position and look-at point | GUI |
| Show/hide objects | GUI |
| Set display mode (Shaded, Wireframe, etc.) | GUI |
| Set object color as RGB values | GUI |
| List available FreeCAD workbenches | All |
| Switch to a different workbench | All |
Undo/Redo (3 tools)
Tool | Description | Mode |
| Undo the last operation | All |
| Redo a previously undone operation | All |
| Get available undo/redo operations | All |
Export/Import (7 tools)
Tool | Description | Mode |
| Export to STEP format (ISO CAD exchange) | All |
| Export to STL format (3D printing) | All |
| Export to 3MF format (modern 3D printing) | All |
| Export to OBJ format (Wavefront) | All |
| Export to IGES format (older CAD exchange) | All |
| Import a STEP file | All |
| Import an STL file as mesh | All |
Macro Management (6 tools)
Tool | Description | Mode |
| List all available FreeCAD macros | All |
| Execute a macro by name | All |
| Create a new macro file | All |
| Read macro source code | All |
| Delete a user macro | All |
| Create macro from template (basic, part, etc.) | All |
Parts Library (2 tools)
Tool | Description | Mode |
| List parts in FreeCAD's parts library | All |
| Insert a part from the library | All |
CAM review and testing (11 tools)
Tools for reviewing and testing CAM (Path) changes. "Local" tools run on the machine of the MCP server (headless FreeCADCmd, file comparisons) and don't need the bridge.
Tool | Description | Mode |
| Counts, cut/rapid length, Z levels, link heights, upward feeds of an op | All |
| Run a probe against two git refs of the CAM code and compare the results | Local |
| Find faces and edges by normal, height or radius | All |
| Build a test Job with stock, tool controller and operation | All |
| Post a job; upload, username and remote dialogs are cancelled | All |
| Compare two G-code outputs | Local |
| Sweep the tool along link moves and report gouges | All |
| Grid check of the material an operation leaves uncut | All |
| Run CAM unit tests, optionally against a baseline tree | Local |
| Run a script in headless FreeCADCmd and return its real exit code | Local |
| Record a captioned GUI demo on an off-screen display | GUI |
GUI health (2 tools)
Tool | Description | Mode |
| Open panels, stray dialogs, active document, new Report-view errors | GUI |
| Close stray panels and dialogs; gets in even while a run is stuck on a dialog | GUI |
GuiDriver - drive the GUI like a user (6 tools)
The add-on ships guidriver (in freecad/MCPPlus/guidriver/, importable inside
FreeCAD as freecad.MCPPlus.guidriver; CAM parts in guidriver.cam). It runs real GUI commands,
reads and sets task panel widgets through their own Qt API (GUI gating included), presses
the task view's OK/Cancel and answers modal dialogs by rule; a dialog no rule matches is
rejected after 3 s and reported. See its README.
These six tools work on every platform; only the real mouse/keyboard helpers (xmouse,
xkeys_external) need Linux with X11.
Tool | Description | Mode |
| Run a command like a toolbar click, with modal-dialog rules | GUI |
| Dump / set / click / OK / Cancel the open task panel | GUI |
| Open an object's editor like a tree double-click | GUI |
| Base Geometry "Add" on the open CAM operation panel | GUI |
| Pre-post warnings (and summary) for a CAM job | GUI |
| Post a job, answering the post's dialogs by rule (never uploads) | GUI |
For Developers
This section covers development setup, contributing, and working with the codebase.
MCP+ Server Development
Prerequisites
Initial Setup
Clone the repository into FreeCAD's Mod folder (see Finding the add-on folder),
so FreeCAD loads the add-on from your working copy, then install the development tools:
git clone https://github.com/Connor9220/freecad-mcp-plus.git <Mod folder>/freecad-mcp-plus
cd <Mod folder>/freecad-mcp-plus
uv sync --extra dev
uv run pre-commit installPoint your MCP client at the clone as in MCP Client Configuration.
Running Tests
# Unit tests (no FreeCAD required)
uv run pytest tests/unit -o addopts=""
# Integration tests (requires FreeCAD running with the bridge started)
uv run pytest tests/integration -o addopts=""Code Quality
The project uses strict code quality checks via pre-commit:
Ruff - Linting and formatting
MyPy - Type checking
Bandit - Security scanning
Codespell - Spell checking
Secrets scanning - Gitleaks, detect-secrets, TruffleHog
uv run ruff check freecad src # Lint
uv run mypy src # Type check
uv run pre-commit run --all-files # All hooksArchitecture
See the detailed architecture document for design documentation covering:
Module structure
Bridge communication protocols
Tool registration patterns
FreeCAD plugin architecture
Acknowledgements
MCP+ is a copy of spkane/freecad-addon-robust-mcp-server by Sean P. Kane, extended by Billy Huddleston. It also takes ideas from neka-nat/freecad-mcp (bridge status, version check) and CREATeNG/freecad-mcp-bridge (paged output for long runs, Origin check, running files). All three are MIT licensed; their notices are in LICENSE.
spkane's original acknowledgements:
This project was developed after analyzing several existing FreeCAD MCP implementations. We are grateful to these projects for their pioneering work and the ideas they contributed to the FreeCAD + AI ecosystem:
Related Projects
neka-nat/freecad-mcp (MIT License) - The queue-based thread safety pattern and XML-RPC protocol design (port 9875) were directly inspired by this project. Our implementation maintains protocol compatibility while being a complete rewrite with additional features.
jango-blockchained/mcp-freecad - Inspired our connection recovery mechanisms and multi-mode architecture approach.
contextform/freecad-mcp - Informed our comprehensive PartDesign and Part workbench tool coverage.
ATOI-Ming/FreeCAD-MCP - Inspired our macro development toolkit including templates, validation, and automatic imports.
bonninr/freecad_mcp - Influenced our simple socket-based communication approach.
See docs/COMPARISON.md for a detailed analysis of these implementations and the design decisions they informed.
License
MIT License - see LICENSE for details.
This server cannot be deployed
Maintenance
Related MCP Connectors
- OwlCADOAuthcom.owlcad
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Related MCP Servers
- AlicenseAqualityDmaintenanceBridges 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.936GNU Lesser General Public v2.1 or later
- AlicenseAqualityDmaintenanceEnables AI assistants to control FreeCAD 3D modeling software, allowing creation and manipulation of 3D objects, execution of Python code, and interaction with FreeCAD's parts library through natural language.10MIT
- AlicenseBqualityDmaintenanceEnables AI assistants to perform 3D modeling and CAD operations in FreeCAD, including geometry creation, boolean operations, and document management.79MIT
- AlicenseCqualityDmaintenanceAllows AI agents like Claude to create, edit, and query 3D models in FreeCAD through natural language.579MIT