CADPilot 是一款 MCP 服务器,允许 AI 客户端(ClaudeCode、OpenCode、DSH、ZCode)试运行 FreeCAD,从自然......
概览
CADPilot 是一款 MCP(模型上下文协议)服务器,赋予 AI 客户端(Cherry Studio、Claude Code、ZCode、Kimi Code、Claude Desktop 等)对 FreeCAD 的完全控制:创建文档、构建受限草图、运行参数化特征、用持久连接组装零件以及验证几何体,所有这些都通过 XML-RPC 工具调用实现。 AI通过CADPilot构建的模型(演示文件可在示例中/): * :电子表格驱动变量、完全约束的草图、PartDesign功能(平板/口袋/革命等)、装饰操作,以及多视角2D→3D视觉外壳,所有这些都通过一个统一的CAD工具实现。* :每个变异也都被记录在FreeCAD端并显示在Dock中:运行计划步骤,接受好的步骤(软锁定),拒绝或回滚其余步骤,调整参数,并从日志中重放整个构建。
概述(AI 翻译)
英语中文
AI 试用 FreeCAD。 CADPilot 是一个 MCP(模型上下文协议)服务器,赋予 AI 客户端(Cherry Studio、Claude Code、ZCode、Kimi Code、Claude Desktop 等)对 FreeCAD 的完全控制权:创建文档、构建受限草图、运行参数化特征、用持久连接组装零件以及验证几何体,所有这些都通过 XML-RPC 工具调用实现。
展示
AI通过CADPilot构建的模型(演示文件现存于examples/):
| 背包 | 桌风扇 |
|---|---|
| 小提琴****叶子 | |
特色
- 端到端参数建模:电子表格驱动变量、完全约束的草图、PartDesign功能(垫/口袋/旋转等)、装扮操作,以及多视角2D→3D可视化船体,全部通过一个统一的
cad()工具实现。 - 步骤日志和复核循环:每个变异也在FreeCAD端记录,并显示在步骤面板底座:运行计划步骤,接受好的步骤(软锁),拒绝或回滚其余步骤,调整参数,并从日志中重放整个构建。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
CADPilot
English | Chinese
AI pilots FreeCAD. CADPilot is an MCP (Model Context Protocol) server that gives AI clients (Cherry Studio, Claude Code, ZCode, Kimi Code, Claude Desktop, …) full control of FreeCAD: create documents, build constrained sketches, run parametric features, assemble parts with persistent joints, and verify geometry, all via tool calls over XML-RPC.
Showcase
Models built by the AI through CADPilot (demo files live in examples/):
Features
- Parametric modeling, end to end: spreadsheet-driven variables, fully constrained sketches, PartDesign features (pad/pocket/revolution/…), dress-up ops, and a multi-view 2D→3D visual hull, all through one unified
cad()tool. - Step journal & review loop: every mutation is also journaled on the FreeCAD side and shown in the Steps panel dock: run planned steps, accept the good ones (soft lock), reject or roll back the rest, edit parameters in place, and replay the whole build from the journal.
execute_codeis a first-class citizen: a snippet that changes the model is wrapped in a transaction and becomes a rollback-able, replayable step, while a read-only inspection never blocks a rollback. Hand edits in the GUI sync back into the recorded steps; session rollback remains for whole-session undo. - Persistence: sessions, patterns, and settings survive restarts as JSON under
~/.cadpilot/; pause a session today, resume it tomorrow. - Geometry sensing: measure volumes/areas, inspect face/edge topology, and check interference after every step; quantitative feedback replaces guesswork on complex models.
- Data-driven assembly: named anchors, residual-checked mates, connectivity audits, and persistent joints (FreeCAD 1.1 Assembly workbench) with declarative priority trimming.
- Workflow memory: successful modeling recipes are stored as reusable patterns and recalled on demand; the agent gets better the more you use it.
- Built-in troubleshooting: the
diagnosetool probes the RPC port, the FreeCAD process, the addon install and its logs on Windows/macOS/Linux, ends with a concrete fix, and works even while FreeCAD is down or frozen.get_addon_logreads the addon’s debug ring buffer even when the GUI is wedged. - Token-friendly: text-first responses with screenshots on demand via
get_view(384 px cap, file delivery), a tiny tool surface, and on-demand operation docs keep context usage low.
安装
uvx cadpilot配置
{
"mcpServers": {
"cadpilot": {
"command": "uv",
"args": ["--directory", "/path/to/cadpilot", "run", "--no-sync", "cadpilot"]
}
}
}