Slacker-LLC

solidworks-mcp

Community Slacker-LLC
Updated

MCP server that drives a running SOLIDWORKS session over its COM API - 92 tools for sketching, solid features, reference geometry, assemblies and drawings, with screenshots as a feedback channel

solidworks-mcp

English | 简体中文

MCP server that drives a running SOLIDWORKS session over its COM API. Itattaches to the session you already have open; it does not launch SOLIDWORKS,register an add-in or touch the network.

192 tools. Covered vs not covered: COVERAGE.md.

Requirements

Windows, SOLIDWORKS installed and already running, Python 3.10+.

Install

git clone https://github.com/Slacker-LLC/solidworks-mcp.git
cd solidworks-mcp
py -3 -m venv .venv
.venv\Scripts\python.exe -m pip install .

The command is solidworks-mcp; the distribution is solidworks-mcp-server.

Claude:

{
  "mcpServers": {
    "solidworks-mcp": {
      "command": "C:\\path\\to\\.venv\\Scripts\\solidworks-mcp.exe"
    }
  }
}

Codex CLI (~/.codex/config.toml):

[mcp_servers.solidworks-mcp]
command = 'C:\path\to\.venv\Scripts\solidworks-mcp.exe'

Configuration

Variable Default Meaning
SW_MCP_OUTPUT_ROOT ~/Documents/solidworks-mcp Everything the server writes stays under here.
SW_MCP_TEMPLATE_DIR auto-discovered .prtdot / .asmdot / .drwdot template directory.
SW_MCP_DEMO_TOOLS unset 1 adds demo tools that degrade tool selection.
SW_MCP_SESSION_PID unset Attach to a specific existing instance.

Lengths are _mm, angles _deg. Geometry is passed as a selection object({"edges": [4, 6, 9]}, {"planes": ["front"]}); indices describe the currentmodel, so re-list them after a geometry change.

Testing

python -m unittest discover -s tests -p 'test_*.py'     # offline
python tests/live_p0_regression.py                      # live, SOLIDWORKS running

Contributor notes: CONTRIBUTING.md · release process:RELEASING.md.

License

Apache License 2.0 — see LICENSE and the Simplified Chinese note. Copyright 2026 JIALE LIU.

MCP Server · Populars

MCP Server · New