SO

sam-of-the-arth/solidworks-mcp

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

10 stars 7 forks Качество 58 Тренд 8

Automated CAD using Anthropic's Claude and Solidworks

Обзор

A Model Context Protocol (MCP) server that enables Claude to create and manipulate SolidWorks CAD models through natural language commands. 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. - - Creates a new part document for each design request - - Create sketches on Front, Top, or Right planes - - Draw rectangles and circles with precise dimensions - - Extrude sketches into 3D features with custom depth - - Describe what you want, and Claude builds it - (SolidWorks only runs on Windows) - (tested on SolidWorks 2024) - - Add the server to your Claude Desktop configuration file: %APPDATA%\Claude\claude_desktop_config.json Replace C:\path\to\solidworks-mcp\server.py with the actual path to your server.py file. Close and reopen Claude Desktop to load the MCP server.

README

Показан фрагмент оригинального 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
Открыть полный README на GitHub

Установка

This server does not publish a one-line install command.

Open the repository installation guide Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

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