# SolidworksMCP-python [Health: Active]

**Category:** 📐 Architecture & Design  
**Repository:** https://github.com/andrewbartels1/SolidworksMCP-python  
**GitHub Stars:** 102  
**Views:** 6  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/solidworksmcp-python

## Description
Python MCP server for SolidWorks: lets Claude and other AI agents build parts, assemblies and drawings through the SolidWorks COM API (pywin32).

## Tools
Capabilities this server exposes over MCP:

- **open_model** — Open a SolidWorks model (part, assembly, or drawing).

Opens an existing SolidWorks file and makes it the active document for further
operations. Supports all standard SolidWorks file formats and provides detailed model
information upon successful opening.
- **create_part** — Create a new SolidWorks part document.

Creates a new SolidWorks part document from ``template`` (a .prtdot path) or,
without one, the default part template. The new part becomes the active document
and is ready for modeling operations such as sketch creation and feature addition.
- **create_assembly** — Create a new SolidWorks assembly document.

Creates a new SolidWorks assembly document from ``template`` (a .asmdot path) or,
without one, the default assembly template. The new assembly becomes the active
document and is ready for component insertion, mating, and assembly-level operations.
- **create_drawing** — Create a new SolidWorks drawing document.

This tool creates a new drawing document from ``template`` (a .drwdot path) or,
without one, the default drawing template. The new drawing will become the active
document.
- **close_model** — Close the current SolidWorks model.

Closes the currently active SolidWorks document with an option to save changes before
closing. This is essential for proper model lifecycle management and preventing data
loss.
- **create_extrusion** — Create an extrusion feature from the active sketch.

Creates a 3D extrusion feature (boss or cut) from the currently active 2D sketch.
Supports advanced options like draft angles, thin features, bidirectional extrusion, and
various end conditions for professional modeling workflows.
- **create_revolve** — Create a revolve feature from the active sketch.

Creates a 3D revolve feature by rotating the active 2D sketch profile around a specified
axis of revolution. Supports full and partial revolves, thin features, and bidirectional
revolution for comprehensive rotational modeling.
- **get_dimension** — Get the value of a dimension from the current model.

Retrieves the current value of a named dimension from the active SolidWorks model.
Dimensions can be from sketches, features, or global dimensions. Useful for parametric
modeling and design validation.
- **set_dimension** — Set the value of a dimension in the current model.

This tool modifies the value of a named dimension and rebuilds the model. Use this to
parametrically modify your model dimensions.
- **set_units** — Set the active document's linear unit system.

Accepts ``mm``, ``cm``, ``m``, ``in`` or ``ft`` (plus common aliases
such as ``inch`` or ``millimeters``). The setting is applied and then
read back from the document; if the readback disagrees the tool
reports an error rather than a false success.
- **create_cut_extrude** — Cut material from a sketch profile in the active model.

Creates a Cut-Extrude feature (Insert > Cut > Extrude). Use this after
exit_sketch when you want to remove material — e.g. to create windows,
holes, slots, or any through/blind cut in an existing solid body.

Sketch selection is never a silent guess: pass ``sketch_name``
explicitly whenever you're not certain which sketch this should act
on (e.g. more than one sketch could be unconsumed, or other tool
calls ran in between). If omitted, only the sketch most recently
created/exited in this same session is used, and only when it still
exists in the model — there is no further fallback. Any ambiguity or
mismatch is reported back as an error naming the sketch(es) actually
found in the model, rather than cutting the wrong profile.

Direction: a one-way cut (Blind or ThroughAll) goes along the sketch
plane's normal. From a sketch on a face, or on a plane that touches
the body only on one side (e.g. a Top Plane sketch under a block
extruded up from it), that can point away from the material. The
tool then cuts the other way and returns
``cut_extrude.direction_flipped: true``, so you don't need to guess
``reverse_direction``. For a sketch on a plane through the middle of
the body, use ``ThroughAllBoth`` (or ``ThroughAll`` with
``both_directions``) to cut both sides.
- **add_fillet** — Add a fillet (rounded edge) to selected edges of the current model.

Rounds the specified named edges with the given radius. Edge names use the
SolidWorks convention, e.g. 'Edge<1>', or you can leave edge_names empty to
fillet all edges if the adapter supports it.
- **add_chamfer** — Add an equal-distance chamfer to selected edges of the current model.

Chamfers the specified named edges with the given distance. Edge names use
the SolidWorks convention, e.g. 'Edge<1>', or you can leave edge_names empty
to chamfer all edges if the adapter supports it.
- **create_sweep** — Sweep the active profile sketch along a named path sketch.

