Skip to main content
Glama
Slacker-LLC

solidworks-mcp

by Slacker-LLC

solidworks-mcp

English | 简体中文

MCP server that drives a running SOLIDWORKS session over its COM API. It attaches 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+.

Related MCP server: solidworks-mcp

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 current model, 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.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables LLMs to automate SolidWorks (open/save parts, modify dimensions, export STEP) via COM, and optionally generate geometry using build123d code-CAD with PNG previews.
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables control of a live SOLIDWORKS session through the Windows COM API, providing native sketch, feature, body, reference-geometry, view, probe, and export operations, along with transactional CAD plans, parametric sketches, multibody tools, and deterministic raster-to-sketch vectorization pipelines.
    -
  • A
    license
    Not graded
    quality
    B
    maintenance
    Enables AI agents to build, measure, verify, and correct parametric SolidWorks parts and assemblies locally via the COM API, supporting operations like sketching, extruding, modeling, dimensioning, material assignment, export, and assembly mating.
    MIT