FreeCAD MCP
Allows to control FreeCAD from Claude Desktop, providing tools for creating, editing, and deleting objects, executing Python code, inserting parts from library, getting views, running FEM analysis, and more.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@FreeCAD MCP Create a 100mm cube at the origin"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
FreeCAD MCP
Claude Desktop から FreeCAD を操作できる MCP サーバーです。
デモ
フランジの設計

トイカーの設計

2D 図面から 3D パーツを設計
入力画像(2D 図面)

デモ

会話履歴はこちら: https://claude.ai/share/7b48fd60-68ba-46fb-bb21-2fbb17399b48
Related MCP server: freecad-mcp
アドオンのインストール
FreeCAD のアドオンディレクトリは以下の通りです。
OS | バージョン | パス |
Windows | FreeCAD 1.1 |
|
Windows | FreeCAD 1.0 |
|
macOS | FreeCAD 1.1 |
|
macOS | FreeCAD 1.0 |
|
Linux (Ubuntu) | — |
|
Linux (Debian) | — |
|
Linux (Arch / CachyOS) | FreeCAD 1.1 |
|
addon/FreeCADMCP ディレクトリを上記のアドオンディレクトリにコピーしてください。
git clone https://github.com/Yaeshio/FreeCAD-MCP-For-YDGA.git
cd FreeCAD-MCP-For-YDGA
# Linux (Ubuntu/Debian)
cp -r addon/FreeCADMCP ~/.FreeCAD/Mod/
# Linux (Arch/CachyOS, FreeCAD 1.1)
mkdir -p ~/.local/share/FreeCAD/v1-1/Mod/
cp -r addon/FreeCADMCP ~/.local/share/FreeCAD/v1-1/Mod/
# macOS (FreeCAD 1.1)
cp -r addon/FreeCADMCP ~/Library/Application\ Support/FreeCAD/v1-1/Mod/# Windows (PowerShell) - プロジェクトルートから実行
# FreeCAD 1.1
robocopy addon\FreeCADMCP "$env:APPDATA\FreeCAD\v1-1\Mod\FreeCADMCP" /E /NFL /NDL
# FreeCAD 1.0
robocopy addon\FreeCADMCP "$env:APPDATA\FreeCAD\Mod\FreeCADMCP" /E /NFL /NDLインストール後、FreeCAD を再起動してください。
ワークベンチ一覧から 「MCP Addon」 を選択すると使用できます。

「FreeCAD MCP」 ツールバーの 「Start RPC Server」 をクリックして RPC サーバーを起動します。