Creates a swept boss/protrusion (Insert > Boss/Base > Sweep). Requires
two sketches in the active part: a closed profile sketch and an open
path sketch named by ``path``. The profile is inferred as the sketch
that is not the path (in the usual "draw profile, draw path, sweep"
flow this is unambiguous). Optionally applies a constant twist along
the path.
- **create_loft** — Loft a solid between two or more profile sketches.

Creates a lofted boss/protrusion (Insert > Boss/Base > Loft) blending
the listed profile sketches in order. Each profile must be a closed
contour. Optional guide curves shape the transition between profiles.
- **insert_component** — Insert a part or sub-assembly into the active assembly.

Call ``create_assembly`` first. Position is in millimetres from the
assembly origin.

**The component file must contain solid geometry** — SolidWorks
silently refuses to insert an empty part, so a missing or empty
component surfaces as an error rather than a fabricated success.
- **add_mate** — Mate two components in the active assembly.

Positions components relative to one another — coincident planes to
stack or align them, concentric to line up axes, distance to hold a
gap.

Entities are selected by feature name, so only each component's
reference planes and axes can be mated. Mating to a specific face or
edge needs entity names this adapter cannot enumerate.
- **list_components** — List the top-level components of the active assembly.
- **delete_feature** — Delete a feature or sketch from the active model.

Deleting a parent feature also removes everything that depends on it —
SolidWorks' normal cascade — so the response lists every feature that
went, not just the one named.
- **suppress_feature** — Suppress or unsuppress a feature in the active model.

Suppressing rolls a feature and its children out of the model without
deleting it — the reversible way to turn off a feature that is causing
trouble.
- **rename_feature** — Rename a feature on the feature tree.

SolidWorks silently refuses a rename onto a name another feature
already uses, so the new name is read back and a mismatch is reported
as an error rather than a quiet success. Renaming a feature to its
current name is a no-op success.
- **select_feature** — Select a named feature, sketch, plane or component.

Replaces the current selection by default; pass ``append: true`` to
add to it (e.g. to select several features in turn). A name that
cannot be selected is an error, never a quiet success.
- **select_face_edges** — Select every edge of one face of the active part (multi-select).

Identify the face with exactly one of ``point`` (a point on it, mm),
``side`` (``top``/``bottom``/``front``/``back``/``right``/``left`` or
``+X``..``-Z``; top=+Y, front=+Z, right=+X as in SolidWorks' default
views - the furthest flat face facing that way) or ``plane`` (a
reference plane name - the body face lying on it). ``edge_type``
narrows to ``linear`` or ``circular`` edges (e.g. hole rims).

The edges become the live SolidWorks selection, so the next
``add_chamfer`` / ``add_fillet`` call with an empty ``edge_names``
acts on exactly them. Anything that changes the selection in between
(including the user clicking in SolidWorks) changes what is used.
- **rebuild_model** — Force a rebuild of the active model and report what is wrong.

Use after programmatic edits (``set_dimension``, feature edits) to
confirm the model rebuilds cleanly. When features fail, the response
is an error whose ``data.errors`` names each failing feature with its
SolidWorks error code, the features/sketches it depends on, and a
concrete ``hint`` for fixing it. Warnings alone still succeed.
- **undo** — Undo the last operations in the active model.

SolidWorks accepts an undo with nothing left to undo without
complaining, so the response reports whether the feature tree actually
changed rather than assuming it did.
- **create_reference_plane** — Create a reference plane offset from an existing plane or planar face.

Adds a new plane to the feature tree, parallel to and offset from the
named reference. The returned plane name can be passed straight to
``create_sketch`` to sketch anywhere other than the six built-in
planes.

Angled planes are not supported by this tool: an angled plane needs a
second reference (an axis or edge) to rotate about, which this
signature cannot take. Use ``offset`` for parallel planes. An
``offset`` of zero is rejected — a plane coincident with its
reference is not useful.
- **create_axis** — Create a reference axis along a principal direction.

Builds an axis from the intersection of two built-in planes: x from
Top + Front, y from Front + Right, z from Top + Right.
- **create_reference_point** — Create a reference point on the active part.

Two modes:

- ``along_curve`` — a point on the edge under ``(x, y, z)`` mm, placed
  ``distance`` mm from the edge start, or at ``percent`` (0–100) of
  its length. Give exactly one of ``distance`` / ``percent``.
- ``face_center`` — a point at the centroid of the face under
  ``(x, y, z)`` mm.

The coordinate must lie on the target edge/face; SolidWorks resolves
it with a coordinate pick. ``InsertReferencePoint`` always returns a
feature, so success is confirmed by the feature tree growing.
- **mirror_feature** — Mirror solid bodies or features about a plane.

