JS

jaylamping/solidworks-mcp

开发工具

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

5 stars 4 forks 质量 78 趋势 21MIT

MCP server for SolidWorks on Windows — open and edit parts/assemblies, create geometry, mates, measure, rebuild, export, and more via a TypeScript front door and .NET COM worker.

概览

MCP server that drives SolidWorks on Windows from Cursor (or another MCP client). Open and edit parts and assemblies, create geometry, mates, measure, rebuild, export, and more — without writing macros. This project is under active development. APIs, tools, and behavior will change. Expect rough edges, missing coverage, and breaking updates. Windows · licensed SolidWorks · Cursor (or another MCP client) · Node.js 20+ · .NET 8 SDK SolidWorks should be open (or launchable) on the same machine. 1. Have SolidWorks running (open a document, or start from a blank session). 2. In Cursor, ask for the change you want — edit what’s open, or build a new part from scratch. 3. The assistant drives SolidWorks through this server. 4. Check the model, then confirm before it saves. - "List the mates on this assembly and tell me which ones are failing." - "Measure the distance between these two faces." - "Add a coincident mate between the flange face and the bracket face.

README

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

SolidWorks MCP

MCP server that drives SolidWorks on Windows from Cursor (or another MCP client). Open and edit parts and assemblies, create geometry, mates, measure, rebuild, export, and more — without writing macros.

[!NOTE] Heavy WIP. This project is under active development. APIs, tools, and behavior will change. Expect rough edges, missing coverage, and breaking updates.

Needs: Windows · licensed SolidWorks · Cursor (or another MCP client) · Node.js 20+ · .NET 8 SDK
SolidWorks should be open (or launchable) on the same machine.

Workflow

  1. Have SolidWorks running (open a document, or start from a blank session).
  2. In Cursor, ask for the change you want — edit what’s open, or build a new part from scratch.
  3. The assistant drives SolidWorks through this server.
  4. Check the model, then confirm before it saves.

Examples:

  • “List the mates on this assembly and tell me which ones are failing.”
  • “Measure the distance between these two faces.”
  • “Add a coincident mate between the flange face and the bracket face.”
  • “Export a PNG of the current view so I can check the pose.”
  • “Extrude a cube, then cut cylinders all the way through on each face.”
  • “Save a checkpoint before we change anything.”

Destructive tools require confirm: true. Don’t save until you’ve said the model looks right.

Setup

On the Windows machine that runs SolidWorks:

1. Install Node and .NET

Node.js 20+ and the .NET 8 SDK.

2. Clone and build

git clone https://github.com/jaylamping/solidworks-mcp.git
cd solidworks-mcp
npm install
npm run build

3. Check SolidWorks

Start SolidWorks, then:

npm run worker:status

You should see a live COM connection (and the open document if any).

4. Connect Cursor

Point MCP at your clone (path placeholders → your real folder):

{
  "mcpServers": {
    "solidworks": {
      "command": "node",
      "args": [
        "C:/path/to/solidworks-mcp/node_modules/tsx/dist/cli.mjs",
        "C:/path/to/solidworks-mcp/src/index.ts"
      ],
      "env": {
        "SOLIDWORKS_MCP_TOOL_TIER": "extended",
在 GitHub 查看完整 README

安装

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

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

配置

{ "mcpServers": { "solidworks": { "command": "node", "args": [ "C:/path/to/solidworks-mcp/node_modules/tsx/dist/cli.mjs", "C:/path/to/solidworks-mcp/src/index.ts" ], "env": { "SOLIDWORKS_MCP_TOOL_TIER": "extended", "SOLIDWORKS_MCP_ALLOWED_ROOTS": "C:/cad;D:/projects;C:/path/to/solidworks-mcp/.demo", "SOLIDWORKS_MCP_PERSISTENT_WORKER": "1" } } } }