home / mcp / freecad mcp server
Provides programmatic access to FreeCAD data and script execution via an MCP server.
Configuration
View docs{
"mcpServers": {
"bonninr-freecad_mcp": {
"command": "C:\\ProgramData\\anaconda3\\python.exe",
"args": [
"C:\\Users\\USER\\AppData\\Roaming\\FreeCAD\\Mod\\freecad_mcp\\src\\freecad_bridge.py"
]
}
}
}You can control FreeCAD remotely through the FreeCAD MCP Server, sending commands to query the current document and scene or to run Python scripts inside FreeCAD. This enables automation, data extraction, and rapid iteration from your client applications.
Connect to the FreeCAD MCP Server from your client application and send commands that specify the action you want to perform. You can request detailed scene information to inspect the current document, create or modify objects by running Python scripts within FreeCAD, and then read back results or status updates. Use a stable TCP connection to the server, send your command as a structured payload, and handle the response to integrate FreeCAD actions into your workflow.
Prerequisites you need before installing the MCP server include a recent Python installation and access to the FreeCAD Mod directory where you place the MCP module. You will also need a compatible operating system to run FreeCAD and the Python bridge script.
Step by step install and setup:
1. Locate your FreeCAD Mod directory for your platform.
2. Create or copy the MCP module directory into the FreeCAD Mod folder so it is available to FreeCAD on startup.
3. Restart FreeCAD and choose the FreeCAD MCP workbench from the workbench selector.
4. Configure the MCP server by pointing it to the Python executable and the bridge script that handles MCP logic.
Configure the MCP server using a JSON block that defines how to start the server. The bridge script is the bridge between FreeCAD and the MCP interface; you pass the Python interpreter and the path to this script as shown in the example.
{
"mcpServers": {
"freecad": {
"command": "C:\\ProgramData\\anaconda3\\python.exe",
"args": [
"C:\\Users\\USER\\AppData\\Roaming\\FreeCAD\\Mod\\freecad_mcp\\src\\freecad_bridge.py"
]
}
}
}The MCP server provides two core capabilities you can rely on: getting a complete snapshot of the current FreeCAD scene and running arbitrary Python scripts inside FreeCAD. These tools let you inspect document properties, object data, and view parameters, or automate model creation and modifications by scripting inside the FreeCAD environment.
Restrict access to the MCP server to trusted clients, especially when running on a network. Use a secured network channel if supported by your environment and validate all incoming requests before executing scripts. Keep the bridge script and FreeCAD modules up to date to reduce exposure to known issues.
Retrieves comprehensive information about the current FreeCAD document, including document properties, detailed object data, sketch data, and view information such as camera position and orientation.
Executes arbitrary Python code within the FreeCAD context, enabling creation and modification of objects and automation using FreeCAD's Python API.