Skip to main content
Glama

SolidWorks MCP

by arhamgarg
AGPL 3.0
1

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

  1. Clone this repository:
    git clone https://github.com/arhamgarg/solidworks-mcp.git cd solidworks-mcp
  2. Install dependencies using uv:
    uv sync

Running the Server

To run the FastMCP server:

python server.py

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:

{ "mcpServers": { "solidworks-mcp": { "command": "uv", "args": [ "--directory", "/ABSOLUTE/PATH/TO/PARENT/FOLDER/solidworks-mcp", "run", "server.py" ] } } }

The tool will return a Markdown-formatted Python code block containing the generated SolidWorks automation script.

-
security - not tested
A
license - permissive license
-
quality - not tested

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.

  1. Features
    1. How it Works
      1. Getting Started
        1. Prerequisites
        2. Installation
        3. Running the Server
      2. Usage (via an MCP Client)

        Related MCP Servers

        • -
          security
          F
          license
          -
          quality
          This 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
        • -
          security
          A
          license
          -
          quality
          A 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 -
          23
          MIT License
          • Apple
          • Linux
        • -
          security
          F
          license
          -
          quality
          A 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
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          A 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 -
          4
          Python
          MIT License
          • Apple
          • Linux

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/arhamgarg/solidworks-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server