solidworks-mcp
MCP server for SolidWorks 2021 - create engineering drawings from any MCP client (Claude Code, Codex, Gemini CLI, Cursor...) via COM
Install / Use
claude mcp add haunchen -- npx -y github:haunchen/solidworks-mcpIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
AutomationSupported Platforms
Our assessment of solidworks-mcp
solidworks-mcp scores 78/100 on our quality scale, 2568th of 2,862 Automation skills we index.
Its MCP Server is 8.5 KB long, well organised into 22 sections with 8 code examples: a thorough specification that gives an agent plenty to work with.
It has 10 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- Our last check on 2026-09-18 found the source still online.
- It is released under the MIT license, a permissive license that allows use, modification and commercial use with attribution.
- Its trust signals score 95/100, with no cautions. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
Safety scan
No issues foundOur scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.
AI review by kimi-k2.7-code on 2026-09-24. Automated pattern scan on 2026-09-24. It catches known dangerous patterns, not every risk — read a skill before letting an agent act on it.
solidworks-mcp compared with similar skills
All 4 of these similar skills score higher than solidworks-mcp; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| solidworks-mcp (this skill)by haunchen | 78 | 10 | 5mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 108.0k | 1d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 78.7k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.8k | today | CLAUDE.md |
| Scraplingby D4Vinci | 100 | 92.4k | today | MCP Server |
Frequently asked questions
- How do I install solidworks-mcp?
- Run
claude mcp add haunchen -- npx -y github:haunchen/solidworks-mcp. The install tabs above show the steps for each supported agent. - Which AI agents does solidworks-mcp work with?
- It is written for Claude Code, Claude Desktop, Cursor, Gemini CLI and OpenAI Codex, as a MCP Server file. Other agents that read the same format can often use it too.
- Is solidworks-mcp safe to use?
- Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It is MIT-licensed and scores 95/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is solidworks-mcp still maintained?
- The repository was last updated about 5 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubsolidworks-mcp
English | 繁體中文
An MCP server that lets Claude — or any MCP client that speaks Streamable HTTP — drive SolidWorks 2021 to create engineering drawings over your LAN, through the pywin32 COM API.
Open a part, generate first-angle standard views, add dimensions and balloons, insert a BOM table, then export to PDF — all from a Claude conversation.
Features
21 tools in 5 categories:
| Category | Tools | |----------|-------| | File operations (3) | open / close / list documents | | Drawing views (6) | create drawing from template, standard views, first-angle aligned 3-view, section view, detail view, custom-orientation view | | Annotation (6) | import model dimensions, probe edges, add dimensions (linear / diameter / radius / angle), auto reference dimensions, balloons, BOM table | | Export (4) | capture drawing (JPEG), capture model views, save as PDF, save drawing | | Assembly analysis (2) | read mates, read feature tree |
See the full tool reference below.
Architecture
Claude Code ◄── Streamable HTTP ──► src/server.py (FastMCP)
│
async tool handlers
│
sw.execute(func) ← asyncio + Future
│
COM Worker Thread (STA, singleton)
│
pywin32 COM → SolidWorks 2021
SolidWorks COM must be driven from a single STA thread. All tool handlers are async and dispatch their COM callables onto a dedicated worker thread, bridged back with concurrent.futures.Future.
Requirements
- Windows 10/11 host with SolidWorks 2021 installed
- Python 3.10+
- An MCP client that supports Streamable HTTP (e.g. Claude Code, Codex CLI, Gemini CLI, Cursor — see Compatible MCP clients) on the same trusted LAN
- Optional: a drawing template (
.drwdot) and an SMB shared folder for large screenshots / PDFs
Only SolidWorks 2021 has been tested. Other versions may work since the COM API is largely stable, but no guarantees.
Quick Start
1. Install (on the SolidWorks host)
git clone https://github.com/haunchen/solidworks-mcp.git
cd solidworks-mcp
python -m venv .venv
.venv\Scripts\pip install -r requirements.txt
<details>
<summary>Offline installation (host without internet access)</summary>
On a machine with internet access:
pip download -d ./wheels -r requirements.txt
Copy the repo (including wheels/) to the SolidWorks host, then:
.venv\Scripts\pip install --no-index --find-links wheels -r requirements.txt
</details>
2. Configure
Copy-Item .env.example .env
# edit .env — see Configuration below
3. Run
.venv\Scripts\python src\server.py
4. Connect from Claude Code (client machine)
claude mcp add --transport http solidworks http://<sw-host>:8080/mcp
Then just ask Claude: "Open bracket.sldprt and create a first-angle 3-view drawing with dimensions, then export it as PDF."
Compatible MCP clients
Any MCP client that supports Streamable HTTP and runs on your machine (or inside the LAN) can connect. Verified examples:
| Client | Config |
|--------|--------|
| Claude Code | claude mcp add --transport http solidworks http://<sw-host>:8080/mcp |
| Codex CLI | config.toml: [mcp_servers.solidworks]<br>url = "http://<sw-host>:8080/mcp" |
| Gemini CLI | gemini mcp add --transport http solidworks http://<sw-host>:8080/mcp |
| Cursor | mcp.json: { "mcpServers": { "solidworks": { "url": "http://<sw-host>:8080/mcp" } } } |
| VS Code Copilot | .vscode/mcp.json: { "servers": { "solidworks": { "type": "http", "url": "http://<sw-host>:8080/mcp" } } } |
| Cline | cline_mcp_settings.json: { "mcpServers": { "solidworks": { "type": "streamableHttp", "url": "http://<sw-host>:8080/mcp" } } } |
| Windsurf | ~/.codeium/windsurf/mcp_config.json: { "mcpServers": { "solidworks": { "serverUrl": "http://<sw-host>:8080/mcp" } } } |
| Continue / Zed / JetBrains AI Assistant / opencode / Goose | see their MCP docs (url / uri field) |
Agent frameworks work too: OpenAI Agents SDK (MCPServerStreamableHttp), LangChain (langchain-mcp-adapters).
Cloud-brokered connectors cannot reach a LAN-only server: Claude Desktop / claude.ai custom connectors and the Anthropic Messages API MCP connector all connect from the vendor's cloud, which is exactly what the trusted-LAN security model blocks.
Configuration
All settings are loaded from .env (see .env.example):
| Variable | Default | Description |
|----------|---------|-------------|
| SW_MCP_HOST | 0.0.0.0 | Address the server binds to |
| SW_MCP_PORT | 8080 | Server port |
| SW_MCP_SMB_PATH | C:\mcp-share | Server-side folder for screenshots / PDFs that exceed the base64 limit |
| SW_MCP_SMB_CLIENT_PATH | (empty) | The same folder as seen from the client (e.g. U:\mcp-share); used to rewrite returned paths |
| SW_MCP_TEMPLATE | (empty) | Drawing template (.drwdot) used by create_drawing |
| SW_MCP_PAPER_SIZE | A3 | Default paper size |
| SW_MCP_MAX_BASE64 | 1048576 | Max screenshot size (bytes) returned inline as base64; larger images are saved to the shared folder |
Security
This server has no authentication. Anyone who can reach the port can drive your SolidWorks instance and read/write files through it.
- Deploy on a trusted LAN only — never expose the port to the internet
- Prefer binding
SW_MCP_HOSTto a specific LAN interface instead of0.0.0.0 - Consider OS-level firewall rules restricting access to known client IPs
Tool Reference
File operations
| Tool | Description |
|------|-------------|
| open_document | Open a SolidWorks document (.sldprt / .sldasm / .slddrw) |
| close_document | Close the specified document |
| list_open_documents | List all documents currently open in SolidWorks |
Drawing views
| Tool | Description |
|------|-------------|
| create_drawing | Create a new drawing document from a template |
| insert_standard_views | Insert independent standard views (no projection alignment, custom scale) |
| insert_standard_views_aligned | Create first-angle aligned front / top / right views with auto scale |
| insert_section_view | Create a section view on a parent view |
| insert_detail_view | Create a detail (magnified) view on a parent view |
| insert_custom_view | Insert a named-orientation or arbitrary XYZ-rotation view |
Annotation
| Tool | Description |
|------|-------------|
| insert_model_dimensions | Import model dimensions into drawing views |
| probe_drawing_edges | Inspect visible edges (index / type / coordinates in mm) before dimensioning |
| add_dimension | Add a linear / diameter / radius / angle dimension between probed edges |
| auto_add_reference_dimensions | Auto-add reference dimensions (bounding box + circles) for non-parametric geometry |
| insert_balloon | Insert balloons on an assembly drawing view (optionally filtered by component) |
| insert_bom_table | Insert a top-level-only BOM table |
Export
| Tool | Description |
|------|-------------|
| capture_drawing | Capture the current drawing as JPEG (inline base64 or shared-folder path) |
| capture_view | Capture multi-angle screenshots from the 3D model |
| save_as_pdf | Export the current drawing to PDF |
| save_drawing | Save the current drawing (.slddrw) |
Assembly analysis
| Tool | Description |
|------|-------------|
| read_assembly_mates | Read all mate relationships of a component in an assembly |
| get_feature_tree | Read the feature tree of a document |
Development
# run all tests (no SolidWorks needed — the COM layer is fully mocked)
.venv\Scripts\pytest tests/ -v
Behavior contracts live in docs/specs/ — specs with status: active describe the expected behavior of shipped features. Design history is in docs/plans/.
See CONTRIBUTING.md for development setup and PR guidelines.
License
Related Skills
Agent-Reach
108.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
78.7kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
CowAgent
47.8kOpen-source personal AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Scrapling
92.4k🕷️ The BEST Web Scraping framework that handles everything from a single request to a full-scale crawl! Don't be shy, join here: https://discord.gg/EMgGbDceNQ and follow here for daily tips and tricks: https://x.com/Scrapling_dev
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
