SolidWorks MCP Server

SolidWorks MCP Server

Enables Claude to create and manipulate SolidWorks CAD models through natural language commands, automating part creation, sketching, and extrusion.

Category
访问服务器

README

SolidWorks MCP Server

A Model Context Protocol (MCP) server that enables Claude to create and manipulate SolidWorks CAD models through natural language commands.

Overview

This MCP server bridges Claude AI with SolidWorks, allowing you to create 3D CAD models by simply describing what you want. Claude can create sketches, draw shapes, and extrude features directly in SolidWorks.

Features

  • Automated Part Creation - Creates a new part document for each design request
  • Sketch Creation - Create sketches on Front, Top, or Right planes
  • Drawing Tools - Draw rectangles and circles with precise dimensions
  • Extrusion - Extrude sketches into 3D features with custom depth
  • Natural Language Interface - Describe what you want, and Claude builds it

Requirements

  • Windows OS (SolidWorks only runs on Windows)
  • SolidWorks 2022 or later (tested on SolidWorks 2024)
  • Python 3.8+
  • Claude Desktop App

Installation

1. Clone the Repository

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

2. Install Python Dependencies

pip install -r requirements.txt

requirements.txt:

mcp>=0.9.0
pywin32>=306

3. Configure Claude Desktop

Add the server to your Claude Desktop configuration file:

Location: %APPDATA%\Claude\claude_desktop_config.json

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

Replace C:\\path\\to\\solidworks-mcp\\server.py with the actual path to your server.py file.

4. Restart Claude Desktop

Close and reopen Claude Desktop to load the MCP server.

Usage

Basic Examples

Create a simple cube:

Create a 100mm cube in SolidWorks

Create a cylinder:

Create a cylinder in SolidWorks with a 50mm radius and 200mm height

Create a rectangular prism:

Make a box in SolidWorks that's 150mm long, 75mm wide, and 50mm tall

How It Works

  1. Claude creates a sketch on the specified plane (Front, Top, or Right)
  2. Claude draws shapes (rectangles, circles) with your dimensions
  3. Claude extrudes the sketch to create a 3D feature
  4. A new part is created for each request automatically

Available Tools

The MCP server provides these tools to Claude:

Tool Description
solidworks_create_sketch Create a new sketch on Front, Top, or Right plane
solidworks_sketch_rectangle Draw a rectangle with specified corner coordinates
solidworks_sketch_circle Draw a circle with center point and radius
solidworks_create_extrusion Extrude the current sketch to create a 3D feature
solidworks_exit_sketch Exit sketch editing mode

Testing

Run the included test script to verify your setup:

python test_solidworks.py

This will:

  1. Connect to SolidWorks
  2. Create a new part
  3. Draw a 100mm x 100mm rectangle
  4. Extrude it 100mm to create a cube

If successful, you'll see a cube in SolidWorks!

Troubleshooting

SolidWorks doesn't launch

  • Ensure SolidWorks is installed and activated
  • Try launching SolidWorks manually first

"Failed to connect to SolidWorks"

  • Check that SolidWorks is running
  • Run Claude Desktop as Administrator
  • Verify pywin32 is installed: pip install pywin32

"No Part template found"

  • Check that SolidWorks templates exist at: C:\ProgramData\SOLIDWORKS\SOLIDWORKS 2024\templates\
  • Update the template path in server.py if your templates are elsewhere

Tool errors in Claude

  • Check the log file: solidworks_mcp.log
  • Restart Claude Desktop
  • Verify the config file path is correct

Project Structure

solidworks-mcp/
├── server.py              # Main MCP server
├── test_solidworks.py     # Test script
├── requirements.txt       # Python dependencies
├── README.md             # This file
└── solidworks_mcp.log    # Log file (generated)

Technical Details

Units

  • Input dimensions are in millimeters (mm)
  • SolidWorks API uses meters internally (automatically converted)

Coordinate System

  • Origin (0, 0) is at the center of the sketch plane
  • Positive X is right, positive Y is up
  • Extrusions go in the positive Z direction (unless reversed)

Limitations

  • Currently supports basic sketches (rectangles and circles)
  • One sketch per part (creates new part for each design)
  • Limited to Boss-Extrude features

Future Enhancements

  • [ ] Additional sketch tools (lines, arcs, splines)
  • [ ] Sketch constraints and dimensions
  • [ ] Cut-Extrude features
  • [ ] Revolve, Sweep, Loft features
  • [ ] Assembly creation
  • [ ] Drawing generation
  • [ ] File save/export functionality

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details

Acknowledgments

Support

For issues and questions:

  • Open an issue on GitHub
  • Check the log file: solidworks_mcp.log

Note: This project is not affiliated with or endorsed by Dassault Systèmes SolidWorks Corporation.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选