autocad-mcp
Enables LLMs like Claude to create and edit AutoCAD drawings via natural language, supporting both headless DXF generation and live AutoCAD LT connection through file-based IPC.
README
autocad-mcp
AutoCAD / AutoCAD LT 자동화를 위한 MCP 서버.
Claude 같은 LLM이 자연어로 AutoCAD 도면을 생성·편집할 수 있도록 MCP 프로토콜로 연결합니다.
특징
- AutoCAD LT 지원 — COM/ActiveX 없이 LISP + 파일 IPC 방식으로 LT에서도 동작
- 헤드리스 모드 — ezdxf 백엔드로 AutoCAD 없이 DXF 파일 직접 생성
- Validation Layer — 도면 실행 전 기하·의존성·간섭 검증 (AssemblyValidator로 shape 간 충돌 사전 차단)
- P&ID 지원 — 공정 배관 계장도 심볼·라인 삽입
아키텍처
LLM (Claude)
│ MCP tool call
▼
MCP Server (server.py) ← 8개 툴 + validate
│
├─ Validation Layer ← 실행 전 검증 (geometry / dependency / assembly)
│
├─ File IPC Backend ← AutoCAD LT: JSON 파일 → LISP dispatch → 결과 파일
└─ ezdxf Backend ← 헤드리스: Python에서 DXF 직접 생성
MCP 툴 목록
| 툴 | 설명 |
|---|---|
drawing |
파일 생성·열기·저장·PDF 출력 |
layer |
레이어 생성·속성·잠금·동결 |
entity |
도형 생성 (선·원·호·사각형·폴리라인 등) 및 수정 |
block |
블록 삽입·속성 조회·수정 |
annotation |
치수·지시선 |
pid |
P&ID 심볼·배관 라인 |
view |
줌·화면 제어 |
system |
핑·백엔드 전환·스크린샷 |
validate |
실행 전 Validation (geometry / dependency / assembly) — 개발 중 |
설치
# 의존성 설치
uv sync
# AutoCAD LT 연결 시 LISP 로드 (AutoCAD 명령창에서)
(load "C:/path/to/lisp-code/mcp_dispatch.lsp")
실행
# MCP 서버 시작
uv run python -m autocad_mcp
# 백엔드 선택 (환경변수)
AUTOCAD_MCP_BACKEND=ezdxf uv run python -m autocad_mcp # 헤드리스
AUTOCAD_MCP_BACKEND=file_ipc uv run python -m autocad_mcp # AutoCAD LT
Claude Desktop 연결
claude_desktop_config.json:
{
"mcpServers": {
"autocad-mcp": {
"command": "...python.exe",
"args": ["-m", "autocad_mcp"],
"env": {
"AUTOCAD_MCP_BACKEND": "file_ipc"
}
}
}
}
AutoCAD LT IPC 동작 방식
AutoCAD LT는 COM 자동화를 지원하지 않으므로 파일 기반 IPC를 사용합니다.
Python → C:/temp/autocad_mcp_cmd_{id}.json 작성
→ "(c:mcp-dispatch)" 입력 전송
→ AutoCAD LISP이 명령 실행
→ C:/temp/autocad_mcp_result_{id}.json 작성
→ Python이 결과 파일 폴링
Validation Layer
현재 개발 중입니다. API와 동작 방식은 변경될 수 있습니다.
validate(operation="pipeline", data={"intents": [...]})
│
├─ Phase 1: shape별 개별 검증
│ ├─ GeometryValidator — 치수 범위, 최소 반지름
│ └─ DependencyValidator — layer → entity 순서 (DFA)
│
└─ Phase 2: 전체 교차 간섭 검증
└─ AssemblyValidator — shape 간 겹침·여유 거리
테스트
uv run pytest
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.