solidworks-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
solidworks-mcp
MCP server that connects Claude Desktop to SolidWorks via COM API, enabling automated analysis of sheet metal parts for the tooling and stamping industry.
What it does
A tooling engineer can open Claude Desktop and say:
"Open
bracket.step, tell me the thickness, all hole diameters, number of bends, and export the flat pattern as a DXF."
Claude calls the MCP tools to:
Open the STEP in SolidWorks
Detect sheet metal, read thickness + K-factor
Enumerate and group all holes by diameter
Count and characterise each bend (angle, radius, length)
Flatten the part and export the flat pattern as DXF
Return a structured analysis report
Time saved: 60–90 minutes of manual inspection → ~60 seconds.
Related MCP server: solidworks-mcp-python
Try it without SolidWorks
Most of this project needs a licensed SolidWorks install, but
analyze_step_standalone runs anywhere CadQuery does. Against the test
fixture in this repo:
pip install -e .
conda install -c cadquery cadquery # see docs/INSTALL.md for the pip route
python -c "
from mcp.server.fastmcp import FastMCP
from solidworks_mcp.solidworks_bridge import SolidWorksBridge
from solidworks_mcp.tools.analysis import register
import json
mcp = FastMCP('demo'); register(mcp, SolidWorksBridge())
fn = mcp._tool_manager._tools['analyze_step_standalone'].fn
print(json.dumps(fn(file_path='tests/fixtures/sample_part.step'), indent=2))
"Actual output for sample_part.step — a 100 x 60 x 2 mm plate with four
Ø6 mm through holes (abridged; the full result also carries file_path,
the individual bounding-box bounds, and a units note):
{
"file_size_kb": 33.48,
"volume_mm3": 11773.81,
"surface_area_mm2": 12564.6,
"bounding_box": {
"dimensions_mm": [100.0, 60.0, 2.0]
},
"center_of_mass_mm": { "x": 0.0, "y": 0.0, "z": 1.0 },
"face_count": 10,
"face_types": { "PLANE": 6, "CYLINDER": 4 },
"estimated_thickness_mm": 2.0,
"is_likely_sheet_metal": true
}The four holes show up as the four cylindrical faces, and thickness is inferred from the smallest bounding-box dimension.
Prerequisites
Requirement | Version |
Windows | 10 or 11 (64-bit) |
Python | 3.10, 3.11 or 3.12 |
SolidWorks | Standard 2022 or newer (must be installed and licensed) |
Claude Desktop | latest |
SolidWorks must be installed and activated on the same machine as this server. The COM API requires the full application — SolidWorks PDM or Viewer are not sufficient.
Quick Install
REM 1. Clone the repository
git clone https://github.com/tmkaio/solidworks-mcp.git
cd solidworks-mcp
REM 2. Create a virtual environment
python -m venv .venv
.venv\Scripts\activate
REM 3. Install the package
pip install -e .
REM 4. (Optional) Install CadQuery for standalone STEP analysis
conda install -c cadquery cadqueryConfigure Claude Desktop
Copy claude_desktop_config.example.json and merge into your Claude config:
Location: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"solidworks": {
"command": "C:\\path\\to\\solidworks-mcp\\.venv\\Scripts\\python.exe",
"args": ["-m", "solidworks_mcp.server"],
"env": {
"PYTHONPATH": "C:\\path\\to\\solidworks-mcp\\src",
"LOG_LEVEL": "INFO"
}
}
}
}Restart Claude Desktop. A hammer icon (🔨) should appear in the chat toolbar.
See docs/INSTALL.md for a step-by-step guide.
Example conversation
You: Open C:\parts\door_hinge.step and give me a full analysis.
Claude: [calls open_file, get_part_info, analyze_holes, analyze_bends]
The door hinge is a sheet metal part:
- Thickness: 2.00 mm (K-factor: 0.44)
- Bounding box: 120 x 80 x 45 mm
- Mass: 312 g
- 12 holes: Ø6mm x 4, Ø8mm x 4, Ø12mm x 4
- 3 bends: 90° x R2mm (two) and 45° x R3mm (one)
- Complexity: medium
You: Export the flat pattern as DXF to C:\output\hinge_flat.dxf
Claude: [calls flatten_part, export_dxf, unflatten_part]
Flat pattern exported: C:\output\hinge_flat.dxf (18.4 KB)
Flat dimensions: 310 x 80 mmAvailable tools
Connection
Tool | Description |
| Connect to SolidWorks (start if not running) |
| Check connection state and active document |
| Release COM references |
Files
Tool | Description |
| Open STEP, SLDPRT, IGES, etc. |
| Close active document |
| Save / Save As |
| List all open files |
Analysis
Tool | Description |
| Mass, volume, material, sheet metal flag |
| L x W x H + diagonal |
| Feature histogram |
| All holes grouped by diameter |
| All bends with angle/radius/length |
| Executive summary + complexity rating |
| Full JSON + Markdown report |
| No SolidWorks needed — uses CadQuery |
| Ixx/Iyy/Izz + products of inertia |
| Face type breakdown (planar/cylindrical/etc.) |
Sheet Metal
Tool | Description |
| True/False check |
| Thickness, K-factor, bend radius |
| Convert imported solid to sheet metal |
| Activate flat pattern |
| Return to folded state |
Export
Tool | Description |
| Flat pattern -> DXF (for laser / NC) |
| Part -> STEP AP214 |
| Part -> STL |
| Document -> PDF |
| Viewport -> PNG |
Custom Properties & Materials
Tool | Description |
| Read all custom properties from active document |
| Read a single named property |
| Create or update a custom property |
| Remove a custom property |
| Assign a material from the SolidWorks library |
| List available .sldmat material databases |
Configurations
Tool | Description |
| List all configurations with active flag |
| Details of the current active configuration |
| Activate a different configuration |
| Create a new configuration (copy of existing) |
| Remove a configuration |
| Config-specific custom properties |
Measurements
Tool | Description |
| Distance between two named entities |
| Length/area/coordinates of a single entity |
| Area, normal, centroid of a face by index |
| Minimum clearance between two entities |
| Cross-section Ixx/Iyy/area/centroid |
Feature Management
Tool | Description |
| List FeatureManager tree (with type filter) |
| Type, suppression state, error for a feature |
| Suppress a feature in a configuration |
| Restore a suppressed feature |
| Parametric dimensions on a feature |
| Force rebuild (standard or full) |
| Describe a feature rebuild error |
Drawings
Tool | Description |
| Create new drawing from active part/assembly |
| Add standard/isometric view to drawing |
| List all views on the drawing |
| Sheet count, scale, paper size |
| Change drawing sheet scale |
Assemblies
Tool | Description |
| List all components (top-level or recursive) |
| Quick component count |
| Bill of Materials with quantities |
| List all mate constraints |
| Mass, path, bbox for a named component |
| Total assembly mass and centre of mass |
Modeling (build geometry)
Tool | Description |
| New empty part from the default part template |
| Open a sketch on the Front / Top / Right plane |
| Line, mm in the sketch frame |
| Corner rectangle |
| Circle by centre and diameter |
| Closed polyline — blank outlines, notch punches, carriers |
| Close the sketch and return its name |
| Boss-extrude a sketch (blind or mid-plane) |
| Cut a sketch — through all (both sides) or blind |
| Label a feature, e.g. |
| Remove a feature to redo a modeling step |
Sketch entities are created with snapping and automatic relations turned off, so geometry lands exactly at the coordinates given. Planes are picked by position, not name, so localized installs work too.
These are the "hands" for letting Claude design — e.g. lay out a progressive-die strip station by station, reasoning like an engineer — instead of only inspecting existing models.
Limitations
Assembly support is read-only. Components, BOM, mates and mass can be read; creating mates or inserting components is not supported.
Modeling covers flat prismatic work (sketch, extrude, cut). Sheet-metal forming features (base flange, sketched bend) are not exposed yet, and sketch dimensions cannot be driven parametrically after creation.
STEP files import as "dumb" solids.
convert_to_sheet_metalmust run before bend analysis will return anything.No strip-layout logic in the server itself — the modeling tools draw what an agent decides; the design reasoning lives in the agent.
Windows only, and requires a licensed local SolidWorks install — the COM API needs the full application. The one exception is
analyze_step_standalone, which runs anywhere via CadQuery.
Roadmap
Version | Feature |
v0.2 | ✅ Modeling tools — sketch, extrude, cut, delete |
v0.3 | Sheet-metal forming features (base flange, sketched bend) for formed strip stations |
v0.4 | Force calculations (cut, bend, draw) |
Beyond that: formability and undercut detection, GD&T annotation on generated drawings, and nesting integration are all plausible directions, but nothing is committed.
Development
The test suite mocks the COM layer, so no SolidWorks licence is required to run it:
pip install -e ".[dev]"
ruff check src tests
pytest -vOn Windows that is the whole story: all 54 tests run. CI runs the same two
commands on Linux, installing the pure-Python dependencies directly rather
than via pip install -e ., because pywin32 has no Linux wheel.
Two groups skip themselves rather than fail when a dependency is absent:
the
connect()/disconnect()tests patchpythoncomandwin32com.clientby name, so they need pywin32 and run on Windows only;analyze_step_standaloneneeds CadQuery.
Everything else — the COM call contract, hole and bend extraction, unit conversion, feature traversal — runs everywhere.
Logs
Server logs: %USERPROFILE%\.solidworks-mcp\logs\server.log
Claude Desktop logs: %APPDATA%\Claude\logs\
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Phasio is the operating platform contract manufacturers run on: quoting, production, and back office across additive, CNC, molding, and every process in between. This connector gives LLMs like Claude, ChatGPT and Grok access to your Phasio workspace, so you can interact naturally with your manufacturing data. Commercial - Which customers drive the most revenue? How storefront self-service orders compare against quotes your team builds by hand? Where do carts convert and where they stall? Parts - Inspect any parts volume, bounding box, minimum wall thickness and watertightness, with rendered orthogonal views. Find near-duplicates of a part you've already made before you quote it again. Pricing - Run quotes against parts using your LLM. Ask the model to explain why a part got a certain price, and to tune and refine your pricing equations. Production - Where a job's parts sit on the routing right now? What's been scrapped and why, and which other jobs were caught by the same failed build? Setup - Easily configure pricing equations, shop floor routing and your QMS agentically.
Create contacts, move deals, send proposals and invoices, read your inbox, from Claude or ChatGPT.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to create and manipulate SolidWorks CAD models through natural language commands, automating part creation, sketching, and extrusion.10-
- AlicenseBqualityBmaintenanceEnables Claude or any MCP client to drive a live SOLIDWORKS session through its COM API, modeling parts, building assemblies with mates, checking interferences and machining feasibility, and exporting STEP or DXF files. It also exposes a local semantic index of the SOLIDWORKS API so the model can look up signatures, enums, and official examples before running arbitrary Python against the session.221MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents such as Claude to drive SolidWorks through its COM API using natural language, creating parts and assemblies, sketching geometry, and adding features without clicking menus. Also supports running arbitrary API scripts and verifying results through model reports, rendered views, interference checks, and exports.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to control SolidWorks through natural language, supporting part and assembly creation, sketches, advanced features, dimension editing, selection inspection, screenshots, and rebuilds.MIT