Skip to main content
Glama
FreeCAD MCP Next

FreeCAD MCP Next

by Lumitorus

FreeCAD MCP Next

러시아어 · 영어

러시아어

FreeCAD MCP Next는 FreeCAD를 MCP 클라이언트(Codex, Visual Studio Code의 GitHub Copilot Chat 및 기타 호환 어시스턴트)와 연결합니다.

프로젝트는 두 개의 로컬 프로세스로 구성됩니다:

  1. FreeCAD 내부의 Workbench가 127.0.0.1:9875에서 XML-RPC를 엽니다.

  2. freecad-mcp 명령은 AI 클라이언트용 stdio MCP 서버로 작동합니다.

소스에서 빠른 시작

요구 사항: FreeCAD 1.0 이상, Python 3.12+, Git 및 uv.

git clone https://github.com/Lumitorus/freecad-mcp-next.git
cd freecad-mcp-next
uv sync
uv run python scripts/install_addon.py

FreeCAD를 다시 시작하고 MCP Addon 작업대를 선택한 다음 Start RPC Server를 클릭하세요. 그런 다음 MCP 클라이언트를 연결하세요:

codex mcp add freecad -- uv --directory "C:\path\to\freecad-mcp-next" run freecad-mcp

Copilot의 경우 .vscode/mcp.example.json을 .vscode/mcp.json에 복사하고 경로를 바꾼 다음 VS Code에서 MCP: List Servers 명령을 실행하세요.

전체 지침: docs/installation.ru.md.

프로젝트의 기반을 제공한 neka-nat/freecad-mcp에게 특별히 감사드립니다.

Related MCP server: FreeCAD MCP

영어

FreeCAD MCP Next는 FreeCAD를 Codex, Visual Studio Code의 GitHub Copilot Chat 및 기타 호환 어시스턴트와 같은 MCP 클라이언트에 연결합니다.

프로젝트는 두 개의 로컬 프로세스를 사용합니다:

  1. FreeCAD 워크벤치가 127.0.0.1:9875에서 XML-RPC를 노출합니다.

  2. freecad-mcp 명령이 AI 클라이언트에 stdio MCP 서버를 제공합니다.

소스에서 빠른 시작

요구 사항: FreeCAD 1.0 이상, Python 3.12+, Git 및 uv.

git clone https://github.com/Lumitorus/freecad-mcp-next.git
cd freecad-mcp-next
uv sync
uv run python scripts/install_addon.py

FreeCAD를 다시 시작하고 MCP Addon 워크벤치를 선택한 다음 Start RPC Server를 클릭하세요. 그런 다음 MCP 클라이언트를 연결하세요:

codex mcp add freecad -- uv --directory "C:\path\to\freecad-mcp-next" run freecad-mcp

Copilot의 경우 .vscode/mcp.example.json을 .vscode/mcp.json에 복사하고 경로를 바꾼 다음 VS Code에서 MCP: List Servers를 실행하세요.

전체 가이드: docs/installation.en.md.

이 프로젝트의 기반을 제공한 neka-nat/freecad-mcp에게 특별히 감사드립니다.

개발 및 릴리스

풀 리퀘스트는 Windows, macOS, Linux에서 린팅, 단위 테스트, 패키지 빌드 및 애드온 검증을 실행합니다. Release Please는 Conventional Commits에서 버전/변경 로그 PR을 유지 관리합니다. 해당 PR을 병합하면 초안 릴리스가 생성되고, 세 운영 체제 모두에서 검증되며, 아티팩트가 첨부되어 게시됩니다:

  • Python 휠 및 소스 배포판;

  • 수동 FreeCAD 설치용 FreeCADMCP-<version>.zip;

  • SHA-256 체크섬 파일;

  • 모든 아티팩트가 포함된 GitHub 릴리스.

CONTRIBUTING.md 및 docs/releasing.md를 참조하세요.

Continue, Ollama 및 터미널 클라이언트

Ollama는 로컬 언어 모델을 제공하고, Continue는 MCP 클라이언트 역할을 하여 해당 모델을 FreeCAD 도구에 연결합니다. 복사하여 사용할 수 있는 구성은 examples/config/continue-ollama.yaml에서 확인할 수 있습니다.

