
theosib/freecad-mcp-server
Developer tools이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기
Claude Code가 FreeCAD에 직접 대화할 수 있는 MCP 서버는 상태를 검사하고 수정합니다
개요
MCP (Model Context Protocol) 서버는 라이브 FreeCAD 인스턴스로 Claude를 브릿지합니다. FreeCAD의 런타임 상태에 대한 Claude 딥 액세스를 제공합니다 - 문서 구조, 객체 속성, 모양 topology, 스케치 제약 건강, 그리고 더 - AI 보조 CAD 작업 및 FreeCAD 개발 디버깅을 가능하게합니다. 간단한 스크립트-execution MCP 서버와는 달리, 이 프로젝트는 Claude가 FreeCAD 안에서 무슨 일이 일어나는지 잘 이해하는 것을 제공합니다: 1. (freecad addon/) - FreeCAD 내부에서 workbench로 실행합니다. JSON-RPC 요청을 수락하는 스레드 TCP 서버를 시작하고 QTimer-polled 작업 큐를 통해 FreeCAD의 메인 스레드에서 실행합니다. 2. (src/freecad mcp agent/) - stdio를 통해 Claude에 의해 spawned. TCP를 통해 addon에 연결하고 MCP 도구는 JSON-RPC 요청으로 호출합니다. FreeCAD는 macOS의 symlinks를 의존하지 않습니다. 그래서 얇은 로더 파일을 사용합니다. - macOS: ~/Library/Application Support/FreeCAD/Mod/ (또는 ~/Library/Application Support/FreeCAD/v1-2/Mod/ 주간 빌드) - Linux: ~/.
개요(AI 번역)
MCP (Model Context Protocol) 서버는 라이브 FreeCAD 인스턴스로 Claude를 브릿지합니다. FreeCAD의 런타임 상태에 대한 Claude 딥 액세스를 제공합니다 - 문서 구조, 객체 속성, 모양 topology, 스케치 제약 건강, 그리고 더 - AI 보조 CAD 작업 및 FreeCAD 개발 디버깅을 가능하게합니다.
그것은 무엇을
간단한 스크립트-execution MCP 서버와는 달리, 이 프로젝트는 rich context Extract를 제공합니다. Claude는 FreeCAD에서 일어나는 것을 실제로 이해합니다.
| 도구 | 반품이란?
|—|||
| list_documents | 이름, 파일 경로, 객체 수를 가진 모든 열린 문서 |
| get_document_graph | Full feature tree - TypeId, properties, Dependency link, validity state의 모든 객체 |
| inspect_object | 형상 메타데이터의 단일 객체에 대한 완전한 속성 덤프 |
| analyze_shape | 토픽 분석 - 얼굴 분류 (Plane/Cylinder/Cone/…), 가장자리 세부 사항, 경계 상자, 볼륨 |
| get_sketch_diagnostics | 제약 건강 - DOF, 분쟁, 중복, 모든 제약 및 기하학적 요소 |
| tracked_recompute | 이전/후 디퓨트와 재조합 - 새로운 오류, 오류, 지속적인 오류 |
이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요.
README
원문 README의 일부입니다. 원문 보기.
FreeCAD MCP Server
An MCP (Model Context Protocol) server that bridges Claude with a live FreeCAD instance. It gives Claude deep access to FreeCAD’s runtime state — document structure, object properties, shape topology, sketch constraint health, and more — enabling AI-assisted CAD work and FreeCAD development debugging.
What It Does
Unlike simple script-execution MCP servers, this project provides rich context extraction that lets Claude genuinely understand what’s happening inside FreeCAD:
| Tool | What It Returns |
|---|---|
list_documents |
All open documents with names, file paths, object counts |
get_document_graph |
Full feature tree — every object with TypeId, properties, dependency links, validity state |
inspect_object |
Complete property dump for a single object, with shape metadata |
analyze_shape |
Topological analysis — face classifications (Plane/Cylinder/Cone/…), edge details, bounding box, volume |
get_sketch_diagnostics |
Constraint health — DOF, conflicts, redundancies, every constraint and geometry element with coordinates |
tracked_recompute |
Recompute with before/after diff — new errors, resolved errors, persistent errors |
execute_script |
Run arbitrary Python inside FreeCAD (escape hatch for anything not covered above) |
get_screenshot |
Capture the 3D viewport as a base64 PNG |
reload_handlers |
Hot-reload handler code without restarting FreeCAD |
Architecture
Claude (Code/Desktop) ←stdio MCP→ Bridge Server ←TCP:9876→ FreeCAD Addon
(this project) (inside FreeCAD)
The project has two components:
-
FreeCAD addon (
freecad_addon/) — runs inside FreeCAD as a workbench. Starts a threaded TCP server that accepts JSON-RPC requests and executes them on FreeCAD’s main thread via a QTimer-polled work queue. -
MCP bridge server (
src/freecad_mcp_agent/) — spawned by Claude via stdio. Connects to the addon over TCP and translates MCP tool calls into JSON-RPC requests.
Installation
1. Install the MCP bridge
# Clone the repo
git clone https://github.com/theosib/FreeCAD-MCP-Server.git
cd FreeCAD-MCP-Server
# Create a venv and install
python3 -m venv .venv
source .venv/bin/activate
pip install -e .
2. Install the FreeCAD addon
FreeCAD doesn’t reliably follow symlinks on macOS, so we use a thin loader file.
Find your FreeCAD Mod directory:
- macOS:
~/Library/Application Support/FreeCAD/Mod/(or~/Library/Application Support/FreeCAD/v1-2/Mod/for weekly builds) - Linux:
~/.local/share/FreeCAD/Mod/ - Windows:
%APPDATA%/FreeCAD/Mod/
Tip: Run
FreeCAD.getUserAppDataDir()in FreeCAD’s Python console to find the exact path.
Create the loader:
mkdir -p "/FreeCADMCPAgent"
Create /FreeCADMCPAgent/InitGui.py with:
import sys
설치
This server does not publish a one-line install command.
Open the repository installation guide MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →설정
{
"mcpServers": {
"freecad-debug": {
"command": "/absolute/path/to/FreeCAD-MCP-Server/.venv/bin/freecad-mcp-agent",
"env": {
"FREECAD_MCP_HOST": "127.0.0.1",
"FREECAD_MCP_PORT": "9876"
}
}
}
}