by spkane
The FreeCAD Robust MCP server and MCP Bridge Workbench/Addon
# Add to your Claude Code skills
git clone https://github.com/spkane/freecad-addon-robust-mcp-serverGuides for using mcp servers skills like freecad-addon-robust-mcp-server.
No comments yet. Be the first to share your thoughts!
Top skills in this category by stars
An MCP (Model Context Protocol) server that enables integration between AI assistants (Claude, GPT, and other MCP-compatible tools) and FreeCAD, allowing AI-assisted development and debugging of 3D models, macros, and workbenches.
The macros that were originally in this repo under the
/macrosdirectory have been permanently moved to two new GitHub repos:
FreeCAD Forum: addon discussion post
This section covers installation and usage for end users who want to use the Robust MCP Server with AI assistants.
| Resource | Description | | ------------------------------------------------------------------------------------- | --------------------------------------------- | | Documentation | Full documentation, guides, and API reference | | Docker Hub | Pre-built Docker images for easy deployment | | PyPI | Python package for pip installation | | GitHub Releases | Release archives and changelogs |
Note: The Linux container and PyPI package are both named
freecad-robust-mcpwhich differs slightly from this git repository name.
pip install freecad-robust-mcp
git clone https://github.com/spkane/freecad-addon-robust-mcp-server.git
cd freecad-addon-robust-mcp-server
# Install mise via the Official mise installer script (if not already installed)
curl https://mise.run | sh
mise trust
mise install
just setup
Run the Robust MCP Server in a container. This is useful for isolated environments or when you don't want to install Python dependencies on your host.
# Pull from Docker Hub (when published)
docker pull spkane/freecad-robust-mcp
# Or build locally
git clone https://github.com/spkane/freecad-addon-robust-mcp-server.git
cd freecad-addon-robust-mcp-server
docker build -t freecad-robust-mcp .
# Or use just commands (if you have mise/just installed)
just docker::build # Build for local architecture
just docker::build-multi # Build multi-arch (amd64 + arm64)
Note: The containerized Robust MCP Server only supports xmlrpc and socket modes since FreeCAD runs on your host machine (not in the container). The container connects to FreeCAD via host.docker.internal.
| Variable | Description | Default |
| --------------------- | ---------------------------------------------------- | ----------- |
| FREECAD_MODE | Connection mode: xmlrpc, socket, or embedded | xmlrpc |
| FREECAD_PATH | Path to FreeCAD's lib directory (embedded mode only) | Auto-detect |
| FREECAD_SOCKET_HOST | Socket/XML-RPC server hostname | localhost |
| FREECAD_SOCKET_PORT | JSON-RPC socket server port | 9876 |
| FREECAD_XMLRPC_PORT | XML-RPC server port | 9875 |
| FREECAD_TIMEOUT_MS | Execution timeout in ms | 30000 |
| Mode | Description | Platform Support |
| ---------- | ------------------------------------------- | --------------------------------- |
| xmlrpc | Connects to FreeCAD via XML-RPC (port 9875) | All platforms (recommended) |
| socket | Connects via JSON-RPC socket (port 9876) | All platforms |
| embedded | 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.
Add something like the following to your MCP client settings. For Claude Code, this is ~/.claude/claude_desktop_config.json or a project .mcp.json file:
{
"mc