자세한 러시아어 및 영어 지침:

라이선스 및 감사의 말

Lumitorus가 유지 관리하며 MIT 라이선스로 배포됩니다.

이 프로젝트의 기반을 제공한 neka-nat/freecad-mcp에게 특별히 감사드립니다. NOTICE.md를 참조하세요.

Available Tools

14 tools
create_documentB

Create a new document in FreeCAD.

Args:
    name: The name of the document to create.

Returns:
    A message indicating the success or failure of the document creation.

Examples:
    If you want to create a document named "MyDocument", you can use the following data.
    ```json
    {
        "name": "MyDocument"
    }
    ```

Inputs: name (required).

create_objectA

Create a new object in FreeCAD. Object type is starts with "Part::" or "Draft::" or "PartDesign::" or "Fem::".

Args:
    doc_name: The name of the document to create the object in.
    obj_type: The type of the object to create (e.g. 'Part::Box', 'Part::Cylinder', 'Draft::Circle', 'PartDesign::Body', etc.).
    obj_name: The name of the object to create.
    obj_properties: The properties of the object to create.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when visual feedback is not needed,
        e.g. for intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the object creation and a screenshot of the object.

Examples:
    If you want to create a cylinder with a height of 30 and a radius of 10, you can use the following data.
    ```json
    {
        "doc_name": "MyCylinder",
        "obj_name": "Cylinder",
        "obj_type": "Part::Cylinder",
        "obj_properties": {
            "Height": 30,
            "Radius": 10,
            "Placement": {
                "Base": {
                    "x": 10,
                    "y": 10,
                    "z": 0
                },
                "Rotation": {
                    "Axis": {
                        "x": 0,
                        "y": 0,
                        "z": 1
                    },
                    "Angle": 45
                }
            },
            "ViewObject": {
                "ShapeColor": [0.5, 0.5, 0.5, 1.0]
            }
        }
    }
    ```

    If you want to create a circle with a radius of 10, you can use the following data.
    ```json
    {
        "doc_name": "MyCircle",
        "obj_name": "Circle",
        "obj_type": "Draft::Circle",
    }
    ```

    If you want to create a FEM analysis, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMAnalysis",
        "obj_name": "FemAnalysis",
        "obj_type": "Fem::AnalysisPython",
    }
    ```

    If you want to create a FEM constraint, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMConstraint",
        "obj_name": "FemConstraint",
        "obj_type": "Fem::ConstraintFixed",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "References": [
                {
                    "object_name": "MyObject",
                    "face": "Face1"
                }
            ]
        }
    }
    ```

    If you want to create a FEM mechanical material, you can use the following data.
    ```json
    {
        "doc_name": "MyFEMAnalysis",
        "obj_name": "FemMechanicalMaterial",
        "obj_type": "Fem::MaterialCommon",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "Material": {
                "Name": "MyMaterial",
                "Density": "7900 kg/m^3",
                "YoungModulus": "210 GPa",
                "PoissonRatio": 0.3
            }
        }
    }
    ```

    If you want to create a FEM mesh, you can use the following data.
    The `Shape` property is required (legacy `Part` is also accepted).
    On FreeCAD 1.x the size limits are `CharacteristicLengthMax/Min`;
    the legacy `ElementSizeMax/Min` keys are also accepted.
    ```json
    {
        "doc_name": "MyFEMMesh",
        "obj_name": "FemMesh",
        "obj_type": "Fem::FemMeshGmsh",
        "analysis_name": "MyFEMAnalysis",
        "obj_properties": {
            "Shape": "MyObject",
            "CharacteristicLengthMax": 10,
            "CharacteristicLengthMin": 0.1
        }
    }
    ```

Inputs: doc_name (required), obj_name (required), obj_type (required), view_name, +3 more.

delete_objectA

Delete an object in FreeCAD.

Args:
    doc_name: The name of the document to delete the object from.
    obj_name: The name of the object to delete.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when visual feedback is not needed,
        e.g. for intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the object deletion and a screenshot of the object.

Inputs: doc_name (required), obj_name (required), view_name, include_screenshot.

edit_objectA

Edit an object in FreeCAD. This tool is used when the create_object tool cannot handle the object creation.

