freecad
A Model Context Protocol (MCP) server that enables AI assistants to interact with FreeCAD for 3D modeling and CAD operations
claude mcp add --transport stdio lucygoodchild-freecad-mcp-server node /path/to/free-cad-mcp/build/index.js
How to use
This MCP server exposes FreeCAD functionality to AI assistants through the Model Context Protocol. It enables programmatic creation and manipulation of 3D geometry, supports basic boolean operations, document management, and the ability to run arbitrary Python scripts within FreeCAD's context. You can drive the server from an MCP client to generate geometry by issuing structured commands such as create_box, create_cylinder, create_sphere, and boolean_operation, then save or inspect the resulting document. The available tools support parametric design and assembly-style workflows, allowing you to build complex models by composing simple primitives and applying operations like union, cut, or common between objects. You can also execute custom Python scripts to perform specialized tasks directly inside FreeCAD before finalizing and saving your work. The server is cross-platform and designed to work with Claude and other MCP-enabled assistants that can generate and refine 3D models through natural language or structured prompts.
How to install
Prerequisites:
- FreeCAD must be installed on the host machine (freecad.org).
- Node.js (v18 or higher).
- TypeScript for development.
Install and build:
- Clone the repository:
git clone https://github.com/lucygoodchild/freecad-mcp-server.git
cd freecad-mcp-server
- Install dependencies:
npm install
- Build the project:
npm run build
- Ensure FreeCAD path detection works or configure manually (optional):
- The server attempts to auto-detect FreeCAD installation.
- Default paths (example):
- Windows: C:\Program Files\FreeCAD 0.21\bin\FreeCAD.exe
- macOS: /Applications/FreeCAD.app/Contents/MacOS/FreeCAD
- Linux: /usr/bin/freecad
Additional notes
Tips:
- If FreeCAD is not found, set the freecadPath in the server constructor or environment to the executable path.
- When using execute_python_script, ensure the script is compatible with FreeCAD's Python environment and has access to the current document (e.g., doc refers to the active document).
- Use list_objects to verify object names before performing boolean operations to avoid errors.
- For Claude or other MCP clients, ensure the client configuration points to the correct node command and entry file (build/index.js).
- Check file write permissions when saving documents to a specific path.
- If you run into permission issues on Linux/macOS, ensure the FreeCAD binary and Node process have execution permissions and that the user has access to the FreeCAD installation.
Related MCP Servers
iterm
A Model Context Protocol server that executes commands in the current iTerm session - useful for REPL and CLI assistance
mcp
Octopus Deploy Official MCP Server
furi
CLI & API for MCP management
editor
MCP Server for Phaser Editor
DoorDash
MCP server from JordanDalton/DoorDash-MCP-Server
mcp
MCP сервер для автоматического создания и развертывания приложений в Timeweb Cloud