freecad-mcp
MCP server for FreeCAD that enables AI assistants to create and manipulate 3D models via natural language.
README
FreeCAD MCP Server
Model Context Protocol server for FreeCAD - Connect Claude AI to FreeCAD for AI-powered 3D modeling
![]()
![]()
A Model Context Protocol (MCP) server for controlling FreeCAD, enabling AI assistants like Claude to create and manipulate 3D models.
Features
- Create 3D objects (boxes, cylinders, spheres)
- Export models to STEP, STL, and OBJ formats
- Full integration with Claude Desktop
- Type-safe Python implementation
- Comprehensive error handling and logging
Requirements
- Python 3.10 or higher
- FreeCAD installed at
/Applications/FreeCAD.app(macOS) - Claude Desktop (for MCP integration)
Installation
1. Install FreeCAD
Download and install FreeCAD from freecad.org.
On macOS, ensure it's installed at the default location:
/Applications/FreeCAD.app
2. Install the MCP Server
Clone or download this repository, then install:
cd freecad-mcp
pip install -e .
This installs the package in editable mode with all dependencies.
3. Configure Claude Desktop
Edit your Claude Desktop MCP configuration file:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Add the following configuration:
{
"mcpServers": {
"freecad": {
"command": "python",
"args": [
"-m",
"freecad_mcp"
]
}
}
}
If you installed in a virtual environment, use the full path to Python:
{
"mcpServers": {
"freecad": {
"command": "/path/to/venv/bin/python",
"args": [
"-m",
"freecad_mcp"
]
}
}
}
4. Restart Claude Desktop
Close and reopen Claude Desktop to load the new MCP server.
Usage
Once configured, you can ask Claude to create 3D models:
Creating Objects
Create a box:
Create a box that is 20mm x 30mm x 10mm tall
Create a cylinder:
Create a cylinder with radius 15mm and height 40mm at position (10, 20, 0)
Create a sphere:
Create a sphere with radius 25mm
Exporting Models
Export to STEP:
Export the model to ~/Desktop/my_model.step
Export to STL:
Export as STL to ~/Desktop/print_me.stl
Available Tools
create_object
Create a 3D primitive object in FreeCAD.
Parameters:
object_type(required): Type of object - "box", "cylinder", or "sphere"dimensions(optional): Object dimensions- For box:
length,width,height - For cylinder:
radius,height - For sphere:
radius
- For box:
position(optional): Object position withx,y,zcoordinates
Example:
{
"object_type": "box",
"dimensions": {
"length": 20,
"width": 30,
"height": 10
},
"position": {
"x": 0,
"y": 0,
"z": 0
}
}
export_file
Export the current FreeCAD document to a file.
Parameters:
format(required): Export format - "step", "stl", or "obj"filepath(required): Output file path (absolute or relative)
Example:
{
"format": "step",
"filepath": "~/Desktop/model.step"
}
Architecture
freecad-mcp/
├── freecad_mcp/
│ ├── __init__.py # Package initialization
│ ├── __main__.py # Entry point
│ ├── server.py # MCP server implementation
│ ├── freecad_bridge.py # FreeCAD interface layer
│ └── tools/
│ ├── __init__.py
│ ├── create_object.py # Object creation tool
│ └── export_file.py # Export tool
├── setup.py # Package setup
├── requirements.txt # Dependencies
└── README.md # This file
Development
Running Tests
# Install in development mode
pip install -e .
# Run the server directly
python -m freecad_mcp
Logging
The server logs to stdout. You can monitor activity:
python -m freecad_mcp 2>&1 | tee server.log
Adding New Tools
- Create a new tool file in
freecad_mcp/tools/ - Implement the tool handler function
- Register the tool in
server.py:- Add to
list_tools()decorator - Add handler in
call_tool()decorator
- Add to
Troubleshooting
FreeCAD Not Found
If you get "FreeCAD not found", ensure it's installed at /Applications/FreeCAD.app or update the paths in freecad_bridge.py.
Import Errors
Make sure you're using the system Python or a virtual environment with access to FreeCAD's libraries.
Server Not Appearing in Claude
- Check the configuration file path
- Verify JSON syntax is valid
- Restart Claude Desktop completely
- Check Claude's logs for errors
License
MIT License
Contributing
Contributions welcome! Feel free to open issues or submit pull requests.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.