Skip to main content
Glama
Srdpersonal

FreeCAD MCP Server

by Srdpersonal

FreeCAD MCP Server

Let AI design 3D models in FreeCAD through natural language.

License: MIT Python 3.11+ FreeCAD 1.1+

FreeCAD MCP Server bridges FreeCAD and AI assistants via the Model Context Protocol (MCP). It exposes 39 CAD tools that let AI agents create, modify, query, and export 3D models — all through natural language conversation.

Why?

Traditional CAD requires learning complex software UIs. With FreeCAD MCP, you can:

  • Design by conversation — describe what you want, AI builds it

  • Iterate rapidly — tweak dimensions, add features, and compare variants in seconds

  • Automate repetitive tasks — parameterized modeling without clicking through menus

  • Integrate into workflows — connect CAD with code review, documentation, and CI/CD

Related MCP server: FreeCAD Robust MCP Server

Demo

Tell your AI assistant:

"Create a 100x60x20mm enclosure base with 2mm wall thickness and a central screen cutout"

The AI will call FreeCAD tools automatically:

new_document → create_box(100, 60, 20) → create_box(96, 56, 18)
→ translate → boolean_cut → export_step("enclosure_base.step")

Quick Start

1. Install

git clone https://github.com/your-username/freecad-mcp.git
cd freecad-mcp

2. Install MCP dependencies with FreeCAD's Python

# macOS
/Applications/FreeCAD.app/Contents/Resources/bin/python -m pip install -r requirements.txt

# Windows
E:\Freecad\bin\python.exe -m pip install -r requirements.txt

# Linux (adjust path to your FreeCAD installation)
freecadpython -m pip install -r requirements.txt

Important: You must use FreeCAD's bundled Python, not the system Python. FreeCAD's FreeCAD.so/FreeCAD.pyd is a C++ extension that only loads in FreeCAD's Python environment.

3. Configure your MCP client

opencode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "freecad-modeling": {
      "type": "local",
      "command": ["bash", "/path/to/freecad-mcp/run_mcp.sh"],
      "enabled": true
    }
  }
}

Claude Desktop / Cline / Cursor

Add to your MCP configuration:

{
  "mcpServers": {
    "freecad-modeling": {
      "command": "bash",
      "args": ["/path/to/freecad-mcp/run_mcp.sh"],
      "cwd": "/path/to/freecad-mcp"
    }
  }
}

Windows users: Replace bash with the path to run_server.bat.

4. Restart your client

The FreeCAD tools will now be available in your AI conversations.

Available Tools (39)

Document Management

Tool

Description

new_document

Create a new FreeCAD document

open_document

Open an existing .FCStd file

save_document

Save the current document

close_document

Close a document

list_documents

List all open documents

list_objects

List objects in a document

get_active_document

Get active document info

Primitive Shapes

Tool

Description

create_box

Create a rectangular box (L×W×H)

create_cylinder

Create a cylinder

create_sphere

Create a sphere

create_cone

Create a cone or frustum

create_torus

Create a torus (donut shape)

create_prism

Create a regular polygon prism

create_hollow_cylinder

Create a hollow cylinder (pipe)

Boolean Operations

Tool

Description

boolean_cut

Subtract one shape from another

boolean_fuse

Merge two shapes into one

boolean_intersect

Keep only overlapping volume

boolean_compound

Group shapes without merging

Transforms

Tool

Description

translate

Move an object by dx/dy/dz

rotate

Rotate around an arbitrary axis

mirror

Mirror across XY/XZ/YZ plane

scale_object

Scale uniformly from a center point

set_placement

Set exact position and orientation

Sketch & Features

Tool

Description

create_sketch_extrude

Extrude a 2D profile into a solid

create_sketch_revolve

Revolve a 2D profile into a solid

fillet_edges

Round edges with a radius

chamfer_edges

Bevel edges at 45°

Measurement & Inspection

Tool

Description

get_object_info

Get type, label, placement, and geometry

measure_volume

Measure volume in mm³

measure_area

Measure surface area in mm²

bounding_box

Get axis-aligned bounding box

center_of_mass

Get center of mass coordinates

check_validity

Verify geometry is valid

Export

Tool

Description

export_step

Export to STEP (best for interoperability)

export_stl

Export to STL (for 3D printing)

export_obj

Export to OBJ (for rendering/mesh)

export_brep

Export to BREP (Open CASCADE native)

export_iges

Export to IGES (legacy CAD exchange)

save_fcstd

Save as FreeCAD native .FCStd

Example Workflows

Enclosure with mounting holes

"Design a 120×80×25mm electronics enclosure. Base should have 2mm walls, internal ribs for PCB mounting, and four M3 screw posts in the corners. Top should be a flat lid with matching screw holes. Export both as STEP."

Parametric bracket

"Create an L-shaped bracket, 50mm on each leg, 5mm thick, with a 10mm fillet on the inner corner and two M4 through-holes on each leg. Measure the volume and export as STL."

Mechanical part with revolve

"Create a shaft collar by revolving a profile: 15mm outer diameter, 8mm bore, 12mm wide, with a 1mm chamfer on both edges. Export as STEP."

Project Structure

freecad-mcp/
├── main.py                 # Entry point
├── freecad_mcp/
│   ├── server.py           # MCP server + tool registration
│   ├── runner.py           # Safe execution wrapper
│   └── tools/
│       ├── document.py     # Document management
│       ├── primitives.py   # Shape creation
│       ├── boolean.py      # Boolean operations
│       ├── transform.py    # Transforms
│       ├── sketch.py       # Sketch features
│       ├── measure.py      # Measurement
│       └── export.py       # File export
├── run_mcp.sh              # macOS/Linux launcher
├── run_server.bat          # Windows launcher
├── requirements.txt        # Python dependencies
└── README.md

Requirements

Component

Version

FreeCAD

1.1 or later

Python

FreeCAD's bundled Python (3.11+)

MCP SDK

mcp>=1.28.0

Configuration

Custom FreeCAD path

Edit run_mcp.sh (macOS/Linux) or run_server.bat (Windows) to point to your FreeCAD Python installation.

Units

All dimensions are in millimeters (mm). The coordinate system is right-handed with Z-axis pointing up.

Contributing

Contributions are welcome! Here's how to get started:

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/my-feature)

  3. Make your changes

  4. Run the smoke test: /Applications/FreeCAD.app/Contents/Resources/bin/python scripts/test_basic.py

  5. Submit a pull request

Ideas for contributions

  • Add new tools (e.g., pattern arrays, surface operations, assembly)

  • Improve error handling and validation

  • Add support for FreeCAD 1.0 (earlier Python versions)

  • Create example projects / tutorials

  • Add unit tests

License

MIT

Acknowledgments

F
license - not found
-
quality - not tested
C
maintenance

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    D
    maintenance
    Enables AI assistants to control FreeCAD 3D modeling software, allowing creation and manipulation of 3D objects, execution of Python code, and interaction with FreeCAD's parts library through natural language.
    Last updated
    10
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    Enables AI agents to programmatically build, analyze, and export 3D CAD geometry using FreeCAD through REST or MCP tools.
    Last updated
    1
    MIT

View all related MCP servers

Related MCP Connectors

  • Free public MCP for AI agents — 193 tools, 44 workflows. No API key.

  • Agent-first CAD: editable .kcad.ts source, deterministic review, OpenCASCADE kernel.

  • Real-time Amazon, WIPO & PACER data for AI agents — 19 tools via the MCP protocol.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Srdpersonal/freecad-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server