FreeCAD MCP server

Enables AI-driven CAD modeling by providing a remote procedure call (RPC) server that allows programmatic control of FreeCAD, supporting operations like creating documents, inserting parts, editing objects, and executing Python code for generative design workflows.
Back to servers
Setup instructions
Provider
neka-nat
Release date
Mar 17, 2025
Language
Python
Package
Stats
8.9K downloads
191 stars

The FreeCAD MCP server is a tool that enables control of FreeCAD from Claude Desktop, allowing you to automate CAD operations and design tasks using AI assistance. This integration provides a powerful way to create and modify 3D models through natural language commands.

Installation

Installing the FreeCAD Addon

First, you need to install the FreeCAD MCP addon in your FreeCAD installation:

  1. Clone the repository:

    git clone https://github.com/neka-nat/freecad-mcp.git
    cd freecad-mcp
    
  2. Copy the addon to your FreeCAD Mod directory:

    For Windows:

    copy -r addon\FreeCADMCP %APPDATA%\FreeCAD\Mod\
    

    For Mac:

    cp -r addon/FreeCADMCP ~/Library/Application\ Support/FreeCAD/Mod/
    

    For Linux (Ubuntu):

    cp -r addon/FreeCADMCP ~/.FreeCAD/Mod/
    

    For Linux (Ubuntu with snap):

    cp -r addon/FreeCADMCP ~/snap/freecad/common/Mod/
    

    For Linux (Debian):

    cp -r addon/FreeCADMCP ~/.local/share/FreeCAD/Mod/
    
  3. Restart FreeCAD after installation.

  4. Select "MCP Addon" from the Workbench list to activate it.

  5. Start the RPC server by clicking on the "Start RPC Server" command in the "FreeCAD MCP" toolbar.

Setting up Claude Desktop

  1. Install the uvx tool, which is required for the MCP server.

  2. Edit the Claude Desktop configuration file (claude_desktop_config.json):

    Basic configuration:

    {
      "mcpServers": {
        "freecad": {
          "command": "uvx",
          "args": [
            "freecad-mcp"
          ]
        }
      }
    }
    

    To use text-only feedback (uses fewer tokens):

    {
      "mcpServers": {
        "freecad": {
          "command": "uvx",
          "args": [
            "freecad-mcp",
            "--only-text-feedback"
          ]
        }
      }
    }
    

    For developers (using a local repository):

    {
      "mcpServers": {
        "freecad": {
          "command": "uv",
          "args": [
            "--directory",
            "/path/to/freecad-mcp/",
            "run",
            "freecad-mcp"
          ]
        }
      }
    }
    

Using the MCP Server

The FreeCAD MCP server provides several tools that can be used through Claude Desktop:

Available Tools

  • create_document: Create a new document in FreeCAD.
  • create_object: Create a new object in FreeCAD.
  • edit_object: Edit an object in FreeCAD.
  • delete_object: Delete an object in FreeCAD.
  • execute_code: Execute arbitrary Python code in FreeCAD.
  • insert_part_from_library: Insert a part from the parts library.
  • get_view: Get a screenshot of the active view.
  • get_objects: Get all objects in a document.
  • get_object: Get an object in a document.
  • get_parts_list: Get the list of parts in the parts library.

Example Workflow

  1. Start FreeCAD and activate the MCP Server from the toolbar.
  2. In Claude Desktop, you can now interact with FreeCAD using natural language.
  3. For example, you can ask Claude to:
    • "Create a new document named 'MyProject'"
    • "Create a cylinder with radius 10mm and height 30mm"
    • "Show me the current view"
    • "Modify the cylinder to have a radius of 15mm"

Claude will use the appropriate MCP tools to execute these commands in FreeCAD and provide feedback on the operations performed.

Practical Examples

Creating Basic Shapes

To create a simple cube:

You: Create a 10mm cube
Claude: [Uses create_object tool to make a cube]

Designing a Flange

You: I need to design a circular flange with 4 bolt holes
Claude: [Will use multiple commands to create the design]
1. [Uses create_document to start a new project]
2. [Uses create_object to make a circular base]
3. [Uses create_object to add bolt holes with appropriate pattern]

Executing Custom Code

For more complex operations, you can have Claude execute Python code:

You: Create a helical gear
Claude: [Uses execute_code with appropriate FreeCAD Python commands]

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "freecad" '{"command":"uvx","args":["freecad-mcp"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "freecad": {
            "command": "uvx",
            "args": [
                "freecad-mcp"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

2. Add this to your configuration file:

{
    "mcpServers": {
        "freecad": {
            "command": "uvx",
            "args": [
                "freecad-mcp"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later