Allows access to the SolidWorks MCP code repository for installation and deployment of the automation server.
Generates Python scripts using pywin32 to automate SolidWorks operations, including creating parts and drawings.
Provides automation capabilities for SolidWorks, enabling the creation of parts and drawings through natural language requests translated into executable code.
SolidWorks MCP
This project implements an MCP server that provides a powerful tool for generating SolidWorks automation scripts using Python and the pywin32
library. It leverages a Large Language Model (LLM) to interpret user requests and produce runnable Python code for creating parts and drawings in SolidWorks.
Features
- SolidWorks Automation: Generate Python scripts to automate tasks within SolidWorks.
- LLM-Powered Code Generation: Utilizes an LLM to translate natural language requests into
pywin32
code. - Easy Integration: Designed as a FastMCP server, allowing seamless integration with MCP-compatible clients and assistants.
- Timestamped Saving: Generated scripts include logic to save SolidWorks parts with unique, timestamped filenames.
How it Works
The solidgen
tool exposed by this server takes a user request as input. It then constructs a detailed prompt for an LLM, instructing it to generate a Python script that uses pywin32
to perform the requested SolidWorks operation. The generated script includes boilerplate for initializing SolidWorks and saving the created part.
Getting Started
Prerequisites
- Python 3.x
fastmcp
pywin32
- Access to an LLM
- SolidWorks
Installation
- Clone this repository:
- Install dependencies using
uv
:
Running the Server
To run the FastMCP server:
Once running, the server will expose the solidgen
tool, which can be called by an MCP client.
Usage (via an MCP Client)
An MCP client can call the solidgen
tool with a user_request
string.
Example of how an MCP client might call the tool:
The tool will return a Markdown-formatted Python code block containing the generated SolidWorks automation script.
This server cannot be installed
An MCP server that generates Python scripts for automating SolidWorks tasks by translating natural language requests into executable pywin32 code for creating parts and drawings.
Related MCP Servers
- -securityFlicense-qualityThis is an MCP server that facilitates building tools for interacting with various APIs and workflows, supporting Python-based development with potential for customizable prompts and user configurations.Last updated -Python
Fused MCP Agentsofficial
-securityAlicense-qualityA Python-based MCP server that allows Claude and other LLMs to execute arbitrary Python code directly through your desktop Claude app, enabling data scientists to connect LLMs to APIs and executable code.Last updated -23MIT License- -securityFlicense-qualityA Python-based MCP server that dynamically fetches plugin definitions from SuperiorAPIs and auto-generates tool functions based on OpenAPI schemas, enabling seamless integration with API services.Last updated -Python
- -securityAlicense-qualityA template repository for creating custom Model Context Protocol (MCP) servers in Python that can be integrated with applications like Claude Desktop or Cursor.Last updated -4PythonMIT License