Selects the named sources and the mirror plane, then mirrors them.
The mirror is verified by comparing model volume before and after:
SolidWorks can report a feature even when it mirrored nothing, so a
volume that did not grow is reported as an error rather than a
false success.
- **pattern_circular** — Pattern features around an axis.

Selects the named axis and features, then creates a circular
pattern. The pattern is verified by comparing model volume before
and after: SolidWorks can report a feature even when it patterned
nothing, so a volume that did not grow is reported as an error
rather than a false success.
- **create_sketch** — Create a new sketch on the specified plane.

Creates a new sketch on a reference plane and enters sketch edit mode. This is the first
step for creating any 2D geometry that will be used for 3D features like extrusions,
revolves, or sweeps.
- **add_line** — Add a line to the current sketch.

Adds a line segment between two points in the active sketch. Lines are fundamental
sketch entities used for creating profiles, construction geometry, and complex shapes.
- **add_circle** — Add a circle to the current sketch.
- **add_rectangle** — Add a rectangle to the current sketch.

Creates a rectangular profile defined by two opposite corner points, automatically
generating four connected line segments forming a closed rectangle suitable for
extrusion or other 3D operations.
- **exit_sketch** — Exit sketch editing mode.

Exits the current sketch editing mode and returns to the 3D modeling environment. This
is required after completing sketch geometry before creating 3D features like
extrusions, revolves, or sweeps.
- **check_sketch_fully_defined** — Check whether a sketch is fully defined.
- **add_arc** — Add an arc to the current sketch.

Creates a circular arc defined by center point, start point, and end point. Arcs are
essential for creating rounded corners, curved transitions, and complex curved profiles
in mechanical designs.
- **add_spline** — Add a spline curve to the current sketch.

Creates a smooth, free-form spline curve that passes through or near the specified
control points. Splines are ideal for creating organic shapes, complex profiles, and
smooth transitions in industrial design.
- **add_centerline** — Add a centerline to the current sketch.

Creates a construction/reference line that serves as a centerline for symmetrical
features, revolution axes, or construction geometry. Centerlines are non-geometric
entities used for reference only.
- **add_polygon** — Add a regular polygon to the current sketch.

Creates a regular polygon with specified number of sides, center point, and
circumscribed radius. Polygons are useful for creating hexagonal nuts, octagonal
features, and other multi-sided geometric shapes.
- **add_ellipse** — Add an ellipse to the current sketch.

Creates an elliptical entity with specified center and major/minor axes. Ellipses are
useful for creating oval holes, ergonomic profiles, and complex curved features in
mechanical and industrial design.
- **add_sketch_constraint** — Add a geometric constraint/relation between sketch entities.

Creates geometric relationships between sketch entities such as parallel, perpendicular,
tangent, coincident, etc. Essential for creating fully defined, parametric sketches that
maintain design intent.
- **add_sketch_dimension** — Add a dimension to sketch entities.

Creates dimensional constraints that control the size of sketch entities. Dimensions are
essential for creating precise, parametric designs that can be easily modified and
maintain manufacturing tolerances.

In live SolidWorks automation, sketch dimensions can otherwise trigger the interactive
``Modify`` approval dialog. The adapter suppresses the relevant sketch-input preferences
for the automation session and uses the dedicated radial/diameter APIs for circles and
arcs so this tool remains non-interactive.
- **sketch_linear_pattern** — Create a linear pattern of sketch entities.

Generates a linear array of selected sketch entities in specified direction(s) with
defined spacing and count. Essential for creating hole patterns, vent grilles, and
repetitive geometric features.
- **sketch_circular_pattern** — Create a circular pattern of sketch entities around the sketch origin.

Generates a circular array of selected sketch entities. The
rotation axis is always the **sketch origin** — SOLIDWORKS'
``CreateCircularSketchStepAndRepeat`` does not expose a
pattern-centre parameter. Position the seed entity at the
desired radius from the origin; the pattern derives its radius
from the seed's centre.

Essential for creating bolt circles, gear teeth, and other
radially symmetric features around the sketch origin.
- **sketch_mirror** — Mirror sketch entities about a centerline.

Creates mirrored copies of selected sketch entities about a reference centerline,
maintaining symmetrical design relationships. Essential for creating symmetric parts and
reducing modeling time.
- **sketch_offset** — Create an offset of sketch entities.

Generates offset copies of selected sketch entities at a specified distance, maintaining
the original entity shape while creating parallel geometry. Essential for wall
thickness, machining allowances, and clearance features.
- **sketch_tutorial_simple_hole** — Tutorial: Create a simple circular hole sketch.

Demonstrates complete workflow for creating a basic hole sketch that can be used for
through-holes, counterbores, or other circular features. This tutorial shows the
fundamental sketch-to-feature process.
- **tutorial_simple_hole** — Create a simple hole as a guided tutorial workflow.