Args:
    doc_name: The name of the document to edit the object in.
    obj_name: The name of the object to edit.
    obj_properties: The properties of the object to edit.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when visual feedback is not needed,
        e.g. for intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the object editing and a screenshot of the object.

Inputs: doc_name (required), obj_name (required), obj_properties (required), view_name, +1 more.

execute_codeA

Execute arbitrary Python code in FreeCAD.

Args:
    code: The Python code to execute.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when the code does not change the model's
        appearance, e.g. analytical or computational scripts whose result is
        printed output, or intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the code execution, the output of the code execution, and a screenshot of the object.

Inputs: code (required), view_name, include_screenshot.

execute_code_asyncA

Execute Python code in FreeCAD without waiting for completion.

Use this ONLY for long-running background computations that do NOT touch the
FreeCAD GUI or mutate the FreeCAD document tree directly.

This tool runs the submitted code in a background thread and returns
immediately. Because it does not run on FreeCAD's main GUI thread, the code
must NOT call FreeCADGui APIs, manipulate the active view or selection, create
or edit document objects, change object properties, call doc.recompute(), or
save documents.

For code that touches FreeCAD documents, document objects, FreeCADGui, the
active view, selection, recompute, or save operations, use execute_code instead.
execute_code runs on the FreeCAD GUI thread and is the safe default for normal
FreeCAD automation.

Use execute_code_async only for background-safe work such as long-running
pure OCCT geometry calculations (e.g. fuse/cut/loft on already-fetched shapes)
or other CPU-bound computations that do not interact with the document or GUI.

Typical usage pattern:
1. Fetch shapes into local variables first (via execute_code on the GUI thread).
2. Store intermediate results in a module-level Python variable (not in the
   FreeCAD document) so execute_code can read them later.
3. Run the heavy computation via execute_code_async.
4. After the expected computation time has elapsed, apply results to the
   document via execute_code (which runs on the GUI thread).

Args:
    code: Background-safe Python code to execute.

Returns:
    A message confirming that background execution has started.

Inputs: code (required).

get_objectA

Get an object from a document. You can use this tool to get the properties of an object to see what you can check or edit.

Args:
    doc_name: The name of the document to get the object from.
    obj_name: The name of the object to get.
    include_screenshot: Whether to return a screenshot of the document (default True).
        Set to False to save tokens when only the object data is needed.
    view_name: The view orientation of the returned screenshot (default "Isometric").

Returns:
    The object and a screenshot of the object.

Inputs: doc_name (required), obj_name (required), view_name, include_screenshot.

get_objectsB

Get all objects in a document. You can use this tool to get the objects in a document to see what you can check or edit.

Args:
    doc_name: The name of the document to get the objects from.
    include_screenshot: Whether to return a screenshot of the document (default True).
        Set to False to save tokens when only the object data is needed.
    view_name: The view orientation of the returned screenshot (default "Isometric").

Returns:
    A list of objects in the document and a screenshot of the document.

Inputs: doc_name (required), view_name, include_screenshot.

get_parts_listA

Get the list of parts in the parts library addon.

Inputs: no named parameters.

get_viewB

Get a screenshot of the active view.

Args:
    view_name: The name of the view to get the screenshot of.
    The following views are available:
    - "Isometric"
    - "Front"
    - "Top"
    - "Right"
    - "Back"
    - "Left"
    - "Bottom"
    - "Dimetric"
    - "Trimetric"
    width: The width of the screenshot in pixels. If not specified, uses the viewport width.
    height: The height of the screenshot in pixels. If not specified, uses the viewport height.
    focus_object: The name of the object to focus on. If not specified, fits all objects in the view.

Returns:
    A screenshot of the active view.

Inputs: view_name (required), width, height, focus_object.

insert_part_from_libraryA

Insert a part from the parts library addon.

Args:
    relative_path: The relative path of the part to insert.
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when visual feedback is not needed,
        e.g. for intermediate steps in a longer sequence of changes.
    view_name: The view orientation of the returned screenshot (default "Isometric").
        Pick the view that best shows the change being made.

Returns:
    A message indicating the success or failure of the part insertion and a screenshot of the object.

Inputs: relative_path (required), view_name, include_screenshot.

list_documentsA

Get the list of open documents in FreeCAD.

