Skip to content
Back to search

Solidworks-MCP

MCP server to automate SolidWorks using Claude AI — 22 tools for parts, sketches & features

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/alisamsam--solidworks-mcp/badge.svg)](/listings/alisamsam--solidworks-mcp)

HTML

<a href="/listings/alisamsam--solidworks-mcp"><img src="/api/listings/alisamsam--solidworks-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Clone the Repository

git clone https://github.com/alisamsam/solidworks-mcp.git
cd solidworks-mcp

2. Install Dependencies

pip install -r requirements.txt

3. Configure Claude Desktop

Add the following to your `claude_desktop_config.json`:

**Location:** `C:\Users\YOUR_NAME\AppData\Roaming\Claude\claude_desktop_config.json`

{
  "mcpServers": {
    "solidworks": {
      "command": "python",
      "args": ["C:\\path\\to\\solidworks-mcp\\solidworks_mcp_server.py"]
    }
  }
}

4. Launch

1. Open **SolidWorks** first 2. Restart **Claude Desktop** 3. In Claude, type: *"Connect to SolidWorks"* 4. Start designing! 🎉

---

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 210 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # SolidWorks MCP Server 🔧
  2. > Automate SolidWorks using natural language through Claude AI and the Model Context Protocol (MCP)
  3. [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
  4. [![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://www.python.org/downloads/)
  5. [![SolidWorks 2025](https://img.shields.io/badge/SolidWorks-2023--2025-red.svg)](https://www.solidworks.com/)
  6. [![MCP](https://img.shields.io/badge/MCP-Compatible-green.svg)](https://modelcontextprotocol.io/)
  7. ---
  8. ## 🎯 What is This?
  9. **SolidWorks MCP Server** is a production-ready [Model Context Protocol](https://modelcontextprotocol.io/) server that lets Claude AI control SolidWorks through natural language. Instead of manually clicking through menus, you simply tell Claude what to design — and it builds it for you.
  10. **Example prompts you can use:**
  11. - *"Create a new part, draw a circle with radius 30mm and extrude it 15mm"*
  12. - *"Add a fillet of 2mm to all edges"*
  13. - *"Draw a hexagon and cut extrude it 10mm"*
  14. - *"List all features in the current part"*
  15. ---
  16. ## ✨ Features
  17. - ✅ **22 Tools** covering parts, sketches, features, and utilities
  18. - ✅ **SolidWorks 2023–2025 Compatible** with version-aware API fallbacks
  19. - ✅ **Auto-detects SolidWorks** installation via Windows registry
  20. - ✅ **Multi-unit support** — mm, cm, inch, meter, foot
  21. - ✅ **Modular architecture** — clean, extensible Python package
  22. - ✅ **Robust error handling** — cascading fallback chains for COM API
  23. - ✅ **JSON configuration** — easy to customize without touching code
  24. - ✅ **Comprehensive logging** — full debug output for troubleshooting
  25. ---
  26. ## 🛠️ Available Tools
  27. | Category | Tool | Description |
  28. |----------|------|-------------|
  29. | **Connection** | `connect_solidworks` | Connect to running SolidWorks instance |
  30. | **Connection** | `get_solidworks_info` | Get version and installation info |
  31. | **Documents** | `create_new_part` | Create a new part document |
  32. | **Documents** | `create_new_assembly` | Create a new assembly document |
  33. | **Documents** | `open_document` | Open an existing SolidWorks file |
  34. | **Documents** | `close_document` | Close the active document |
  35. | **Documents** | `save_document` | Save the active document |
  36. | **Documents** | `list_open_documents` | List all open documents |
  37. | **Sketches** | `create_sketch` | Create a sketch on a plane (Front/Top/Right) |
  38. | **Sketches** | `close_sketch` | Exit the active sketch |
  39. | **Sketches** | `draw_circle` | Draw a circle by center and radius |
  40. | **Sketches** | `draw_rectangle` | Draw a rectangle by two corners |
  41. | **Sketches** | `draw_line` | Draw a line between two points |
  42. | **Sketches** | `draw_arc` | Draw an arc by center and angles |
  43. | **Sketches** | `draw_polygon` | Draw a regular polygon (triangle, hex, etc.) |
  44. | **Features** | `extrude_sketch` | Boss-extrude the active sketch |
  45. | **Features** | `cut_extrude` | Cut-extrude to remove material |
  46. | **Features** | `fillet_edges` | Add fillets to selected edges |
  47. | **Features** | `chamfer_edges` | Add chamfers to selected edges |
  48. | **Features** | `list_features` | List all features in the model |
  49. | **Utilities** | `set_units` | Change default unit (mm/inch/cm/m/ft) |
  50. | **Utilities** | `execute_python` | Execute custom Python code in SW context |
  51. ---
  52. ## 📋 Requirements
  53. - **OS:** Windows 10 or Windows 11
  54. - **SolidWorks:** 2023, 2024, or 2025 (must be installed and licensed)
  55. - **Python:** 3.10 or higher
  56. - **Claude:** Claude Desktop app or Claude Code
  57. ---
  58. ## ⚡ Quick Start
  59. ### 1. Clone the Repository
  60. ```bash
  61. git clone https://github.com/alisamsam/solidworks-mcp.git
  62. cd solidworks-mcp
  63. ```
  64. ### 2. Install Dependencies
  65. ```bash
  66. pip install -r requirements.txt
  67. ```
  68. ### 3. Configure Claude Desktop
  69. Add the following to your `claude_desktop_config.json`:
  70. **Location:** `C:\Users\YOUR_NAME\AppData\Roaming\Claude\claude_desktop_config.json`
  71. ```json
  72. {
  73. "mcpServers": {
  74. "solidworks": {
  75. "command": "python",
  76. "args": ["C:\\path\\to\\solidworks-mcp\\solidworks_mcp_server.py"]
  77. }
  78. }
  79. }
  80. ```
  81. ### 4. Launch
  82. 1. Open **SolidWorks** first
  83. 2. Restart **Claude Desktop**
  84. 3. In Claude, type: *"Connect to SolidWorks"*
  85. 4. Start designing! 🎉
  86. ---
  87. ## 📁 Project Structure
  88. ```
  89. solidworks-mcp/
  90. ├── solidworks_mcp_server.py # Entry point
  91. ├── solidworks_mcp/ # Main package
  92. │ ├── __init__.py # Package exports (v3.0.0)
  93. │ ├── server.py # MCP server & tool definitions
  94. │ ├── config.py # Configuration management
  95. │ ├── config.json # Default settings
  96. │ ├── constants.py # SolidWorks constants & enums
  97. │ ├── automation/ # Core automation modules
  98. │ │ ├── base.py # Connection management
  99. │ │ ├── documents.py # Document operations
  100. │ │ ├── sketches.py # Sketch operations
  101. │ │ └── features.py # Feature operations (SW 2025 fixed)
  102. │ └── utils/ # Utility modules
  103. │ ├── units.py # Unit conversion system
  104. │ └── sw_finder.py # Auto-detect SolidWorks
  105. ├── requirements.txt
  106. ├── .gitignore
  107. └── DEVELOPMENT_ROADMAP.md # Future development plan
  108. ```
  109. ---
  110. ## ⚙️ Configuration
  111. Edit `solidworks_mcp/config.json` to customize behavior:
  112. ```json
  113. {
  114. "exe_path": "auto",
  115. "default_unit": "mm",
  116. "startup_timeout": 120,
  117. "log_level": "INFO",
  118. "default_extrude_depth": 10.0,
  119. "default_fillet_radius": 2.0
  120. }
  121. ```
  122. | Setting | Default | Description |
  123. |---------|---------|-------------|
  124. | `exe_path` | `"auto"` | Path to SLDWORKS.exe or auto-detect |
  125. | `default_unit` | `"mm"` | Default unit for all dimensions |
  126. | `startup_timeout` | `120` | Seconds to wait for SW startup |
  127. | `log_level` | `"INFO"` | Logging verbosity |
  128. ---
  129. ## 🔧 SolidWorks 2025 Compatibility
  130. This server includes special handling for SolidWorks 2025 API changes:
  131. - **Extrusion fallback chain:** `FeatureExtrusion3` → `FeatureExtrusion2` → `FeatureBossSimple`
  132. - **Safe property access** for `feat.Name`, `feat.GetTypeName2()`, `IsSuppressed2()`
  133. - **stdout capture** fix for `execute_python` tool
  134. - **Registry-based** SolidWorks auto-detection
  135. ---
  136. ## 🤝 Contributing
  137. Contributions are welcome! Please:
  138. 1. Fork the repository
  139. 2. Create a feature branch: `git checkout -b feature/my-feature`
  140. 3. Commit your changes: `git commit -m "Add my feature"`
  141. 4. Push to the branch: `git push origin feature/my-feature`
  142. 5. Open a Pull Request
  143. ---
  144. ## 📄 License
  145. This project is licensed under the **MIT License** — see the [LICENSE](LICENSE) file for details.
  146. ---
  147. ## 👤 Author
  148. **Samsaam Ali Baig**
  149. - GitHub: [@alisamsam](https://github.com/alisamsam)
  150. ---
  151. ## 🙏 Acknowledgements
  152. - [Anthropic](https://anthropic.com) for Claude AI and the MCP framework
  153. - [SolidWorks](https://www.solidworks.com) COM API documentation
  154. - Inspired by [ros2-claude-code-template](https://github.com/harunkurt/ros2-claude-code-template) by Harun KURT
  155. ---
  156. ⭐ **If this project helps you, please give it a star!**

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.