Builds a sketch circle on the selected plane, exits the sketch, and creates a cut
feature using the supplied diameter and depth. Useful as an end-to-end example of a
basic subtractive feature.
- **create_drawing_view** — Create a drawing view of a SolidWorks model.

Creates technical drawing views including orthographic projections, isometric views,
section views, and detail views from 3D models. Essential for generating production
drawings and technical documentation.
- **add_dimension** — Add a dimension to the current drawing.

Creates dimensional annotations on drawing views including linear, radial, angular, and
diameter dimensions. Essential for manufacturing specifications and quality control
documentation.
- **add_note** — Add a note or annotation to the current drawing.

Creates text annotations, callouts, and notes on drawings for specifications,
instructions, and additional manufacturing information. Essential for comprehensive
technical documentation.
- **create_section_view** — Create a section view of the current drawing.

Generates section views that show internal features by cutting through the part along a
specified section line. Essential for revealing hidden geometry, internal structures,
and complex assemblies.
- **create_detail_view** — Create a detail view of a specific area.

Generates magnified detail views of specific regions to show fine features, tight
tolerances, and intricate geometry that requires enhanced visibility for manufacturing
and inspection.
- **update_sheet_format** — Update the sheet format and title block information.

Applies drawing templates and updates title block fields with project information,
revision data, and drawing metadata. Essential for standardized documentation and
drawing control.
- **auto_dimension_view** — Automatically dimension a drawing view.

Analyzes drawing view geometry and automatically adds common dimensions including
overall sizes, hole diameters, radii, and critical features. Accelerates drawing
completion and ensures comprehensive dimensioning coverage.
- **check_drawing_standards** — Check the current drawing against drafting standards.

Validates drawing compliance with industry drafting standards including ANSI Y14.5, ISO
128, and DIN standards. Identifies non-compliance issues and provides recommendations
for improvement.
- **create_technical_drawing** — Create a technical drawing from a SolidWorks part or assembly.

Supports selecting a template, output path, sheet format, scale, and optional auto-
population of standard views for documentation.
- **add_drawing_view** — Add, update, or remove a drawing view in an existing drawing.

Supports configuring the target drawing, view type, parent view, scale, and placement
coordinates for common drawing view workflows.
- **add_annotation** — Add an annotation such as a note, balloon, or surface symbol.

Places annotation text in a drawing with optional font size, leader attachment, and
title-block style metadata fields.
- **update_title_block** — Update title block fields for the active drawing.

Applies drawing metadata such as title, drawing number, and approval fields to keep
documentation aligned with standards.
- **list_drawing_views** — List the views on the active drawing.

Read-only. Use it to find an existing view's name before targeting it
(e.g. with ``auto_center_marks``). Errors when the active document is
not a drawing.
- **auto_center_marks** — Auto-insert centre marks on circular features in a drawing view.

Runs SolidWorks' automatic centre-mark insertion for the named view.
The API does not report how many marks it added, so the response
gives the view's centre-mark count before and after and the delta.
A run that added nothing is still a success — the view may have no
un-marked holes.
- **analyze_drawing_comprehensive** — Handle analyze drawing comprehensive.
- **analyze_drawing_dimensions** — Analyze dimensions in a SolidWorks drawing for consistency and completeness.

This tool performs detailed dimensional analysis including precision, tolerances, and
completeness checking.
- **analyze_drawing_annotations** — Analyze drawing annotations and notes quality.
- **check_drawing_compliance** — Check drawing compliance with company standards.
- **analyze_drawing_views** — Analyze drawing views arrangement and quality.
- **generate_drawing_report** — Generate comprehensive drawing analysis report.
- **compare_drawing_versions** — Compare different versions of drawing files.
- **validate_drawing_completeness** — Validate drawing completeness for production readiness.
- **insert_model_dimensions** — Bring the model's dimensions into the active drawing's views.

Imports the model's "marked for drawing" dimensions view by view, each
dimension shown once on the sheet (a repeat in a later view is
deleted). Pictorial views (isometric, dimetric, trimetric) are skipped
unless named. Falls back to SolidWorks AutoDimension only when nothing
could be imported. SolidWorks places imported dimensions inside the
views, so run ``arrange_dimensions`` afterwards.
- **arrange_dimensions** — Move drawing dimensions so nothing overlaps, then check the real result.

Dimensions go outside their views in rows (first 8 mm from the
outline, rows 7 mm apart, columns 9 mm apart), shortest span nearest
the view, each on the side its extension lines start from. One with no
room on that side stays put and is listed in ``unplaced``. After moving
them it re-reads every dimension's real text box and lines and checks
the whole sheet: no text on text, no line through text, no line across
another view or across its own view, nothing on a view or outside the
sheet.
- **insert_bom_table** — Insert a bill-of-materials table for an assembly view on the active drawing.
- **add_gtol** — Add a GD&T feature control frame, e.g. position Ø0.2 (M) to A|B|C.
- **add_datum_tag** — Add a datum feature symbol (A, B, C, ...) on a drawing edge.
- **set_sheet_scale** — Set the active drawing sheet's scale; views using the sheet scale follow.
- **generate_drawing_package** — Create a complete A3 drawing of a part or assembly in one call.

A3 ISO frame with a filled title block (title, drawing number, material,
weight, drawn by/date, revision); front, plan, side and isometric views
in cells sized to fill the sheet at one standard scale (never stepped
down); model dimensions shown once and laid out in rows; bold view-name
captions; a NOTES block; nothing overlapping, checked on the read-back
geometry. Saves ``<drawing_number>.SLDDRW`` and a PDF.

The DWG NO. and TITLE are shrunk to fit their title-block boxes. For
smaller title-block text, pass ``title_block_text_height_mm`` (e.g.
``3``); a field that cannot fit even at 2 mm is reported as an
overlap, with that hint.
- **list_model_dimensions** — List every dimension in the active part or assembly with its full name.

Read-only. Each entry's ``full_name`` (e.g. ``"D1@Sketch1"``) is the
name ``set_dimension`` / ``get_dimension`` accept, so this is how to
find and edit any driving dimension in an existing model. Pass
``feature_name`` to list one feature's dimensions only.
- **measure_entities** — Measure faces, edges or vertices with SolidWorks' Measure tool.

One face gives its area and perimeter; one edge its length (and radius
and diameter for an arc); two entities give the distance and angle
between them. Entity coordinates are in metres. Clears the selection
afterwards.
- **get_material** — Read the material assigned to the active part.

Read-only. Parts only (``wrong_document_type`` otherwise).
- **set_material** — Assign a library material to the active part.

The material drives mass properties (``get_mass_properties``) and what
a title block's Material field shows. The name must match the library
exactly; find it with ``list_available_materials``. The material is
read back after assignment, so success means it really applied.
- **list_available_materials** — List materials in the installed SolidWorks material libraries.

Read-only; parses every ``.sldmat`` library SolidWorks is configured
to use. Filter with ``search`` (name or classification substring, e.g.
``"steel"`` or ``"6061"``) and pass the exact ``name`` to
``set_material``.
- **get_custom_properties** — Read the active document's custom properties.

Read-only. File-level properties (the default) are what drawing title
blocks and BOMs usually link to; pass ``configuration`` for
configuration-specific ones.
- **set_custom_property** — Create or overwrite one text custom property on the active document.

Typical names: ``PartNo``, ``Description``, ``DrawnBy``, ``Revision``.
The value is read back after writing, so success means it was stored.
- **export_flat_pattern** — Export the active sheet-metal part's flat pattern to DXF or DWG.

Exports the flat-pattern geometry only (no bend lines or sketches),
for laser or waterjet cutting. A part without a sheet-metal body is
refused (``not_found``) and nothing is written.
- **calculate_mass_properties** — Get mass properties of the current SolidWorks model.

Calculates and returns comprehensive mass properties for the active model including
volume, surface area, mass, center of mass, and moments of inertia. Essential for
engineering analysis, weight calculations, and structural design.
- **get_mass_properties** — Backward-compatible alias for calculate_mass_properties.
- **check_interference** — Check for interference between components in an assembly.

Analyzes specified components for geometric interference (overlapping volumes) and
provides detailed interference detection results. Critical for assembly validation and
identifying design conflicts before manufacturing.
- **analyze_geometry** — Handle analyze geometry.

This tool provides various geometry analysis capabilities like curvature analysis, draft
analysis, thickness analysis, etc.
- **get_material_properties** — Get material properties of the current model.

This tool retrieves the material properties assigned to the model including density,
elastic modulus, yield strength, etc.
- **verify_model** — Check the active part or assembly against what you meant to build.

Call this as the last step of a build (and whenever a step looks
suspicious). A modelling tool returning success does not prove the
geometry is right; this reads the model back and compares it with
your expectations. Give only the expectations you know; each becomes
one check. With no expectations it just reports what it measured.

Units: mm, mm³ and kg. ``bounding_box_mm`` is the overall size
``[x, y, z]`` in model axes (a sketch on the Front Plane extrudes
along z). Widen ``relative_tolerance`` when your hand calculation
ignores fillets or chamfers, and ``length_tolerance_mm`` when
``measured.bounding_box_method`` is ``assembly_box`` (SolidWorks'
assembly box can be slightly larger than the parts). Mass depends on
the assigned material; without one SolidWorks uses a default density.

Each check reports ``expected``, ``actual``, ``tolerance`` and
``passed``: ``true``, ``false``, or ``null`` when the value could not
be measured (never counted as a pass). ``verdict`` is ``pass``,
``fail``, ``inconclusive`` (nothing failed, something unmeasured) or
``report_only``. ``status`` stays ``success`` when the model does not
match: the tool worked, the model is what failed.
- **export_step** — Export the current model to STEP format.

Exports SolidWorks models to STEP (Standard for the Exchange of Product Data) format,
the preferred neutral CAD format for interoperability between different CAD systems and
manufacturers.
- **export_iges** — Export the current model to IGES format.

Exports SolidWorks models to IGES (Initial Graphics Exchange Specification) format, a
legacy neutral CAD format still widely used for surface modeling and older CAD system
compatibility.
- **export_stl** — Export the current model to STL format.

Exports SolidWorks models to STL (Stereolithography) format, the standard file format
for 3D printing, rapid prototyping, and additive manufacturing applications.
- **export_pdf** — Export the current model or drawing to PDF format.

Creates PDF documents from SolidWorks drawings, assemblies, or parts for documentation,
sharing, review, and archival purposes. Essential for design review and manufacturing
documentation.
- **export_dwg** — Export the current drawing to DWG format.

Converts SolidWorks drawings to DWG (Drawing) format, the native AutoCAD file format
widely used in architecture, engineering, and construction industries for 2D technical
drawings.
- **export_image** — Export images of the current model.

Captures high-quality rendered images of SolidWorks models from various view
orientations for documentation, presentations, marketing materials, and web publication.
- **batch_export** — Batch export multiple SolidWorks files to a target format.

Processes entire directories of SolidWorks files and converts them to specified target
formats. Essential for project migrations, supplier deliverables, and large-scale format
conversions.
- **generate_vba_code** — Generate VBA code for SolidWorks automation.

Analyzes operation description and generates appropriate VBA code with SolidWorks API
calls, error handling, and documentation.
- **automation_start_macro_recording** — Start recording a macro in SolidWorks.

Begins macro recording to capture user actions and generate reusable automation scripts.
- **automation_stop_macro_recording** — Stop recording the current macro.

This tool stops the active macro recording and saves the recorded actions as a VBA
macro.
- **batch_process_files** — Handle batch process files.

This tool processes multiple files in a directory, performing operations like rebuild,
save as, export, or property updates.
- **manage_design_table** — Create or manage design tables for parametric modeling.

Design tables allow you to create multiple configurations of a part or assembly by
driving parameters from an Excel spreadsheet.
- **execute_workflow** — Handle execute workflow.

This tool executes a series of automated steps in sequence, with support for parallel
execution and error handling.
- **create_template** — Create a SolidWorks template file.

This tool creates templates for parts, assemblies, or drawings with standardized
settings, materials, and configurations.
- **optimize_performance** — Optimize SolidWorks performance settings.

This tool analyzes the current SolidWorks configuration and suggests or applies
performance optimizations.
- **save_file** — Save the current SolidWorks model.

Saves the currently active SolidWorks document to its existing file location. Essential
for preserving work and maintaining document version control. Handles both modified and
unmodified documents based on force_save setting.
- **save_as** — Save the current model to a new location or format.

Saves the currently active SolidWorks document with a new filename, location, or file
format. Supports multiple export formats for interoperability with other CAD systems and
manufacturing workflows.
- **get_file_properties** — Get properties of the current SolidWorks file.

Retrieves comprehensive metadata and properties of the currently active SolidWorks
document. Provides essential file information for document management, version control,
and project organization.
- **get_model_info** — Get metadata for the active SolidWorks document.

Returns a compact summary of the current model context that is useful for read-before-
write LLM flows (document type, active configuration, and feature count).
- **list_features** — List feature-tree entries for the active SolidWorks document.

Useful for read-before-write workflows where the agent must inspect existing model
structure before adding or editing downstream features.
- **get_selected_entities** — Report the faces/edges/vertices currently selected in the live SolidWorks UI.

Use this to find out exactly what the user has clicked on in SolidWorks
before applying a feature (e.g. "chamfer the face I selected") instead
of guessing from coordinates or a screenshot. Each entry includes
enough geometry (bounding box, center, area/length, normal where
applicable) to identify which face/edge is which, and the center
coordinates can be fed straight into add_chamfer/add_fillet's
"face:x,y,z" or coordinate edge_names syntax.
- **classify_feature_tree** — Classify the active model into a feature family from model-info and tree data.

This is a read-before-write helper for delegation. It summarizes whether the current
document looks like a direct-MCP solid, sheet metal workflow, advanced VBA-backed part,
assembly, drawing, or an insufficient-evidence case.
- **list_configurations** — List configuration names for the active SolidWorks document.

Returns all available configuration names so callers can select a stable target before
invoking feature or export operations.
- **manage_file_properties** — Read, update, copy, move, rename, or delete file-related properties.

Uses the requested operation and file paths to manage SolidWorks file metadata or
related file lifecycle tasks through the active adapter.
- **convert_file_format** — Convert a SolidWorks file from one format to another.

Supports exporting source files to target formats such as STEP, IGES, STL, PDF, or other
adapter-supported conversion outputs.
- **batch_file_operations** — Run a file operation across multiple files as a batch workflow.

Intended for repetitive file management tasks such as copying, moving, renaming, or
deleting groups of SolidWorks documents.
- **load_part** — Load (open) a SolidWorks part file.

Convenience wrapper that opens a .sldprt file and makes it the active document. Provides
a simpler alternative to open_model for parts.
- **load_assembly** — Load (open) a SolidWorks assembly file.

Convenience wrapper that opens a .sldasm file and makes it the active document. Provides
a simpler alternative to open_model for assemblies.
- **save_part** — Save the active SolidWorks part document.

Convenience wrapper that saves the currently active part. If no file_path is provided,
saves to the existing location. Otherwise, saves as a new file.
- **save_assembly** — Save the active SolidWorks assembly document.

Convenience wrapper that saves the currently active assembly. If no file_path is
provided, saves to the existing location. Otherwise, saves as a new file.
- **pack_and_go_assembly** — Copy a SolidWorks assembly and all its referenced parts to a self-contained folder.

Enumerates every component referenced by the active assembly, copies the
assembly and each part into ``target_dir``, then rewrites the stored
component paths inside the copied assembly so it opens without any
dependency on the original file locations — equivalent to the SolidWorks
GUI Pack-and-Go operation.
- **list_open_documents** — List every SolidWorks document that is currently open.

Read-only — does not change which document is active. Use it to
discover what is open (an assembly plus its parts, a drawing plus its
model) before switching with ``activate_document``.
- **activate_document** — Switch which open document is the active one.

Matches the argument against open documents by title, full path, or
file name (case-insensitive), calls ``ActivateDoc3``, and reads the
active document back to confirm the switch took.
- **save_body_as_part** — Extract one solid body from the active multibody part to a new file.

Runs SolidWorks' Save Bodies on a single named body, writing a
standalone part to ``file_path``. The body is matched by name against
the active part's solid bodies; the response lists every solid body
found, so an unknown name reports the real options. Success is
confirmed by the file existing on disk afterwards.
- **generate_vba_extrusion** — Generate VBA code for complex extrusion operations.
- **generate_vba_revolve** — Generate VBA code for complex revolve operations.
- **generate_vba_assembly_insert** — Generate VBA code for assembly component insertion.
- **generate_vba_drawing_views** — Generate VBA code for drawing view creation.
- **generate_vba_batch_export** — Generate VBA code for batch file export operations.
- **generate_vba_part_modeling** — Generate VBA code for complex part modeling operations.
- **generate_vba_assembly_mates** — Generate VBA code for assembly mate creation.
- **generate_vba_drawing_dimensions** — Generate VBA code for creating drawing dimensions.

Creates macro for various dimension types in drawings.
- **generate_vba_file_operations** — Generate VBA code for file management operations.
- **generate_vba_macro_recorder** — Generate VBA code using macro recording patterns.
- **extract_template** — Extract template from existing SolidWorks model.
- **apply_template** — Apply a template to an existing SolidWorks model.

This tool applies saved template settings including properties, dimensions, and
formatting to the target model.
- **batch_apply_template** — Apply template to multiple models in batch.

This tool processes multiple SolidWorks files and applies the same template
configuration to all matching files.
- **compare_templates** — Compare two templates and generate difference report.

This tool analyzes differences between templates to help understand variations in
formatting and properties.
- **save_to_template_library** — Save template to the organization's template library.

This tool manages a centralized template library with categorization and version
control.
- **list_template_library** — List available templates from the template library.

This tool provides browsing and searching capabilities for the organization's template
library.
- **start_macro_recording** — Start recording a SolidWorks macro.

This tool initiates macro recording to capture user actions for later playback and
automation.
- **stop_macro_recording** — Stop macro recording and save the recorded macro.

This tool stops the active recording session and saves the generated macro code to a
file.
- **execute_macro** — Run a binary SolidWorks macro (.swp, or legacy .swb).

Calls ``ISldWorks::RunMacro2`` on ``macro_path`` (or ``macro_file``).
Only binary macros run: VBA source (.vb, .bas, plain text) is
rejected as ``invalid_input`` before anything reaches SolidWorks.
The macro must not be interactive (no MsgBox or user forms).
- **analyze_macro** — Analyze a macro for complexity, dependencies, and optimization opportunities.

This tool provides insights into macro structure and performance to help with
optimization and maintenance.
- **batch_execute_macros** — Handle batch execute macros.

This tool allows running multiple macros in sequence or parallel for complex automated
workflows.
- **optimize_macro** — Optimize an existing macro for better performance and reliability.

This tool analyzes and suggests improvements to existing macro code.
- **create_macro_library** — Create a library of organized macros for team sharing and reuse.

This tool sets up a structured macro library with categorization, documentation, and
version control.
- **discover_solidworks_docs** — Discover and index SolidWorks COM and VBA documentation.

Creates a searchable index of all available COM objects, methods, properties, and VBA
libraries for the installed SolidWorks version. Useful for building context for
intelligent MCP tool selection and documentation queries.
- **search_solidworks_api_help** — Search SolidWorks API help index and return coherent guidance.

This tool helps when the LLM gets stuck by mapping user intent to discovered COM members
and practical MCP workflow guidance.
- **lookup_api_method** — Look up one SolidWorks API method or property by interface + name.

Confirms the member is indexed on that interface and returns its
sibling members for context. The local index stores names only, so
full signatures (parameters, return type) are not available here - use
search_solidworks_api_help or help.solidworks.com for those.
- **lookup_api_interface** — List every indexed member (methods + properties) of a COM interface.
- **find_related_api_members** — Find API members related to a known interface or member name.

For an interface: its own members. For a member: the other members of
every interface that also exposes it, plus name-substring matches.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "solidworksmcp-python": {
    "command": "uvx",
    "args": ["solidworks-mcp-python"]
  }
}
```

## Documentation

## What SolidworksMCP-python does

SolidworksMCP-python exposes SolidWorks automation through the Model Context Protocol. AI clients can use it to create parts, assemble components, generate drawings, inspect model results, and continue iterating based on those results. The project is aimed at workflows where a user describes a mechanical design, an agent plans the required operations, and MCP tool calls carry them out in SolidWorks.

The repository advertises 154 tools across modeling, sketching, drawing production, engineering data, analysis, export, automation, templates, and macros. It also includes an optional agent and prompt-testing layer for evaluating AI-assisted workflows.

## How it works

The server routes tool requests from an MCP client into SolidWorks through Python COM automation using pywin32. Its runtime also includes COM/VBA routing and adapter safety wrappers. A typical workflow is iterative: describe the intended result, generate a plan, execute the tools, inspect the resulting model or measurements, and adjust the next operations.

The demonstrated workflow creates a dimensioned plate, applies a material, verifies its volume and mass, produces a drawing, adds datum and GD&T annotations, inserts the part into an assembly, adds mates, checks interference, and creates an assembly drawing with a bill of materials. Verification tools can report properties such as dimensions, volume, mass, feature and body counts, component and mate counts, and interference results.

## Setup and configuration

The project targets Windows 10 or 11 and requires Python 3.13 or newer. SolidWorks is the CAD application being automated; the project is tested against SolidWorks 2026. Because communication uses the SolidWorks COM API, the server is intended for an environment where the Windows SolidWorks application and its automation interface are available.

The MCP client supplies requests to the server, while SolidWorks performs the underlying CAD operations. The project includes a live-test suite and documented demonstrations that replay tool calls against SolidWorks, which can help evaluate a local setup before building a larger agent workflow.

## Tools and capabilities

Representative capabilities include:

- Create sketches with lines, circles, dimensions, and constraints, then check whether they are fully defined.
- Build and modify solid geometry with operations such as extrusion, cuts, and revolves.
- Insert components, add assembly mates, list assembly contents, and check interference.
- Generate part and assembly drawing packages with views, dimensions, notes, title blocks, and optional BOMs.
- Apply materials, list dimensions, measure geometry, set custom properties, and verify model results.
- Add drawing annotations including datum tags, GD&T frames, center marks, and arranged dimensions.

## Limitations and notes

SolidWorks automation is tied to the Windows COM environment, so this is not a platform-neutral CAD server. Operations affect an external SolidWorks application and should be checked in the resulting model and drawings. The project’s demonstration notes also show that an agent may use more calls than necessary; the examples are intended to make individual tool behavior visible rather than prescribe the most efficient modeling strategy.

The repository includes an MIT license and identifies SolidWorks 2026 and Windows 10/11 in its project metadata.

_Full upstream README: https://allmcps.com/mcp/solidworksmcp-python/readme_

