FreeCAD MCP
by bonninr
The FreeCAD MCP (Model Control Protocol) provides a simplified interface for interacting with FreeCAD through a server-client architecture. It allows users to execute commands and retrieve information about the current FreeCAD document and scene.
Last updated: N/A
What is FreeCAD MCP?
The FreeCAD MCP is a server-client protocol that enables external applications to control and query FreeCAD. It uses a Python-based server to execute commands and retrieve information about the FreeCAD document and scene.
How to use FreeCAD MCP?
To use the FreeCAD MCP, you need to configure the server with the correct Python executable and the path to the freecad_bridge.py
script. Then, you can connect to the server using a socket and send commands in JSON format. The server will execute the commands and return the results as JSON.
Key features of FreeCAD MCP
Retrieves comprehensive scene information
Executes arbitrary Python code within FreeCAD
Supports document properties, object information, sketch data, and view information
Allows automation of FreeCAD tasks
Use cases of FreeCAD MCP
Automating repetitive tasks in FreeCAD
Integrating FreeCAD with other applications
Creating custom tools and workflows
Remote control of FreeCAD
Extracting data from FreeCAD models
FAQ from FreeCAD MCP
What operating systems are supported?
What operating systems are supported?
Windows, Linux, and macOS are supported.
Where do I find the freecad_bridge.py
script?
Where do I find the freecad_bridge.py
script?
It's located in the src
directory within the freecad_mcp
module in your FreeCAD modules directory.
How do I install the FreeCAD MCP?
How do I install the FreeCAD MCP?
Clone the repository or download the files, place the freecad_mcp
directory in your FreeCAD modules directory, and restart FreeCAD.
What is the default port for the MCP server?
What is the default port for the MCP server?
The example code uses port 9876, but this can be configured.
What kind of commands can I send to the server?
What kind of commands can I send to the server?
Currently, get_scene_info
and run_script
are supported. You can extend the server to support more commands.