mcp -solidworks
This MCP server integrates with SolidWorks API and structuring it into Claude-compatible context streams.
claude mcp add --transport stdio eyfel-mcp-server-solidworks python -m solidworks_mcp_server \ --env MCP_LOG_LEVEL="INFO" \ --env SOLIDWORKS_HOME="Path to SolidWorks installation or SOLIDWORKS API location" \ --env CLAUDE_CONTEXT_ENDPOINT="URL for Claude context if using remote LLM"
How to use
This MCP server provides Claude-compatible context streams derived from SolidWorks APIs. It uses a Python layer to orchestrate prompt generation and context building, a C# adapter layer to automate SolidWorks across versions, and a COM bridge via PythonNET to interface with the SolidWorks COM objects. To use it, run the server to start producing context blocks (e.g., dimensions, mates, assemblies) in a stream that a Claude-compatible LLM can consume. When interacting with the server, request specific context types (such as part dimensions, assembly hierarchies, feature trees, or mate relationships) and the server will emit structured context segments that can be fed into your LLM prompts. Tools available include: - Context extraction for parts, assemblies, dimensions, and mates - Version-aware SolidWorks adapter calls through the C# layer - COM-based operations via PythonNET - Prompt templates tailored for managing SolidWorks design intents and change propagation
How to install
Prerequisites: - Python 3.8+ installed on your system - SolidWorks installed with API access on the host machine - .NET SDK installed for the C# adapter build (if building from source) - Git to clone the repository
-
Clone the MCP SolidWorks server repository git clone https://github.com/your/repo-url.git cd repo-name
-
Set up a Python virtual environment and install dependencies python -m venv venv source venv/bin/activate # on macOS/Linux venv\Scripts\activate # on Windows pip install -r requirements.txt
-
Build or ensure the C# adapter DLLs are available
- If you have prebuilt DLLs, place them in the adapters/ directory
- If building from source, run:
dotnet build SolidWorksAdapter.sln -c Release
Copy resulting DLLs to adapters/ as needed
-
Configure environment variables (example) export SOLIDWORKS_HOME="/path/to/solidworks/api" export CLAUDE_CONTEXT_ENDPOINT="https://api.example.com/claude-context" export MCP_LOG_LEVEL=INFO
-
Run the MCP server python -m solidworks_mcp_server
-
Validate the server is up by hitting its MCP endpoint or logs
Example (adjust to your actual endpoint):
Additional notes
Tips & common issues: - Ensure SolidWorks API access is properly configured and the SOLIDWORKS_HOME path points to valid API assemblies. - The Python layer relies on a functioning COM bridge; verify PythonNET is installed and compatible with your SolidWorks version. - If the C# adapter targets specific SolidWorks versions, keep a mapping of version to adapter DLLs ready. - For remote Claude integration, set CLAUDE_CONTEXT_ENDPOINT and ensure network access between the MCP server and Claude context/LLM services. - Enable verbose logging (MCP_LOG_LEVEL=DEBUG) during troubleshooting to see context emission details.