# AnkusDrive

AnkusDrive lets an agent operate FreeCAD through its Python API, from CAD parts and drawings to FEM analysis.

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

## What it does

AnkusDrive exposes FreeCAD through a CLI and an MCP server. Its structured tools can create documents and primitives, build model features, apply boolean operations, and run iterative FEM work. The package also includes commands such as `ankusdrive run`, `ankusdrive box`, `ankusdrive ping`, and `ankusdrive doctor`.

The server starts `freecadcmd` as a subprocess, so FreeCAD 1.1.x must be installed separately. AnkusDrive can find the binary through `PATH` or use `ANKUSDRIVE_FREECADCMD`. Host-side rendering uses `Pillow` and `numpy`. PDF/SVG drawing export needs `reportlab` and `svglib` in FreeCAD’s bundled Python; without FreeCAD, there is no worker for the server to launch.

## Requirements
- Needs: Python and uv (commands run via uvx)
- Environment variables: `ANKUSDRIVE_FREECADCMD` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env ANKUSDRIVE_FREECADCMD=<ANKUSDRIVE_FREECADCMD> --transport stdio ankusdrive -- uvx ankusdrive
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from ankusdrive <command>

### Codex

**Platform CLI**
```bash
codex mcp add ankusdrive --env ANKUSDRIVE_FREECADCMD=<ANKUSDRIVE_FREECADCMD> -- uvx ankusdrive
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from ankusdrive <command>

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "ankusdrive": {
            "command": "uvx",
            "args": [
                "ankusdrive"
            ],
            "env": {
                "ANKUSDRIVE_FREECADCMD": "<ANKUSDRIVE_FREECADCMD>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from ankusdrive <command>

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "ankusdrive": {
            "type": "stdio",
            "command": "uvx",
            "args": [
                "ankusdrive"
            ],
            "env": {
                "ANKUSDRIVE_FREECADCMD": "<ANKUSDRIVE_FREECADCMD>"
            }
        }
    }
}
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from ankusdrive <command>

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e ANKUSDRIVE_FREECADCMD=<ANKUSDRIVE_FREECADCMD> ankusdrive uvx ankusdrive
```
Replace <…> with your own values. uvx runs the command named after the package; if the README names another one, use uvx --from ankusdrive <command>

## When to use it
- build a mechanical part in FreeCAD
- inspect a model through MCP tools
- run FEM analysis and read stress fields
- export a drawing as PDF or SVG

## Example prompts
- Create a FreeCAD housing with these dimensions and save it as `part.FCStd`.
- Inspect the current model, add a primitive, and apply a boolean operation.
- Run FEM analysis on this part and report the stress and displacement results.

## Similar
- [FreeCAD MCP](https://affpapa.org/en/nevibecode/mcp/freecad-mcp.md) — MCP server · ★ 62
- [cli-anything-freecad](https://affpapa.org/en/nevibecode/skills/cli-anything-freecad.md) — skill · 650 installs
- [freecad-scripts](https://affpapa.org/en/nevibecode/skills/freecad-scripts.md) — skill · 1200 installs
- [lab-hardware-cad](https://affpapa.org/en/nevibecode/skills/lab-hardware-cad.md) — skill · 819 installs
- [ITASCA MCP Server](https://affpapa.org/en/nevibecode/mcp/itasca-mcp-server.md) — MCP server · ★ 224
- [NetLogo MCP](https://affpapa.org/en/nevibecode/mcp/netlogo-mcp.md) — MCP server · ★ 27

---
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
