
FreeCAD MCP(模型上下文协议)服务器
概览
这个仓库是一个FreeCAD MCP,允许你从Claude Desktop控制FreeCAD。 这是对话记录。https://claude.ai/share/7b48fd60-68ba-46fb-bb21-2fbb17399b48 FreeCAD 插件目录为 * Windows: %APPDATA%\FreeCAD\Mod\ * Mac: * FreeCAD 1.1: ~/Library/Application\ Support/FreeCAD/v1-1/Mod/ * FreeCAD 1.0: ~/Library/Application\ Support/FreeCAD/v1-0/Mod/ * Linux: * Ubuntu: ~/.FreeCAD/Mod/ 或 ~/snap/freecad/common/Mod/(如果你从 snap 安装 FreeCAD)* Debian: ~/.local/share/FreeCAD/Mod * Arch / CachyOS(来自 extra/freecad 的 FreeCAD 1.1): ~/.local/share/FreeCAD/v1-1/Mod/ 请把 addon/FreeCADMCP 目录放到插件目录里。 安装插件后,你需要重启 FreeCAD。你可以从 Workbench 列表中选择“MCP 插件”并使用它。 你可以通过“FreeCAD MCP”工具栏中的“启动RPC服务器”命令启动RPC服务器。 默认情况下,每次打开 FreeCAD 时都必须手动启动 RPC 服务器。要自动启动: 1.
概述(AI 翻译)
通过 Claude Desktop 及其他 MCP 客户端控制 FreeCAD。创建和编辑模型, 运行Python脚本,检查文档,并进行有限元分析。
演示
设计法兰:
查看更多玩具汽车的演示和示例,模型来自 二维绘图和代理集成。
快速开始
你需要FreeCAD和UV/UVX。 FreeCAD MCP 包含两个部分:一个运行在 FreeCAD 内部的插件和一个 MCP 服务器 由你的客户启动。
1.安装并启动FreeCAD插件
将addon/FreeCADMCP复制到你的FreeCAD插件目录中,
然后重启 FreeCAD。选择 MCP 插件工作台并点击
在FreeCAD MCP工具栏中启动RPC服务器。
请参阅安装指南中的平台专用命令 以及截图。
2.Connect Claude Desktop
在claude_desktop_config.json中添加以下条目:
重启Claude Desktop加载配置,保持FreeCAD和其RPC保持开启
服务器运行,并请求Claude创建模型。连接使用 localhost
默认。
文献资料
| 指南 | 目录 |
|---|---|
| 安装 | 插件目录,安装截图,从源代码运行 |
| 配置 | 自动启动、文本反馈、远程连接 |
本页由 AI 翻译,技术细节请以原文为准。
README
FreeCAD MCP
Control FreeCAD from Claude Desktop and other MCP clients. Create and edit models, run Python scripts, inspect documents, and run FEM analyses.
Demo
Design a flange:
See more demos and examples for a toy car, modelling from a 2D drawing, and agent integrations.
Quick start
You need FreeCAD and uv / uvx. FreeCAD MCP has two components: an addon running inside FreeCAD and an MCP server launched by your client.
1. Install and start the FreeCAD addon
git clone https://github.com/neka-nat/freecad-mcp.git
cd freecad-mcp
Copy addon/FreeCADMCP into your FreeCAD addon directory,
then restart FreeCAD. Select the MCP Addon workbench and click
Start RPC Server in the FreeCAD MCP toolbar.
See the installation guide for platform-specific commands and screenshots.
2. Connect Claude Desktop
Add the following entry to claude_desktop_config.json:
{
"mcpServers": {
"freecad": {
"command": "uvx",
"args": ["freecad-mcp"]
}
}
}
Restart Claude Desktop to load the configuration, keep FreeCAD open with its RPC
server running, and ask Claude to create a model. Connections use localhost by
default.
Documentation
| Guide | Contents |
|---|---|
| Installation | Addon directories, setup screenshots, running from source |
| Configuration | Auto-start, text feedback, remote connections |
| Tools | Available tools, screenshots, FEM analysis |
| Code execution | GUI execution, background jobs, headless scripts, timeout troubleshooting |
| Demos and examples | Design demos, FEM example, ADK and LangChain integrations |
Contributors
Made with contrib.rocks.
安装
uvx freecad-mcp配置
{
"mcpServers": {
"freecad": {
"command": "uvx",
"args": ["freecad-mcp"]
}
}
}