Returns:
    A list of document names.

Inputs: no named parameters.

reload_documentA

Close and re-open a document to pick up external file changes.

Use this AFTER the document's .FCStd file has been modified by
something outside of FreeCAD's GUI process — for example, a
headless `freecadcmd` script that edited and saved the file. The
open GUI document is otherwise unaware of on-disk changes; this
tool closes the stale in-memory copy and reopens the file from
disk so the GUI shows current geometry.

Args:
    doc_name: The name of the open document to reload. Must match
        the name shown by ``list_documents``.

Returns:
    A message confirming the document was reloaded, or describing
    the failure (document not loaded, no associated file, etc).

Examples:
    ```json
    {
        "doc_name": "chassis"
    }
    ```

Inputs: doc_name (required).

run_fem_analysisA

Run the CalculiX solver on an existing Fem::FemAnalysis container and return summary results.

Prerequisites in the document:
- A Part-derived solid (e.g. Part::Box, PartDesign::Body) acting as the geometry.
- A Fem::AnalysisPython container created via `create_object`.
- A Fem::MaterialCommon assigned to the geometry, added to the analysis.
- A Fem::FemMeshGmsh referencing the geometry, added to the analysis (the
  mesh is generated automatically when created via `create_object`).
- At least one Fem::ConstraintFixed and one Fem::ConstraintForce (or
  ConstraintPressure) bound to faces of the geometry, added to the analysis.

A SolverCcxTools is auto-created if the analysis has none.

The solver runs synchronously on the FreeCAD GUI thread and blocks all
other RPC calls for its duration; do not fan out parallel requests.

Returns max von Mises stress (MPa), max/min displacement (mm), node count,
and the working directory CalculiX wrote to. On failure, returns the
prerequisite-check or solver error along with the working directory for
triage.

Args:
    doc_name: Name of the FreeCAD document.
    analysis_name: Name of the Fem::AnalysisPython object.
    timeout: Seconds to wait for the solver (default 600).
    include_screenshot: Whether to return a screenshot of the model (default True).
        Set to False to save tokens when only the numeric results are needed.
    view_name: The view orientation of the returned screenshot (default "Isometric").

Inputs: doc_name (required), analysis_name (required), timeout, view_name, +1 more.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.9/5.0

    Scored across 14 tools

    Disambiguation4/5

    Most tools have clear distinct purposes (create, edit, delete, get, list, execute, run FEM). The main ambiguity is edit_object, whose description says it is used 'when create_object cannot handle object creation,' blurring the line between creating and editing. execute_code and execute_code_async are clearly differentiated by threading and GUI-safety rules.

    Naming Consistency4/5

    Tool names generally follow a consistent verb_noun snake_case pattern (create_object, get_object, delete_object, reload_document, run_fem_analysis). Minor inconsistencies exist: get_parts_list uses 'get' while list_documents uses 'list' for essentially the same operation, and execute_code_async uses a suffix rather than a verb-prefix pattern.

    Tool Count5/5

    14 tools is within the well-scoped 3-15 range and each tool addresses a distinct aspect of FreeCAD automation: document management, object CRUD, inspection, code execution, view capture, parts library access, and FEM analysis. No tools feel redundant or extraneous.

    Completeness4/5

    The surface covers the core lifecycle well: create_document, create/edit/delete_object, get_object(s), list_documents, and run_fem_analysis provide solid end-to-end workflows. Minor gaps exist, such as no explicit save_document or close_document tool, though reload_document implies an external-editing workflow and most gaps can be worked around via execute_code.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      A
      maintenance
      An MCP server that enables AI assistants to interact with FreeCAD for 3D modeling, macro development, and debugging through 150+ tools supporting multiple connection modes.
      284
      Apache 2.0
    • A
      license
      Not graded
      quality
      D
      maintenance
      An MCP server that enables automation of FreeCAD model creation, macro execution, and view management through a server-client architecture, supporting integration with external AI tools like Claude and Cursor.
      103
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server for FreeCAD that enables AI assistants to create and manipulate 3D models via natural language.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A Model Context Protocol (MCP) server that enables AI assistants to control FreeCAD for 3D modeling, FEM analysis, and more through natural language.
      2
      MIT