solidworks-mcp
solidworks-mcp
COM API를 통해 Claude Desktop을 SolidWorks에 연결하여 금형 및 스탬핑 산업의 판금 부품 자동 분석을 가능하게 하는 MCP 서버입니다.
기능
금형 엔지니어는 Claude Desktop을 열고 이렇게 말할 수 있습니다:
"
bracket.step을 열고, 두께, 모든 홀 직경, 벤드 수를 알려주고, 펼친 패턴을 DXF로 내보내 줘."
Claude는 MCP 도구를 호출하여 다음 작업을 수행합니다:
SolidWorks에서 STEP 열기
판금 감지, 두께 + K-factor 읽기
모든 홀을 직경별로 나열하고 그룹화
각 벤드의 수를 세고 특성 파악 (각도, 반경, 길이)
부품을 펼치고 펼친 패턴을 DXF로 내보내기
구조화된 분석 보고서 반환
절약되는 시간: 수동 검사 60–90분 → 약 60초.
Related MCP server: solidworks-mcp-python
SolidWorks 없이 사용해 보기
이 프로젝트의 대부분은 라이선스가 있는 SolidWorks 설치가 필요하지만, analyze_step_standalone은 CadQuery가 실행되는 모든 곳에서 작동합니다. 이 저장소의 테스트 픽스처를 대상으로 실행하면:
pip install -e .
conda install -c cadquery cadquery # see docs/INSTALL.md for the pip route
python -c "
from mcp.server.fastmcp import FastMCP
from solidworks_mcp.solidworks_bridge import SolidWorksBridge
from solidworks_mcp.tools.analysis import register
import json
mcp = FastMCP('demo'); register(mcp, SolidWorksBridge())
fn = mcp._tool_manager._tools['analyze_step_standalone'].fn
print(json.dumps(fn(file_path='tests/fixtures/sample_part.step'), indent=2))
"sample_part.step에 대한 실제 출력 — 100 x 60 x 2 mm 플레이트에 Ø6 mm 관통 홀 4개가 있는 경우입니다 (요약본; 전체 결과에는 file_path, 개별 경계 상자 범위, 단위 참고 사항도 포함됩니다):
{
"file_size_kb": 33.48,
"volume_mm3": 11773.81,
"surface_area_mm2": 12564.6,
"bounding_box": {
"dimensions_mm": [100.0, 60.0, 2.0]
},
"center_of_mass_mm": { "x": 0.0, "y": 0.0, "z": 1.0 },
"face_count": 10,
"face_types": { "PLANE": 6, "CYLINDER": 4 },
"estimated_thickness_mm": 2.0,
"is_likely_sheet_metal": true
}네 개의 홀은 네 개의 원통형 면으로 나타나며, 두께는 가장 작은 경계 상자 치수에서 추론됩니다.
전제 조건
요구 사항 | 버전 |
Windows | 10 또는 11 (64비트) |
Python | 3.10, 3.11 또는 3.12 |
SolidWorks | Standard 2022 이상 (설치 및 라이선스 필요) |
Claude Desktop | 최신 |
SolidWorks는 이 서버와 동일한 머신에 설치 및 활성화되어 있어야 합니다. COM API는 전체 애플리케이션이 필요합니다 — SolidWorks PDM 또는 Viewer로는 충분하지 않습니다.
빠른 설치
REM 1. Clone the repository
git clone https://github.com/tmkaio/solidworks-mcp.git
cd solidworks-mcp
REM 2. Create a virtual environment
python -m venv .venv
.venv\Scripts\activate
REM 3. Install the package
pip install -e .
REM 4. (Optional) Install CadQuery for standalone STEP analysis
conda install -c cadquery cadqueryClaude Desktop 구성
claude_desktop_config.example.json을 복사하여 Claude 구성에 병합하세요:
위치: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"solidworks": {
"command": "C:\\path\\to\\solidworks-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "solidworks_mcp.server"],
"env": {
"PYTHONPATH": "C:\\path\\to\\solidworks-mcp\\src",
"LOG_LEVEL": "INFO"
}
}
}
}Claude Desktop을 다시 시작하세요. 채팅 도구 모음에 망치 아이콘(🔨)이 나타나야 합니다.
단계별 가이드는 docs/INSTALL.md를 참조하세요.
예시 대화
You: Open C:\parts\door_hinge.step and give me a full analysis.
Claude: [calls open_file, get_part_info, analyze_holes, analyze_bends]
The door hinge is a sheet metal part:
- Thickness: 2.00 mm (K-factor: 0.44)
- Bounding box: 120 x 80 x 45 mm
- Mass: 312 g
- 12 holes: Ø6mm x 4, Ø8mm x 4, Ø12mm x 4
- 3 bends: 90° x R2mm (two) and 45° x R3mm (one)
- Complexity: medium
You: Export the flat pattern as DXF to C:\output\hinge_flat.dxf
Claude: [calls flatten_part, export_dxf, unflatten_part]
Flat pattern exported: C:\output\hinge_flat.dxf (18.4 KB)
Flat dimensions: 310 x 80 mm사용 가능한 도구
연결
도구 | 설명 |
| SolidWorks에 연결 (실행 중이 아니면 시작) |
| 연결 상태 및 활성 문서 확인 |
| COM 참조 해제 |
파일
도구 | 설명 |
| STEP, SLDPRT, IGES 등 열기 |
| 활성 문서 닫기 |
| 저장 / 다른 이름으로 저장 |
| 열려 있는 모든 파일 나열 |
분석
도구 | 설명 |
| 질량, 부피, 재질, 판금 플래그 |
| 가로 x 세로 x 높이 + 대각선 |
| 피처 히스토그램 |
| 모든 홀을 직경별로 그룹화 |
| 각도/반경/길이를 포함한 모든 벤드 |
| 요약 보고서 + 복잡도 등급 |
| 전체 JSON + Markdown 보고서 |
| SolidWorks 불필요 — CadQuery 사용 |
| Ixx/Iyy/Izz + 관성 곱 |
| 면 유형 분석 (평면/원통형/등) |
판금
도구 | 설명 |
| True/False 확인 |
| 두께, K-factor, 벤드 반경 |
| 가져온 솔리드를 판금으로 변환 |
| 펼친 패턴 활성화 |
| 접힌 상태로 복귀 |
내보내기
도구 | 설명 |
| 펼친 패턴 -> DXF (레이저 / NC용) |
| 부품 -> STEP AP214 |
| 부품 -> STL |
| 문서 -> PDF |
| 뷰포트 -> PNG |
사용자 지정 속성 및 재질
도구 | 설명 |
| 활성 문서에서 모든 사용자 지정 속성 읽기 |
| 이름이 지정된 단일 속성 읽기 |
| 사용자 지정 속성 생성 또는 업데이트 |
| 사용자 지정 속성 제거 |
| SolidWorks 라이브러리에서 재질 할당 |
| 사용 가능한 .sldmat 재질 데이터베이스 나열 |
구성
도구 | 설명 |
| 활성 플래그를 포함한 모든 구성 나열 |
| 현재 활성 구성의 세부 정보 |
| 다른 구성 활성화 |
| 새 구성 생성 (기존 구성 복사) |
| 구성 제거 |
| 구성별 사용자 지정 속성 |
측정
도구 | 설명 |
| 이름이 지정된 두 엔터티 사이의 거리 |
| 단일 엔터티의 길이/면적/좌표 |
| 인덱스로 면의 면적, 법선, 중심 |
| 두 엔터티 사이의 최소 간격 |
| 단면 Ixx/Iyy/면적/중심 |
피처 관리
도구 | 설명 |
| FeatureManager 트리 나열 (유형 필터 포함) |
| 피처의 유형, 억제 상태, 오류 |
| 구성에서 피처 억제 |
| 억제된 피처 복원 |
| 피처의 파라메트릭 치수 |
| 강제 재생성 (표준 또는 전체) |
| 피처 재생성 오류 설명 |
도면
도구 | 설명 |
| 활성 부품/어셈블리에서 새 도면 생성 |
| 도면에 표준/등각 투영 뷰 추가 |
| 도면의 모든 뷰 나열 |
| 시트 수, 축척, 용지 크기 |
| 도면 시트 축척 변경 |
어셈블리
도구 | 설명 |
| 모든 컴포넌트 나열 (최상위 또는 재귀) |
| 빠른 컴포넌트 수 |
| 수량이 포함된 BOM |
| 모든 메이트 구속조건 나열 |
| 이름이 지정된 컴포넌트의 질량, 경로, 경계 상자 |
| 전체 어셈블리 질량 및 질량 중심 |
제한 사항 (v0.1)
어셈블리 지원은 읽기 전용입니다. 컴포넌트, BOM, 메이트 및 질량을 읽을 수 있지만 메이트 생성이나 컴포넌트 삽입은 지원되지 않습니다.
파라메트릭 편집 없음. 피처를 나열, 억제, 억제 해제할 수 있지만 치수를 구동할 수는 없습니다.
STEP 파일은 "더미" 솔리드로 가져옵니다. 벤드 분석이 결과를 반환하려면 먼저
convert_to_sheet_metal을 실행해야 합니다.스트립 레이아웃 / 프로그레시브 금형 설계 없음.
Windows 전용, 라이선스가 있는 로컬 SolidWorks 설치가 필요합니다 — COM API는 전체 애플리케이션이 필요합니다. 유일한 예외는 CadQuery를 통해 어디서나 실행되는
analyze_step_standalone입니다.
로드맵
버전 | 기능 |
v0.2 | 스트립 레이아웃 도구 — 스테이션 구성 |
v0.3 | 힘 계산 (컷, 벤드, 드로우) |
그 이후로는 성형성 및 언더컷 감지, 생성된 도면의 GD&T 주석, 네스팅 통합이 모두 유력한 방향이지만, 확정된 것은 없습니다.
개발
테스트 스위트는 COM 계층을 모킹하므로 실행에 SolidWorks 라이선스가 필요하지 않습니다:
pip install -e ".[dev]"
ruff check src tests
pytest -vWindows에서는 그것으로 끝입니다: 54개 테스트가 모두 실행됩니다. CI는 Linux에서 동일한 두 명령을 실행하며, pywin32에 Linux 휠이 없기 때문에 pip install -e . 대신 순수 Python 의존성을 직접 설치합니다.
종속성이 없을 때 실패하지 않고 스스로 건너뛰는 두 그룹이 있습니다:
connect()/disconnect()테스트는pythoncom과win32com.client를 이름으로 패치하므로 pywin32가 필요하며 Windows에서만 실행됩니다;analyze_step_standalone에는 CadQuery가 필요합니다.
그 외의 모든 것 — COM 호출 계약, 홀 및 벤드 추출, 단위 변환, 피처 탐색 — 은 어디서나 실행됩니다.
로그
서버 로그: %USERPROFILE%\.solidworks-mcp\logs\server.log
Claude Desktop 로그: %APPDATA%\Claude\logs\
라이선스
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Phasio is the operating platform contract manufacturers run on: quoting, production, and back office across additive, CNC, molding, and every process in between. This connector gives LLMs like Claude, ChatGPT and Grok access to your Phasio workspace, so you can interact naturally with your manufacturing data. Commercial - Which customers drive the most revenue? How storefront self-service orders compare against quotes your team builds by hand? Where do carts convert and where they stall? Parts - Inspect any parts volume, bounding box, minimum wall thickness and watertightness, with rendered orthogonal views. Find near-duplicates of a part you've already made before you quote it again. Pricing - Run quotes against parts using your LLM. Ask the model to explain why a part got a certain price, and to tune and refine your pricing equations. Production - Where a job's parts sit on the routing right now? What's been scrapped and why, and which other jobs were caught by the same failed build? Setup - Easily configure pricing equations, shop floor routing and your QMS agentically.
Create contacts, move deals, send proposals and invoices, read your inbox, from Claude or ChatGPT.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to create and manipulate SolidWorks CAD models through natural language commands, automating part creation, sketching, and extrusion.10-
- AlicenseBqualityBmaintenanceEnables Claude or any MCP client to drive a live SOLIDWORKS session through its COM API, modeling parts, building assemblies with mates, checking interferences and machining feasibility, and exporting STEP or DXF files. It also exposes a local semantic index of the SOLIDWORKS API so the model can look up signatures, enums, and official examples before running arbitrary Python against the session.221MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents such as Claude to drive SolidWorks through its COM API using natural language, creating parts and assemblies, sketching geometry, and adding features without clicking menus. Also supports running arbitrary API scripts and verifying results through model reports, rendered views, interference checks, and exports.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to control SolidWorks through natural language, supporting part and assembly creation, sketches, advanced features, dimension editing, selection inspection, screenshots, and rebuilds.MIT