ES

eduardof0nt/solidworks-mcp-server

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

10 stars 3 forks 质量 73 趋势 22MIT

A comprehensive server that gives Claude (or any MCP-compatible LLM client) full control of SolidWorks through the COM API.

概览

A comprehensive server that gives Claude (or any MCP-compatible LLM client) full control of SolidWorks through the COM API. spanning every major workflow — modeling, sketching, assemblies, drawings, sheet metal, weldments, mold tools, surfaces, simulation, motion, rendering, materials, and more. ✅ — handles SW 2024's dual property/method API quirks (DISPID invocation, property-get bypass, 23-arg FeatureExtrusion3, VARIANT marshaling, etc.). Should also work on SW 2018+. - "Create a 100×60×40 mm aluminum part, render it, and export to STEP" - "Open this assembly, check for interferences, then mass-analyze each component" - "Generate a 3-view drawing of bracket.

README

以下为原文 README 节选,完整内容请查看原文。

SolidWorks MCP Server

A comprehensive Model Context Protocol (MCP) server that gives Claude (or any MCP-compatible LLM client) full control of SolidWorks through the COM API. 187 tools spanning every major workflow — modeling, sketching, assemblies, drawings, sheet metal, weldments, mold tools, surfaces, simulation, motion, rendering, materials, and more.

✅ Verified on SolidWorks 2024 — handles SW 2024’s dual property/method API quirks (DISPID invocation, property-get bypass, 23-arg FeatureExtrusion3, VARIANT marshaling, etc.). Should also work on SW 2018+.


✨ What you can ask Claude to do

  • “Create a 100×60×40 mm aluminum part, render it, and export to STEP”
  • “Open this assembly, check for interferences, then mass-analyze each component”
  • “Generate a 3-view drawing of bracket.sldprt with dimensions, GD&T, and a BOM, then save as PDF”
  • “Design a parametric sheet-metal enclosure with 2 mm thickness, four edge flanges, and export flat patterns”
  • “Build a weldment frame from 40×40×4 square tube along this sketch”
  • “Set up a static simulation, apply this fixture and 500 N load, and run the analysis”

📋 Prerequisites

Requirement Notes
Windows 10/11 SolidWorks is Windows-only
SolidWorks 2018 or newer Tested and developed against SolidWorks 2024
Python 3.10+ python.org — make sure “Add to PATH” is checked
An MCP client Claude Desktop or Claude Code recommended

🚀 Installation

1. Clone the repository

git clone https://github.com/Eduardof0nt/Solidworks-MCP-Server.git
cd Solidworks-MCP-Server

2. Install Python dependencies

pip install -r requirements.txt

If you hit permission issues installing globally, use a virtual environment or --user:

python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

3. Verify the server starts

python server.py

The server will sit waiting for MCP stdio traffic — that’s correct. Hit Ctrl+C to stop; you’ll wire it into a client in the next step.


🔌 Configuring an MCP client

Claude Desktop

Edit %APPDATA%\Claude\claude_desktop_config.json (create it if it doesn’t exist):

{
  "mcpServers": {
    "solidworks": {
      "command": "python",
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →

配置

{ "mcpServers": { "solidworks": { "command": "python", "args": ["C:\\full\\path\\to\\Solidworks-MCP-Server\\server.py"] } } }