# alisamsam/solidworks-mcp architecture

> Architecture diagram of the GitHub repository alisamsam/solidworks-mcp, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/alisamsam/solidworks-mcp
- Repository: https://github.com/alisamsam/solidworks-mcp

## Overview

SolidWorks MCP Server exposes SolidWorks operations as MCP tools: a Claude-compatible client requests connection, document, sketch, feature, or utility actions; the server dispatches tool calls into the automation package, which operates on SolidWorks through Windows COM. The documented workflow moves from opening or creating a document, through sketch geometry and 3D features, to querying or saving the model. The README also documents unit handling and installation detection. Simulation exists as a separate top-level module, but its wiring to the MCP server is not established by the sampled excerpts; it is shown as an optional integration. Some internal operation-module relationships are based on the documented modular structure, not inspected call sites.

Main entry points: [`solidworks_mcp/automation/__init__.py`](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/__init__.py) (Automation Facade), [`solidworks_mcp/server.py`](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/server.py) (MCP Tool Server), [`solidworks_mcp/utils/units.py`](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/utils/units.py) (Unit Conversion), [`solidworks_mcp/automation/base.py`](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/base.py) (COM Connection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_mcp["MCP Interface"]
  node_server["MCP Tool Server<br/>[server.py]"]
end

subgraph group_automation["Model Automation"]
  node_automation_facade["Automation Facade<br/>[__init__.py]"]
  node_connection["COM Connection<br/>[base.py]"]
  node_documents["Documents<br/>[documents.py]"]
  node_sketches["Sketch Geometry<br/>[sketches.py]"]
  node_features["Model Features<br/>[features.py]"]
end

subgraph group_support["Configuration Utilities"]
  node_units["Unit Conversion<br/>[units.py]"]
  node_finder["SW Detection<br/>[sw_finder.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_constants["API Constants<br/>[constants.py]"]
end

subgraph group_simulation["Simulation"]
  node_simulation_module["Simulation API"]
  node_com_helper["COM Helper<br/>[solidworks_com.py]"]
end

node_client(("Claude Client"))
node_solidworks["SolidWorks"]
node_simulation_addin["Simulation Add-in"]

node_client -->|"calls tools"| node_server
node_server -->|"dispatches actions"| node_automation_facade
node_server -->|"sets units"| node_units
node_server -.->|"loads settings"| node_config
node_automation_facade -->|"manages connection"| node_connection
node_automation_facade -->|"dispatches document actions"| node_documents
node_automation_facade -->|"dispatches sketch actions"| node_sketches
node_automation_facade -->|"dispatches feature actions"| node_features
node_documents -.->|"converts dimensions"| node_units
node_sketches -->|"converts geometry"| node_units
node_features -->|"converts dimensions"| node_units
node_connection -.->|"detects installation"| node_finder
node_connection -->|"connects via COM"| node_solidworks
node_documents -->|"operates documents"| node_solidworks
node_sketches -->|"creates geometry"| node_solidworks
node_features -->|"creates features"| node_solidworks
node_simulation_module -->|"uses COM helper"| node_com_helper
node_com_helper -->|"connects via COM"| node_solidworks
node_simulation_module -.->|"loads add-in"| node_simulation_addin

click node_server "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/server.py"
click node_automation_facade "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/__init__.py"
click node_connection "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/base.py"
click node_documents "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/documents.py"
click node_sketches "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/sketches.py"
click node_features "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/features.py"
click node_units "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/utils/units.py"
click node_finder "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/utils/sw_finder.py"
click node_config "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/config.py"
click node_constants "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/constants.py"
click node_simulation_module "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_simulation.py"
click node_com_helper "https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_com.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_server,node_client toneBlue
class node_automation_facade,node_connection,node_documents,node_sketches,node_features toneAmber
class node_units,node_finder,node_config,node_constants toneMint
class node_simulation_module,node_com_helper toneRose
class node_solidworks,node_simulation_addin toneIndigo
```

## Components

### MCP Interface

- [MCP Tool Server](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/server.py): `solidworks_mcp/server.py`

### Model Automation

- [Automation Facade](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/__init__.py): `solidworks_mcp/automation/__init__.py`
- [COM Connection](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/base.py): `solidworks_mcp/automation/base.py`
- [Documents](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/documents.py): `solidworks_mcp/automation/documents.py`
- [Sketch Geometry](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/sketches.py): `solidworks_mcp/automation/sketches.py`
- [Model Features](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/automation/features.py): `solidworks_mcp/automation/features.py`

### Configuration Utilities

- [Unit Conversion](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/utils/units.py): `solidworks_mcp/utils/units.py`
- [SW Detection](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/utils/sw_finder.py): `solidworks_mcp/utils/sw_finder.py`
- [Configuration](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/config.py): `solidworks_mcp/config.py`
- [API Constants](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_mcp/constants.py): `solidworks_mcp/constants.py`

### Simulation

- [Simulation API](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_simulation.py): `solidworks_simulation.py`
- [COM Helper](https://github.com/alisamsam/solidworks-mcp/blob/main/solidworks_com.py): `solidworks_com.py`

### Other components

- **Claude Client**
- **SolidWorks**
- **Simulation Add-in**

## Connections

- Claude Client → MCP Tool Server: calls tools
- MCP Tool Server → Automation Facade: dispatches actions
- MCP Tool Server → Unit Conversion: sets units
- MCP Tool Server → Configuration: loads settings
- Automation Facade → COM Connection: manages connection
- Automation Facade → Documents: dispatches document actions
- Automation Facade → Sketch Geometry: dispatches sketch actions
- Automation Facade → Model Features: dispatches feature actions
- Documents → Unit Conversion: converts dimensions
- Sketch Geometry → Unit Conversion: converts geometry
- Model Features → Unit Conversion: converts dimensions
- COM Connection → SW Detection: detects installation
- COM Connection → SolidWorks: connects via COM
- Documents → SolidWorks: operates documents
- Sketch Geometry → SolidWorks: creates geometry
- Model Features → SolidWorks: creates features
- Simulation API → COM Helper: uses COM helper
- COM Helper → SolidWorks: connects via COM
- Simulation API → Simulation Add-in: loads add-in
