
SolidWorks MCP
io.github.andrewbartels1Published by GitHub account andrewbartels1v1.5.0Updated Nov 3, 2026
Drive SolidWorks from AI agents: parts, assemblies, drawings and export over the COM API.
Overview
SolidWorks's local MCP server; no sign-in required; STDIO.
No AI overview yet: these facts come from the registry entry and the server itself.
Installation
In SourceWeft
- Open SolidWorks MCP in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
SolidWorks CAD Assistant & MCP Server
[Python 3.13+] [License: MIT] [Windows] [SolidWorks] [Coverage]
Python MCP server for SolidWorks automation with 154 tools, plus an optional agent/prompt-testing layer for AI-assisted workflows.
See it work
Make a 100 x 50 x 10 mm AISI 1020 mounting plate with four M5 clearance holes, 10 mm in from each edge, and draw it fully dimensioned. Stack two of them 10 mm apart, check the result, and draw the assembly with a BOM.
The 58 tool calls an agent made from that prompt, run against SolidWorks 2026 through the same MCP tools a client calls, and recorded (sped up five times). Each result is checked against a hand calculation: the plate's volume and mass, the 10 mm gap and the BOM quantity. This is a replay of the calls, not a recorded model session.
Note: the demo is not perfect, and is not the most efficient way to get this result. The run pauses after each call so it can be read, and the calls are chosen to show what the tools can do: every sketch dimension is added one at a time, and the mate distance is stepped down only so the plates are seen coming together.
The walkthrough in the docs has the agent's plan and every call with its arguments. Run it yourself with the README demo; the calls are also in plate_stack_calls.json.
The 58 tool calls
- Sketch (24 calls):
create_sketchon Top; fouradd_linefor the 100 x 50 outline;add_circlefor each Ø5.5 hole;add_sketch_dimensionfor the 100, the 50, one Ø5.5 and each hole 10 mm from two edges;add_sketch_constraintmaking the other three holes equal;exit_sketch - Check and extrude:
check_sketch_fully_defined,create_extrusion10 mm (+49 049.7 mm³ read back) - Material and check:
list_model_dimensions(finds the Ø5.5 by value),set_materialAISI 1020,verify_model(volume, mass 0.3875 kg, size, 1 feature, 1 body) - Plate drawing:
generate_drawing_packagePS-01 (A3, four views, every model dimension laid out with no overlaps, notes, title block, PDF),auto_center_marks - GD&T:
add_datum_tagA, B and C, thenadd_gtol⊕ Ø0.2 Ⓜ A|B|C on the Ø5.5 - Assembly:
insert_componenttwice,list_components,add_mateFront and Right coincident and Top planes 60 mm apart,set_dimensionstepping that distance down to 20 mm (10 calls),verify_model(2 parts, 3 mates, no interference; the stack measures 30 mm, so the gap is 10 mm) - Assembly drawing:
set_custom_propertyMaterial,generate_drawing_packagePS-02 withinclude_bom(the BOM above the isometric: Demo Plate, QTY 2), then the same datums and position frame
Overview
Tried it? Tell us what worked and what didn't in a feedback issue. Reports from real setups decide what gets fixed next.
This project focuses on practical SolidWorks automation with an AI-friendly loop:
- describe intent
- generate a plan
- execute MCP tools
- inspect results
- iterate
It includes:
- core MCP runtime for SolidWorks tool execution
- COM/VBA routing and adapter safety wrappers
- tool coverage across modeling, sketching, drawing, analysis, export, automation, templates, and macros
- optional agent orchestration/testing utilities under
src/solidworks_mcp/agents/
Demos
Each GIF is a live test driving SolidWorks 2026 through the MCP tools, with the call and its result captioned beneath. Click one to see what it checks, a prompt that asks for it, and its tool calls.
See every demo in the docs: what each one shows, its prompt, every tool call with its arguments (all 58 for the demo at the top), and how to run them yourself.
Supported Today
- Windows + SolidWorks COM automation for the main CAD lifecycle.
- Tested on SolidWorks 2026. Earlier versions may work but are untested; if you try one, please open an issue with what worked.
- Modeling, sketching, drawing, analysis, export, automation, templates, and macro tools.
Not Yet / Simulated
- Mock adapter output is simulated and should not be treated as engineering truth.
- Live 3D viewport streaming in a UI.
- Checkpoint-level interference validation.
- Simple simulation and fluid workflows
- Simple Topology Optimization via SimulationXpress etc.
Install
You need Windows 10 or 11 and SolidWorks (opened at least once). In PowerShell, install uv, then open a new PowerShell window and run setup:
uv fetches Python 3.13 and the server from PyPI by itself; nothing to clone. The guided setup then:
- finds your SolidWorks version and the MCP clients on your PC: Claude Desktop, Claude Code, VS Code, Cursor and LM Studio;
- lets you pick which clients to connect;
- starts the server once to check that it lists its tools (in mock mode, so SolidWorks isn't touched);
- adds a
solidworksentry to each client you picked, then tells you what to restart.
Nothing needs a login or an API key, and the server runs only on your PC. Setup changes only the solidworks entry in each client's config. It backs the file up first and never shows or changes your other servers. Other entries that start this server the old way (run-mcp.ps1 and the like) are offered for removal, so tools don't load twice.
To check it worked: open SolidWorks, restart your client, and ask "What model is open in SolidWorks?"
The package is solidworks-mcp-python. uvx solidworks-mcp installs a different project. To work on the server itself, install from a clone. More fixes are in Troubleshooting.
Connect your client
Run setup again whenever you want to add a client:
To set up a client by hand instead, each one runs uvx solidworks-mcp-python --year 2026, with your SolidWorks year. --year names your installed SolidWorks release and is required for real SolidWorks; setup fills it in for you. It picks which SolidWorks API the lookup tools answer for. Without it, the server logs a warning and uses the newest installed release. If a client can't find uvx, use its full path, from (Get-Command uvx).Source.
Claude Desktop
Add this to claude_desktop_config.json, alongside anything already in it. Depending on how Claude Desktop was installed, the file is in one of:
%LOCALAPPDATA%\Claude-Data\claude_<id>\(current releases)%LOCALAPPDATA%\Packages\Claude_<id>\LocalCache\Roaming\Claude\%APPDATA%\Claude\
Quit Claude Desktop from the system tray (closing the window isn't enough) and reopen it. Settings > Developer should show solidworks as running.
Claude Code
Run /mcp in a new session to check that solidworks is connected.
VS Code
Add this to %APPDATA%\Code\User\mcp.json:
Run MCP: List Servers from the Command Palette and start solidworks. Its output should end with Discovered 154 tools (the count grows as tools are added).
LM Studio
Add this to %USERPROFILE%\.lmstudio\mcp.json:
Restart LM Studio and enable solidworks in the Program tab.
For mock mode, which needs no SolidWorks, use "args": ["solidworks-mcp-python", "--mock"]. Linux and WSL work for the docs, the tests and mock mode, but not for driving SolidWorks.
Optional features (environment variables)
Set these in your client's env block for the server, or in the shell before starting it by hand. Every SOLIDWORKS_MCP_<FIELD> maps to the config field of the same name.
SolidWorks-as-Code session logging (off by default). Logs every adapter tool call to a local SQLite database, so a session can be replayed or exported as a runnable Python script (see docs/getting-started/solidworks-as-code.md).
It works only with the circuit-breaker adapter wrapper (the default for real SolidWorks); the mock adapter does not log.
API docs index auto-refresh (on by default). The API-lookup tools (lookup_api_interface, lookup_api_method, find_related_api_members) and search_solidworks_api_help read a JSON index built by discover_solidworks_docs. When the index is older than the threshold, the next lookup rebuilds it.
Contributing
install.ps1 gives you an editable install, so code changes take effect the next time a client starts the server. For the development tools, install the extras:
.\dev-commands.ps1 lists the common workflows:
dev-install: install or update the local dev environmentdev-test: run the standard test suite (the CI-safe subset)dev-test-full: run the full suite, including smoke and integration pathsdev-lintanddev-format: lint checks and formattingdev-docs-build,dev-docs-strictanddev-docs-audit: build the docs, build them failing on warnings, or write an audit report to.generated/docs
To mirror GitHub Actions CI locally (Ubuntu, the conda env from solidworks_mcp.yml, and make test), run .\scripts\run-ci-local.ps1. The first run builds the image; add -NoBuild to re-run tests without rebuilding.
Docs
- Main docs site: https://andrewbartels1.github.io/SolidworksMCP-python/
- Home/overview: docs/index.md
Key docs sections:
- Getting Started: docs/getting-started
- MCP Server Guide: docs/user-guide
- Tool Catalog: docs/user-guide/tool-catalog
- Agents and Skills: docs/agents
- Planning/Roadmap: docs/planning
Direct links:
- Installation
- Quick Start
- Tutorial: U-Joint Assembly Build
- Tutorial Tracks
- VS Code MCP Setup
- Architecture
- Agents and Prompt Testing
- PydanticAI and Schemas
License
MIT License. See LICENSE.
Source: README.md at commit 126beed
Tools
0Version history
1- v1.5.0LatestNov 3, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts