Labsco
neka-nat logo

FreeCAD MCP

โ˜… 1,200

from neka-nat

A server to interact with FreeCAD models using the Model Context Protocol (MCP).

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedFreeQuick setup

MseeP.ai Security Assessment Badge

FreeCAD MCP

This repository is a FreeCAD MCP that allows you to control FreeCAD from Claude Desktop.

Demo

Design a flange

demo

Design a toy car

demo

Design a part from 2D drawing

Input 2D drawing

input

Demo

demo

This is the conversation history. https://claude.ai/share/7b48fd60-68ba-46fb-bb21-2fbb17399b48

Setting up Claude Desktop

Pre-installation of the uvx is required.

And you need to edit Claude Desktop config file, claude_desktop_config.json.

For user.

Copy & paste โ€” that's it
{
  "mcpServers": {
    "freecad": {
      "command": "uvx",
      "args": [
        "freecad-mcp"
      ]
    }
  }
}

If you want to save token, you can set only_text_feedback to true and use only text feedback.

Copy & paste โ€” that's it
{
  "mcpServers": {
    "freecad": {
      "command": "uvx",
      "args": [
        "freecad-mcp",
        "--only-text-feedback"
      ]
    }
  }
}

For developer. First, you need clone this repository.

Copy & paste โ€” that's it
git clone https://github.com/neka-nat/freecad-mcp.git
Copy & paste โ€” that's it
{
  "mcpServers": {
    "freecad": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/freecad-mcp/",
        "run",
        "freecad-mcp"
      ]
    }
  }
}

Remote Connections

By default the RPC server does not accept remote connections and listens on localhost. To control FreeCAD from another machine on your network:

1. Enable remote connections in FreeCAD

In the FreeCAD MCP toolbar:

  1. Check Remote Connections โ€” the RPC server will bind to 0.0.0.0 (all interfaces) on the next restart. For security reasons, it only accepts connections from the IP addresses or CIDR subnets specified in the Allowed IPs field. By default this is 127.0.0.1.

  2. Click Configure Allowed IPs and enter a comma-separated list of IP addresses or CIDR subnets that are allowed to connect, e.g.:

    Copy & paste โ€” that's it
    192.168.1.100, 10.0.0.0/24

    127.0.0.1 is always the default. Invalid entries are rejected with an error dialog. Restart the RPC server after changing these settings.

2. Point the MCP server at the remote host

Pass the --host flag with the IP address or hostname of the machine running FreeCAD:

Copy & paste โ€” that's it
{
  "mcpServers": {
    "freecad": {
      "command": "uvx",
      "args": [
        "freecad-mcp",
        "--host", "192.168.1.100"
      ]
    }
  }
}

The --host value is validated on startup โ€” it must be a valid IPv4/IPv6 address or hostname.

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.
  • run_fem_analysis: Run the CalculiX solver on an existing Fem::FemAnalysis and return summary results (max von Mises stress, max displacement, node count, working directory). Auto-creates a SolverCcxTools if the analysis has none. See examples/cantilever_fem.py for an end-to-end usage example.

Contributors

<a href="https://github.com/neka-nat/freecad-mcp/graphs/contributors"> <img src="https://contrib.rocks/image?repo=neka-nat/freecad-mcp" /> </a>

Made with contrib.rocks.