Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- **Colours** (queue item 36): `set_appearance` colours the whole part, one
feature, one body or the face at a point (`[r, g, b]` or `#rrggbb`, with
transparency), or with `reset` removes a level's own colour;
`get_appearance` reads the colour that shows and the level it comes from.
A face's colour shows over its feature's, a feature's over its body's, a
body's over the part's. Each colour is read back from SolidWorks, which
takes it as an array of doubles: a plain list was misread.
- **Reference and analysis extras** (queue item 39):
`create_coordinate_system` at a point, axes along the model's (its
transform read back); `create_center_of_mass_point`;
`create_bounding_box` with the stock size; `get_section_properties`, a
planar face's area, centroid and second moments of area. 171 tools in
all. Beta until the live demo; the live tests pass on SolidWorks 2026.
- **Multi-body tools** (queue item 35): `list_bodies` names a part's solid
bodies with each one's volume and bounding box; `combine_bodies` adds,
subtracts or keeps the common volume of bodies (a mould core: a block
Expand Down Expand Up @@ -91,6 +104,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

- **A Bandit alert on the body tools.** The body operation's reply-fields
callback was named `extra`, which Bandit's rule B610 reads as Django's
`QuerySet.extra` (an SQL risk). There is no SQL; the callback is now
`own_fields`.
- **Tools after `delete_feature` see the part again.** `list_features` (which
`delete_feature` runs) and `get_selected_entities` took over SolidWorks's
active document without flagging its methods, so the next tool read
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
[![SolidWorks](https://img.shields.io/badge/tested%20on-SolidWorks%202026-red)](https://www.solidworks.com/)
[![Coverage](https://codecov.io/gh/andrewbartels1/SolidworksMCP-python/branch/main/graph/badge.svg)](https://codecov.io/gh/andrewbartels1/SolidworksMCP-python)

Python MCP server for SolidWorks automation with 165 tools, plus an optional agent/prompt-testing layer for AI-assisted workflows.
Python MCP server for SolidWorks automation with 171 tools, plus an optional agent/prompt-testing layer for AI-assisted workflows.

[![115 MCP tools by support level (the 8 deprecated ones not counted), and how much of the core SolidWorks COM API they reach](docs/assets/progress/progress.svg)](https://andrewbartels1.com/SolidworksMCP-python/progress/)

Expand Down Expand Up @@ -367,7 +367,7 @@ It works only with the circuit-breaker adapter wrapper (the default for real Sol

### A shorter tool list

All 165 tools cost about 69,000 tokens a turn. `SOLIDWORKS_MCP_TOOL_MODE=search` lists four instead (about 900 tokens); `SOLIDWORKS_MCP_TOOLSETS=core,drawing` lists only those groups. See [Choose which tools a client sees](https://andrewbartels1.com/SolidworksMCP-python/getting-started/installation/#4-choose-which-tools-a-client-sees).
All 171 tools cost about 72,000 tokens a turn. `SOLIDWORKS_MCP_TOOL_MODE=search` lists four instead (about 900 tokens); `SOLIDWORKS_MCP_TOOLSETS=core,drawing` lists only those groups. See [Choose which tools a client sees](https://andrewbartels1.com/SolidworksMCP-python/getting-started/installation/#4-choose-which-tools-a-client-sees).

## Teach your agent the workflow

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
81 changes: 71 additions & 10 deletions docs/assets/progress/progress.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"tools": {
"total": 165,
"total": 171,
"by_level": {
"stable": 149,
"beta": 8,
"beta": 14,
"experimental": 0,
"planned": 0,
"deprecated": 8
Expand Down Expand Up @@ -272,7 +272,7 @@
"name": "combine_bodies",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "Combine bodies of the active part: add them, subtract tool bodies from a main body, or keep their common volume."
},
{
Expand Down Expand Up @@ -310,13 +310,34 @@
"reason": "",
"summary": "Start a sheet-metal part: a base flange from a sketch, with its thickness, bend radius and K-factor."
},
{
"name": "create_bounding_box",
"family": "reference_extras",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Add SolidWorks's Bounding Box feature around the active part's bodies and give the stock size."
},
{
"name": "create_center_of_mass_point",
"family": "reference_extras",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Add SolidWorks's Center of Mass point to the active part, at its centre of mass."
},
{
"name": "create_configuration",
"family": "file_management",
"level": "stable",
"reason": "",
"summary": "Add a configuration to the active part or assembly, e.g. a long and a short version of one part."
},
{
"name": "create_coordinate_system",
"family": "reference_extras",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Add a coordinate system with its origin at a point, axes along the model's."
},
{
"name": "create_cut_extrude",
"family": "modeling",
Expand Down Expand Up @@ -468,7 +489,7 @@
"name": "delete_bodies",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "Delete bodies from the active part, or with keep=true keep only the named ones."
},
{
Expand Down Expand Up @@ -660,6 +681,13 @@
"reason": "",
"summary": "Look up a SolidWorks API enum's members and their integer values."
},
{
"name": "get_appearance",
"family": "appearance",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Read the colour the active part, a feature, a body or the face at a point shows, and where it comes from."
},
{
"name": "get_custom_properties",
"family": "engineering_data",
Expand Down Expand Up @@ -702,6 +730,13 @@
"reason": "",
"summary": "Report the active document's title, path, type, configuration, unsaved changes, feature count, rebuild status and file details."
},
{
"name": "get_section_properties",
"family": "reference_extras",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Read the area, centroid and second moments of area of a planar face, picked by a point on it."
},
{
"name": "get_selected_entities",
"family": "file_management",
Expand Down Expand Up @@ -741,7 +776,7 @@
"name": "list_bodies",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "List the active part's solid bodies by name, with each one's volume and bounding box."
},
{
Expand Down Expand Up @@ -853,7 +888,7 @@
"name": "move_copy_body",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "Move bodies of the active part by a translation and a rotation, or copy them up to 50 times."
},
{
Expand Down Expand Up @@ -965,7 +1000,7 @@
"name": "scale_body",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "Scale bodies of the active part, uniformly or per axis, about their centroid or the origin."
},
{
Expand All @@ -989,6 +1024,13 @@
"reason": "",
"summary": "Select a feature, sketch, plane or component by name in the active document."
},
{
"name": "set_appearance",
"family": "appearance",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"summary": "Colour the active part, one feature, one body or the face at a point, or remove a colour."
},
{
"name": "set_component_state",
"family": "modeling",
Expand Down Expand Up @@ -1126,7 +1168,7 @@
"name": "split_body",
"family": "bodies",
"level": "beta",
"reason": "new: checked on SolidWorks by a scratch run, not yet by a live demo.",
"reason": "new: passed its live demo (boolean logic on a cube and a sphere), not yet in wide use.",
"summary": "Split the active part's bodies with a plane or a sketch, keeping every piece in the part."
},
{
Expand Down Expand Up @@ -1169,11 +1211,11 @@
"com": {
"type_library": "83A33D31-27C5-11CE-BFD4-00400513BB57x0x34x0",
"core": {
"covered": 295,
"covered": 314,
"total": 2838
},
"api": {
"covered": 338,
"covered": 350,
"total": 5985
},
"interfaces": [
Expand Down Expand Up @@ -1261,7 +1303,9 @@
"GetUserPreferenceStringValue",
"GetUserPreferenceToggle",
"GraphicsRedraw2",
"Insert3DSketch",
"InsertAxis2",
"InsertCoordinateSystem",
"InsertDatumTag2",
"InsertFeatureShell",
"InsertGtol",
Expand Down Expand Up @@ -1310,13 +1354,16 @@
"CustomPropertyManager",
"DeleteSelection2",
"GetAnnotations",
"GetCoordinateSystemTransformByName",
"GetMassProperties",
"GetSectionProperties2",
"GetUserPreferenceInteger",
"GetUserPreferenceToggle",
"GetWhatsWrong",
"GetWhatsWrongCount",
"InsertBomTable4",
"IsExploded",
"RemoveMaterialProperty",
"SaveAs",
"SaveAs2",
"SaveAs3",
Expand Down Expand Up @@ -1416,11 +1463,14 @@
"GetFeatureCount",
"GetFlatPatternFolder",
"HoleWizard5",
"InsertCenterOfMass",
"InsertCombineFeature",
"InsertCoordinateSystem",
"InsertCosmeticThread3",
"InsertCutSwept5",
"InsertDeleteBody2",
"InsertFeatureChamfer",
"InsertGlobalBoundingBox",
"InsertMirrorFeature",
"InsertMoveCopyBody2",
"InsertMultiFaceDraft",
Expand Down Expand Up @@ -1457,6 +1507,7 @@
"CreateSketchSlot",
"CreateSpline2",
"CreateTangentArc",
"Insert3DSketch",
"InsertSketch",
"SketchExtend",
"SketchOffset2",
Expand All @@ -1483,11 +1534,13 @@
"FeatureByName",
"FirstFeature",
"GetBodies2",
"GetBody",
"GetBox",
"GetChildren",
"GetConfigurationNames",
"GetConstrainedStatus",
"GetID",
"GetMaterialPropertyValues2",
"GetModelDoc2",
"GetPathName",
"GetSuppression2",
Expand All @@ -1496,16 +1549,20 @@
"IsEnvelope",
"IsFixed",
"IsSuppressed",
"RemoveMaterialProperty",
"RemoveMaterialProperty2",
"Select",
"Select2",
"Select4",
"SetMaterialPropertyValues2",
"SetSuppression2"
],
"total": 147
},
{
"name": "IFeature",
"covered": [
"GetBody",
"GetBox",
"GetChildren",
"GetDefinition",
Expand All @@ -1514,6 +1571,7 @@
"GetFirstDisplayDimension",
"GetFirstSubFeature",
"GetID",
"GetMaterialPropertyValues2",
"GetNameForSelection",
"GetNextDisplayDimension",
"GetNextFeature",
Expand All @@ -1525,8 +1583,11 @@
"IsSuppressed2",
"ModifyDefinition",
"Parameter",
"RemoveMaterialProperty",
"RemoveMaterialProperty2",
"Select",
"Select2",
"SetMaterialPropertyValues2",
"SetSuppression2"
],
"total": 115
Expand Down
30 changes: 15 additions & 15 deletions docs/assets/progress/progress.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Loading