
SolidWorks MCP
Automate SolidWorks over COM from your AI client: sketches, features, drawings, exports and VBA generation (alpha).
Add to your client
Copy the config for your MCP client and paste it into its config file.
git clone https://github.com/vespo92/SolidworksMCP-TS.git && cd SolidworksMCP-TS && npm install && npm run buildPaste into ~/Library/Application Support/Claude/claude_desktop_config.json
{
"mcpServers": {
"solidworks-mcp": {
"command": "node",
"args": [
"C:/path/to/SolidworksMCP-TS/dist/index.js"
],
"env": {
"SOLIDWORKS_PATH": "C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS",
"ADAPTER_TYPE": "winax-enhanced"
}
}
}
}Step-by-step guides: Add to Claude Desktop · Add to Cursor · Add to Windsurf
Before you start
- Windows 10/11 (COM interop is Windows-only)
- Licensed SolidWorks 2021–2025 installed
- Node.js 20+ (npm install compiles the winax native module locally)
About SolidWorks MCP
The pipeline is: MCP stdio → tool registry → feature complexity analyzer → either a direct COM call via winax (12 parameters or fewer) or an auto-generated VBA macro run by SolidWorks (13+ parameters), with fallback and error context when a path fails. The README documents hard-won COM lessons as design rules: never pass null to COM (VT_NULL type mismatches broke SelectByID2), prefer feature-tree traversal (FeatureByPositionReverse + GetTypeName2) over SelectByID2, and log via Winston only because console.* corrupts the JSON-RPC stdio stream.
Status honesty is a feature of this project. Verified so far: connecting to a running SolidWorks instance, creating sketch planes and basic geometry, simple extrusions, feature-tree traversal, and VBA code generation. Marked untested: drawings, exports, analysis tools and macro recording. The tool table in the README carries per-category status labels.
Requirements are firm: Windows 10/11 (COM is Windows-only), a licensed SolidWorks 2021–2025 install, and Node.js 20+. npm install compiles the winax native module for your machine; known build failures on Windows 11 Build 26200+ with VS 2022 BuildTools 17.14+ are covered in TROUBLESHOOTING.md.
Who it fits: CAD-automation developers who can validate results and file issues — the maintainer explicitly asks for test reports against real SolidWorks, and the roadmap centers on a real-instance integration test suite. For unattended production automation, it is not there yet.
Tools & capabilities (18)
create_partCreate a new part document.
create_extrusionExtrude a sketch into a solid feature.
create_revolveCreate a revolve feature.
create_sweepCreate a sweep feature.
create_loftCreate a loft feature.
create_filletAdd a fillet to edges.
create_chamferAdd a chamfer to edges.
create_sketchOpen a sketch on a plane.
add_lineAdd a line to the active sketch.
add_circleAdd a circle to the active sketch.
add_rectangleAdd a rectangle to the active sketch.
create_drawing_from_modelCreate a drawing document from a model (untested).
export_fileExport to STEP, IGES, STL, PDF, DWG or DXF (untested).
batch_exportExport multiple files in one run (untested).
get_mass_propertiesQuery mass properties of a model (untested).
check_interferenceRun interference detection (untested).
generate_vba_scriptGenerate VBA automation scripts (generation works; execution path less tested).
macro_start_recordingStart recording a macro (untested).
What this server can do
SolidWorks MCP provides tools for these capabilities — tap one to see every MCP server that does the same:
When to use it
- Prototype parts by prompt: sketch, extrude, fillet without hand-driving the feature tree
- Generate VBA macros for sheet metal, configurations or equations to audit and run yourself
- Batch-export models to STEP/STL/PDF once you have validated the export tools in your setup
- Query mass properties or interference checks from chat during design review
Quick setup
- 1git clone https://github.com/vespo92/SolidworksMCP-TS.git && cd SolidworksMCP-TS
- 2npm install (compiles winax natively — required on each Windows machine) && npm run build
- 3Add the node dist/index.js config with SOLIDWORKS_PATH and ADAPTER_TYPE=winax-enhanced to claude_desktop_config.json
- 4Start SolidWorks, restart Claude Desktop, and try a basic sketch plus a simple extrusion first
- 5If COM registration fails, run: regsvr32 "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\sldworks.tlb"
Security notes
Alpha software driving a licensed CAD seat over COM — most tools are untested against live SolidWorks, so run it on copies of parts rather than production assemblies. Complex operations execute auto-generated VBA macros inside SolidWorks, which is effectively arbitrary code execution in that session; no credentials or network access are involved.
SolidWorks MCP FAQ
Is SolidWorks MCP production-ready?
No — the author labels it alpha/experimental. Basic sketching and simple extrusions are demonstrated; drawings, exports and analysis tools have only mock/unit tests, and there is no CI against a real SolidWorks instance yet. Treat it as a promising testbed and report results.
Why does it generate VBA macros instead of always calling the API?
Because Node.js COM bridges fail on SolidWorks methods with 13+ parameters (FeatureExtrusion3 takes 20+). The complexity analyzer sends small calls direct via winax and generates a VBA macro — executed by SolidWorks — for the big ones, falling back automatically when a call fails.
Can I run it without SolidWorks, or on macOS/Linux?
No. COM interop is Windows-only, and the server drives a licensed SolidWorks 2021–2025 installation. Unit tests can run anywhere with USE_MOCK_SOLIDWORKS=true, but real automation needs Windows plus the app.
Alternatives to SolidWorks MCP
Compare all alternatives →Control Blender from Claude and other LLMs for prompt-assisted 3D modeling, scene creation, and asset generation.
Popular community server that feeds Figma layout data to coding agents via a Figma API token.
Generate beautiful, modern UI components from natural-language descriptions inside your IDE.
Compare SolidWorks MCP with: