# SolidWorks MCP Server

> Python MCP server for SolidWorks automation with 134 tools

## Overview

- [SolidWorks MCP Server](https://andrewbartels1.com/SolidworksMCP-python/): An MCP server that lets AI agents drive SolidWorks: describe a part, and the agent builds it with the server's 123 tools and checks what SolidWorks reports back.
- [Demos](https://andrewbartels1.com/SolidworksMCP-python/demos/): Every demo on this page drove a real SolidWorks 2026 session through the same MCP tools an MCP client calls, and checked what SolidWorks reported back. Each GIF was captured from that run, with the tool call and its result captioned beneath the SolidWorks window.
- [Progress](https://andrewbartels1.com/SolidworksMCP-python/progress/): How far to trust each tool, and how much of SolidWorks' COM API the project reaches. Everything on this page is generated from the code by `python -m solidworks_mcp.progress.generate`, and a test fails when it's out of date, so it moves with every tool added or fixed.
- [Compatibility](https://andrewbartels1.com/SolidworksMCP-python/compatibility/): The SolidWorks releases the selftest has been run on, and how each area did. The server is developed against SolidWorks 2026; every other row comes from a user's report.

## Getting Started

- [Installation Guide](https://andrewbartels1.com/SolidworksMCP-python/getting-started/installation/): Real SolidWorks automation needs Windows 10 or 11 with SolidWorks installed and opened at least once. Linux and WSL work for the docs, the tests and mock mode.
- [Quick Start Guide](https://andrewbartels1.com/SolidworksMCP-python/getting-started/quickstart/): Get running quickly with the verified Windows setup.
- [Tutorial Tracks](https://andrewbartels1.com/SolidworksMCP-python/getting-started/tutorial-tracks/): Build SolidWorks parts from scratch using the MCP server and Python scripting.
- [SolidWorks as Code (SoC)](https://andrewbartels1.com/SolidworksMCP-python/getting-started/solidworks-as-code/): SolidWorks as Code lets you record an interactive MCP session and export it as a clean, runnable Python script.
- [Getting Started: Building SolidWorks Parts with Python](https://andrewbartels1.com/SolidworksMCP-python/getting-started/tutorials/u-joint-assembly-build/): This tutorial takes you from zero to three completed SolidWorks parts — no prior Python or CAD automation experience required. By the end you will understand how the MCP adapter talks to SolidWorks, how to run and read build scripts, how to interpret errors, and how the checkpoint-and-restore workflow lets you recover from mistakes without undoing 20 mouse clicks.
- [U-Joint Rebuild Prompts](https://andrewbartels1.com/SolidworksMCP-python/getting-started/tutorial-parts/u_joint_rebuild_prompt/): These prompts rebuild the U-Joint from SolidWorks' sample models, for when you have the reference models and want to match them exactly. For learning and from-scratch builds, start with the U-Joint Assembly Tutorial instead.
- [Heat-Insert Coupon Recording Prompt](https://andrewbartels1.com/SolidworksMCP-python/getting-started/tutorial-parts/heat_insert_recording_prompt/): The prompt below reproduces `demo_recording_heat_insert.py` — a recording-friendly script that pauses between every build step so each feature is visible on screen, for screen-recording an MCP-driven modeling session end to end.
- [Prompt-Driven Walkthrough: Smart Dimensions, Reference Points, Save Bodies & Center Marks](https://andrewbartels1.com/SolidworksMCP-python/getting-started/tutorials/wave3-reference-geometry-and-drawings/): This tutorial reproduces a live session that was run end-to-end against **SolidWorks 3DEXPERIENCE R2026x** through the MCP server. Every screenshot on this page was captured with the `export_image` tool during that run — nothing is mocked.
- [VS Code MCP Setup](https://andrewbartels1.com/SolidworksMCP-python/getting-started/vscode-mcp-setup/): Connect VS Code's MCP client to the SolidWorks MCP server, with the setup command or by editing `mcp.json` by hand.
- [Claude Code MCP Setup](https://andrewbartels1.com/SolidworksMCP-python/getting-started/claude-code-setup/): This guide shows complete beginners how to connect Claude Code to the SolidWorks MCP server.
- [Local LLM with Ollama (Gemma 4)](https://andrewbartels1.com/SolidworksMCP-python/getting-started/local-llm/): The SolidWorks MCP UI can route all LLM calls to a local Ollama instance instead of GitHub Models or OpenAI. This works offline and keeps design data private.

## MCP Server Guide

- [Architecture Overview](https://andrewbartels1.com/SolidworksMCP-python/user-guide/architecture/): The SolidWorks MCP Server implements an intelligent, multi-layered architecture designed to overcome the limitations of traditional COM-based SolidWorks automation while providing enterprise-grade reliability and security.
- [Tools Overview](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tools-overview/): The SolidWorks MCP Server provides 140 specialized tools for CAD automation. This page is a navigation map: each card links to the family's catalog page, which lists every tool with its inputs and a sample call.
- [Platform and Connectivity](https://andrewbartels1.com/SolidworksMCP-python/user-guide/platform-connectivity/): This guide explains how to run SolidWorks MCP when your day-to-day workflow is Linux/WSL but real SolidWorks automation must run on Windows.
- [Prompting Best Practices for SolidWorks MCP](https://andrewbartels1.com/SolidworksMCP-python/user-guide/prompting-best-practices/): This guide is designed for mechanical engineers and CAD users who are new to MCP tool calling.
- [Integration Testing (Real SolidWorks)](https://andrewbartels1.com/SolidworksMCP-python/user-guide/integration-testing/): This project has two test modes: a fast default mode that needs no SolidWorks, and a full mode that adds real SolidWorks integration tests.
- [Real SolidWorks Tool Validation Matrix](https://andrewbartels1.com/SolidworksMCP-python/user-guide/real-tool-validation-matrix/): This page documents what is validated with real SolidWorks and what is still simulated.
- [SolidWorks UI + LLM Tutorial](https://andrewbartels1.com/SolidworksMCP-python/user-guide/solidworks-ui-llm-tutorial/): This tutorial is for mechanical engineers who are new to MCP tools and want a repeatable way to drive SolidWorks from an LLM while still using the SolidWorks UI. This is meant to help take the repetition out of a workflow and optimize an engineer's time on the design and things that matter, not dull repetitive tasks.
- [Screenshot Equivalence Workflow](https://andrewbartels1.com/SolidworksMCP-python/user-guide/screenshot-equivalence/): This page describes how to validate that an LLM-generated SolidWorks model is geometrically equivalent to a reference model using automated screenshot comparison.

## Tool Catalog

- [Tool Catalog — All 151 Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/): This reference documents all **151 MCP tools** registered by the SolidWorks MCP server. Each section covers one functional category with parameter tables and copy-paste sample calls.
- [Modeling Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/modeling/): Create and manipulate SolidWorks parts, assemblies, and drawings. These are the foundational tools for any CAD workflow — opening files, creating features (extrude, revolve), and querying/setting driven dimensions.
- [Equation Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/equations/): Read, add, change and delete a part's or assembly's equations and global variables, so one value drives several dimensions and the model stays consistent when it changes.
- [Sketching Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/sketching/): Build 2-D sketch geometry (lines, circles, arcs, splines, polygons) and apply geometric constraints and driven dimensions. Sketches are the prerequisite for every extrusion, revolve, sweep, and loft feature.
- [Drawing Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/drawing/): Create and edit 2-D technical drawings: views, section and detail views, notes, centre marks, dimensions by hand or automatically, the title block and sheet format, and a check that the drawing is complete before it is exported. Every position is in sheet millimetres from the sheet's lower-left corner.
- [Drawing Analysis Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/drawing-analysis/): Compare two versions of a drawing file on disk. A check of a drawing's contents (`check_drawing`) is planned in the drawing pack.
- [Drawing Automation Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/drawing-automation/): Put the model's dimensions on a drawing and lay them out so nothing overlaps, add a bill of materials, set the sheet scale, or make a complete A3 drawing of a part or assembly in one call.
- [Engineering Data Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/engineering-data/): Read and edit the data drawings, BOMs and analyses are built from: every model dimension by name, measurements between faces, edges and vertices, materials, custom properties, and sheet-metal flat patterns.
- [Analysis Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/analysis/): Use these after a model or assembly already exists. To check a finished build in one call, use `verify_model`. For individual readings, use `get_mass_properties` and `check_interference`.
- [Export Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/export/): Convert SolidWorks models to industry-standard interchange and manufacturing formats: STEP, IGES, STL, PDF, DWG, and raster images. To export many files, call the export tool once per file.
- [File Management Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/file-management/): Open, save, switch and inspect SolidWorks documents: `open_model`, `save_file`, `save_as` and `save_as_template`, the open documents, the feature tree, configurations, the current selection and Pack and Go. `load_part`, `load_assembly`, `save_part`, `save_assembly` and `get_file_properties` are deprecated; each section names its replacement.
- [Automation Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/automation/): `generate_vba_code` writes a VBA macro skeleton for a step the other tools don't cover. For variants of a part, use configurations (planned in queue item 13).
- [VBA Generation Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/vba-generation/): Generate and execute VBA macro code for operations that exceed the COM direct-call parameter limit (typically > 12 params). Covers extrusions, revolves, assembly inserts, mates, drawing views, batch exports, file operations, and macro recording scaffolding.
- [Template Management Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/template-management/): Compare two SolidWorks template files (.prtdot, .asmdot, .drwdot) on disk. To start a part from a template, give `template` to `create_part`.
- [Macro Recording Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/macro-recording/): Run a SolidWorks macro file (`.swp` or `.swb`), or VBA source when the server allows it. Record macros in SolidWorks itself (Tools > Macro > Record); to write one from a description, use `generate_vba_code`.
- [Docs Discovery Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/docs-discovery/): Look up SolidWorks API interfaces, methods and properties, with each member's parameters, return type and description, and the integer values of its enums. Everything is read from the SolidWorks type library installed on this machine, so the answers match your SolidWorks version and nothing is hand-typed.
- [Server Admin Tools](https://andrewbartels1.com/SolidworksMCP-python/user-guide/tool-catalog/server-admin/): The server's own state. These never touch SolidWorks.

## Agents and Skills

- [Agents and Prompt Testing](https://andrewbartels1.com/SolidworksMCP-python/agents/agents-and-testing/): This guide is written for people who know SolidWorks well but are new to LLM agents and AI-assisted workflows.
- [Family-Gated Tool Routing for Interactive CAD Reconstruction](https://andrewbartels1.com/SolidworksMCP-python/agents/family-gated-tool-routing/): This page defines how the orchestration agent should shortlist tools by feature family, so the LLM does not reason over the full tool surface at every step.
- [PydanticAI and Pydantic in This Project](https://andrewbartels1.com/SolidworksMCP-python/agents/pydantic-ai-and-schemas/): This section explains where schema-driven validation belongs and how it relates to the MCP server.
- [Agent Memory and Recovery (SQLite MVP)](https://andrewbartels1.com/SolidworksMCP-python/agents/agent-memory-and-recovery/): This documents a simple local SQLite strategy to help agents avoid repeated failures and recover from broken design states.
- [Agent UI Workflows (Planning)](https://andrewbartels1.com/SolidworksMCP-python/agents/agent-ui-workflows/): This page outlines practical UI options for visually guiding users through agent decisions like hinge selection, sourcing, and printability checks.
- [Logging Configuration and Agent Invocation Guide](https://andrewbartels1.com/SolidworksMCP-python/agents/logging-and-agent-invocation/): This guide explains how to enable, configure, and use the logging infrastructure for SolidWorks MCP tool execution and multi-turn conversational design workflows.
- [From Screenshot to SolidWorks: The Image-First Reconstruction Workflow](https://andrewbartels1.com/SolidworksMCP-python/agents/reverse-engineering-workflow/): This tutorial shows how to take a screenshot or rendered image of a part — including the sample parts that ship with SolidWorks — and use prompting to recreate it from scratch using the MCP server.
- [Sample Models Guide](https://andrewbartels1.com/SolidworksMCP-python/agents/sample-models-guide/): This guide describes the SolidWorks 2026 learn samples shipped with SolidWorks and explains which MCP tools and prompting strategies best recreate each part from scratch.
- [Worked Examples: SolidWorks MCP + Agent Workflow](https://andrewbartels1.com/SolidworksMCP-python/agents/worked-examples/): This page shows three practical reconstruction examples, each using the same inspect, classify and delegate loop.
- [Prompt-Driven Design with SolidWorks MCP](https://andrewbartels1.com/SolidworksMCP-python/agents/prompt-driven-design/): You know SolidWorks. This guide shows you how to describe what you want to build in plain language, let an LLM translate that into the right tool calls, and have SolidWorks build it — without clicking through menus.
- [Tool Description Standard](https://andrewbartels1.com/SolidworksMCP-python/agents/tool-description-standard/): An agent picks a tool from its description and input schema alone, before it has called anything. This page is the standard every MCP tool in this server follows, so that what an agent reads is enough to choose the right tool, call it correctly, and know what happened.
- [Agent Skill](https://andrewbartels1.com/SolidworksMCP-python/agents/agent-skill/): The server ships a skill, `solidworks-mcp`, that teaches agents how to use its tools together: the order to build in, units, choosing geometry, checking results and recovering from errors.
- [Prompting Tutorials](https://andrewbartels1.com/SolidworksMCP-python/agents/prompting-tutorials/): This page documents the **best-performing LLM prompts** for creating SolidWorks parts via the MCP server. Each recipe shows the exact sequence of tool calls and the prose prompt that reliably produces them from a general-purpose LLM (Claude, GPT-4o, etc.).
- [COM API Pitfalls for LLM Agents](https://andrewbartels1.com/SolidworksMCP-python/agents/com-api-pitfalls/): This page documents hard-won lessons from debugging the SolidWorks COM bridge, for anyone changing the server's COM code. Every entry below caused a real runtime failure that required hours to diagnose.

## Planning

- [Roadmap](https://andrewbartels1.com/SolidworksMCP-python/planning/roadmap/): This page tracks the order the open backlog gets worked in.
- [SolidWorks API Coverage Map](https://andrewbartels1.com/SolidworksMCP-python/planning/solidworks-api-coverage/): This page maps every major SolidWorks API area against what this MCP server implements, as a planning reference for new tools.
