# FreeCAD MCP

Connects AI coding agents to FreeCAD for parametric 3D modeling, CAM toolpath calculations, and sketch diagnostics.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 61
- Author: blwfish
- License: LGPL-2.1 · policy=link-only · description only; the file stays with the author
- Source: https://github.com/blwfish/freecad-mcp
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/mcp/freecad-mcp

## What it does

The bridge links your agent directly to an active FreeCAD session through the AICopilot addon and local sockets. Instead of editing files blindly, the assistant manipulates PartDesign geometry, inspects constraint errors in the Report View, and tracks down broken external references. It can also export geometry to STEP or write CNC G-code directly from chat prompts.

Running multiple FreeCAD instances side by side is supported out of the box. Every GUI or headless process writes a discovery record to `~/.cache/freecad-mcp/instances/`, allowing the agent to target specific instances via `select_freecad_instance`.

Generating CAM toolpaths requires a recent FreeCAD weekly development build, because Path workbench APIs changed after stable 1.1.x. Standard parametric modeling runs on 1.1.x without issues.

## Requirements
- Needs: Docker

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add freecad-mcp -- docker run -i --rm ghcr.io/blwfish/freecad-mcp:latest
```

### Codex

**Platform CLI**
```bash
codex mcp add freecad-mcp -- docker run -i --rm ghcr.io/blwfish/freecad-mcp:latest
```

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "freecad-mcp": {
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/blwfish/freecad-mcp:latest"
            ]
        }
    }
}
```

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "freecad-mcp": {
            "type": "stdio",
            "command": "docker",
            "args": [
                "run",
                "-i",
                "--rm",
                "ghcr.io/blwfish/freecad-mcp:latest"
            ]
        }
    }
}
```

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add freecad-mcp docker run -i --rm ghcr.io/blwfish/freecad-mcp:latest
```

## When to use it
- Build parametric mechanical parts according to specified dimensions
- Diagnose broken sketch constraints and pad failures via the Report View
- Produce CNC toolpaths and G-code for milling operations
- Import STL mesh files and attach mounting features
- Export completed 3D models into STEP files

## Example prompts
- Create a 100x60mm mounting plate with rounded edges and four M3 bolt holes
- Read the FreeCAD Report View to diagnose why this sketch cannot be padded
- Calculate toolpaths for milling this pocket and export the G-code

## Similar
- [Pascal 3D Editor](https://affpapa.org/en/nevibecode/mcp/pascal-3d-editor.md) — MCP server · ★ 25085
- [Unity-MCP](https://affpapa.org/en/nevibecode/mcp/unity-mcp.md) — MCP server · ★ 4523
- [mcp](https://affpapa.org/en/nevibecode/mcp/sceneview-mcp.md) — MCP server · ★ 1348
- [Gearboy MCP Server](https://affpapa.org/en/nevibecode/mcp/gearboy-mcp-server.md) — MCP server · ★ 1219
- [ChiR24-unreal_mcp_server](https://affpapa.org/en/nevibecode/mcp/chir24-unreal-mcp-server.md) — MCP server · ★ 975
- [Nova3D](https://affpapa.org/en/nevibecode/mcp/nova3d.md) — MCP server · ★ 733

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