RPC サーバーの自動起動
デフォルトでは FreeCAD を開くたびに手動で RPC サーバーを起動する必要があります。自動起動を有効にするには:
MCP Addon ワークベンチに切り替えてから 「FreeCAD MCP」 メニューを開く
「Auto-Start Server」 にチェックを入れる
設定は freecad_mcp_settings.json に保存され、次回以降の FreeCAD 起動時に自動的に RPC サーバーが起動します。
無効にするには同じメニューの 「Auto-Start Server」 のチェックを外してください。
Claude Desktop のセットアップ
事前に uvx をインストールしてください。
Claude Desktop の設定ファイル claude_desktop_config.json を編集します。
通常ユーザー向け
{
"mcpServers": {
"freecad": {
"command": "uvx",
"args": [
"freecad-mcp"
]
}
}
}トークンを節約したい場合は --only-text-feedback を追加します(スクリーンショットなし)。
{
"mcpServers": {
"freecad": {
"command": "uvx",
"args": [
"freecad-mcp",
"--only-text-feedback"
]
}
}
}開発者向け(ローカルクローンを使用)
git clone https://github.com/Yaeshio/FreeCAD-MCP-For-YDGA.git{
"mcpServers": {
"freecad": {
"command": "uv",
"args": [
"--directory",
"/path/to/freecad-mcp/",
"run",
"freecad-mcp"
]
}
}
}リモート接続
デフォルトでは RPC サーバーは localhost のみで待ち受けます。別のマシンの FreeCAD を操作したい場合は以下の手順で設定してください。
1. FreeCAD 側でリモート接続を有効化
「FreeCAD MCP」 ツールバーで:
「Remote Connections」 にチェックを入れる — 次回再起動時に RPC サーバーが
0.0.0.0(全インターフェース)でバインドされます。セキュリティのため、「Allowed IPs」 で許可した IP アドレスまたは CIDR サブネットからの接続のみ受け付けます(デフォルト:127.0.0.1)。「Configure Allowed IPs」 をクリックし、許可する IP アドレスまたは CIDR サブネットをカンマ区切りで入力します。例:
192.168.1.100, 10.0.0.0/24設定変更後は RPC サーバーを再起動してください。
2. MCP サーバーにリモートホストを指定
--host フラグに FreeCAD が動作するマシンの IP アドレスまたはホスト名を指定します。
{
"mcpServers": {
"freecad": {
"command": "uvx",
"args": [
"freecad-mcp",
"--host", "192.168.1.100"
]
}
}
}--host の値は起動時に検証されます(有効な IPv4/IPv6 アドレスまたはホスト名が必要)。
利用可能なツール
ツール名 | 説明 |
| FreeCAD に新しいドキュメントを作成する |
| FreeCAD にオブジェクトを作成する |
| FreeCAD のオブジェクトを編集する |
| FreeCAD のオブジェクトを削除する |
| FreeCAD 上で任意の Python コードを実行する |
| GUI に触れない長時間処理を非同期で実行する |
| パーツライブラリ からパーツを挿入する |
| アクティブビューのスクリーンショットを取得する |
| ドキュメント内の全オブジェクト一覧を取得する |
| 指定オブジェクトのプロパティを取得する |
| パーツライブラリ のパーツ一覧を取得する |
| ドキュメントをディスクから再読み込みする |
| 開いているドキュメントの一覧を取得する |
| CalculiX ソルバーで FEM 解析を実行し、最大 von Mises 応力・最大変位・節点数などの結果を返す。使用例は |
上流リポジトリ
neka-nat/freecad-mcp をフォークしています。
Available Tools
14 toolscreate_documentA
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). Returns: result
create_objectB
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.
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_type (required), obj_name (required), analysis_name, +1 more. Returns: result
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.
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). Returns: result
edit_objectB
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.
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). Returns: result
execute_codeA
Execute arbitrary Python code in FreeCAD.
Args:
code: The Python code to execute.
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). Returns: result
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). Returns: result
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.
Returns:
The object and a screenshot of the object.
Inputs: doc_name (required), obj_name (required). Returns: result
get_objectsA
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.
Returns:
A list of objects in the document and a screenshot of the document.
Inputs: doc_name (required). Returns: result
get_parts_listA
Get the list of parts in the parts library addon.
Inputs: no named parameters. Returns: result
get_viewA
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. Returns: result
insert_part_from_libraryB
Insert a part from the parts library addon.
Args:
relative_path: The relative path of the part to insert.
Returns:
A message indicating the success or failure of the part insertion and a screenshot of the object.
Inputs: relative_path (required). Returns: result
list_documentsA
Get the list of open documents in FreeCAD.
Returns:
A list of document names.
Inputs: no named parameters. Returns: result
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). Returns: result
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).
Inputs: doc_name (required), analysis_name (required), timeout. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 14 tools
Each tool has a clearly distinct purpose. create_document vs create_object operate at different levels; execute_code and execute_code_async are explicitly separated by thread safety; all object-related tools (get, create, edit, delete) target different actions. No overlapping functionality.
All tool names follow a consistent verb_noun pattern in snake_case (e.g., create_document, get_view, run_fem_analysis). No mixing of camelCase or other conventions; every name clearly indicates its action and target.
14 tools is well-scoped for a 3D CAD automation server. It covers document management, object CRUD, code execution, FEM analysis, parts library, and visualization without being overwhelming. Each tool earns its place.
The tool set covers core workflows: document creation, object modeling of various types, FEM analysis (material, mesh, solver), parts library, and visualization. Minor gaps like explicit save or recompute exist, but these can be handled via execute_code, making the surface reasonably complete.
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables control of FreeCAD CAD software from Claude Desktop through natural language commands. Supports creating, editing, and managing 3D objects, executing Python code, and generating screenshots of designs.10MIT
- AlicenseAqualityDmaintenanceEnables to control FreeCAD from Claude Desktop through MCP, allowing CAD operations like creating and editing objects, taking screenshots, and executing Python code.111MIT
- AlicenseAqualityDmaintenanceAllows controlling FreeCAD from Claude Desktop to create and edit 3D models using natural language commands.10MIT
- AlicenseAqualityDmaintenanceEnables AI-driven control of FreeCAD for CAD modeling, including creating, editing, measuring objects and running FEM analysis, via natural language interaction through Claude Desktop.36MIT