SolidWorks MCP Server logo

SolidWorks MCP Server

Community
vespo92

Solidworks MCP using Typescript

Publishervespo92
RepositorySolidworksMCP-TS
LanguageTypeScript
Forks
47
Stars
229
Available tools
0
Transport typestdio
Categories
LicenseMIT
Links
  • Connect tools to AI workflows

    SolidWorks MCP Server exposes MCP capabilities that can be used by compatible AI clients and agents.

  • 0 available tools

    Browse the callable actions below, including names and descriptions when provided by the server.

  • Ready-to-copy setup

    Use the installation snippets to configure this server in your preferred MCP client.

  • Open source signals

    229 stars and 47 forks from the linked repository.

SolidWorks MCP Server

TypeScript MCP Compatible Node.js License: MIT Windows

A Node.js MCP server for automating SolidWorks via COM interop. Connects AI assistants (Claude Desktop, etc.) to SolidWorks for CAD automation tasks.

Project Status: Alpha / Experimental

This project is under active development. While the architecture is in place and basic operations (sketch planes, simple extrusions) have been demonstrated, most tools have not been validated against a live SolidWorks instance. Expect rough edges, COM quirks, and incomplete functionality. Contributions and testing reports are very welcome.

How It Works

The server exposes SolidWorks operations as MCP tools over stdio. An intelligent routing layer handles a key limitation of Node.js COM bridges: methods with 13+ parameters often fail via direct COM calls.

  • Simple operations (12 params or fewer) - Direct COM call via winax
  • Complex operations (13+ params) - Auto-generated VBA macro executed by SolidWorks
  • Failed operations - Automatic fallback with error context

Prerequisites

  • Windows 10/11 (required - COM interop is Windows-only)
  • SolidWorks 2021-2025 (licensed, installed)
  • Node.js 20+
  • An MCP-compatible client (Claude Desktop, etc.)

Installation

bash
git clone https://github.com/vespo92/SolidworksMCP-TS.git
cd SolidworksMCP-TS

# Install dependencies (compiles winax native module for your system)
npm install

# Build TypeScript
npm run build

Note: The winax native module must be compiled locally on each Windows machine. Global npm installation does not work.

Configure Claude Desktop

Add to your claude_desktop_config.json:

json
{
  "mcpServers": {
    "solidworks": {
      "command": "node",
      "args": ["C:/path/to/SolidworksMCP-TS/dist/index.js"],
      "env": {
        "SOLIDWORKS_PATH": "C:\\Program Files\\SOLIDWORKS Corp\\SOLIDWORKS",
        "ADAPTER_TYPE": "winax-enhanced"
      }
    }
  }
}

Available Tools

The server registers tools across these categories:

CategoryToolsStatus
Modelingcreate_part, create_extrusion, create_revolve, create_sweep, create_loft, create_fillet, create_chamfer, etc.Partially tested
Sketchcreate_sketch, add_line, add_circle, add_rectangle, add_arc, add_constraints, dimension_sketchBasic ops verified
Drawingcreate_drawing_from_model, add_drawing_view, add_section_view, add_dimensions, etc.Untested
Exportexport_file (STEP, IGES, STL, PDF, DWG, DXF), batch_exportUntested
Analysisget_mass_properties, check_interference, measure_distance, check_geometryUntested
VBA Generationgenerate_vba_script, vba_sheet_metal, vba_configurations, vba_equations, etc.Code generation works; execution untested
Macromacro_start_recording, macro_stop_recording, macro_export_vbaUntested

"Partially tested" means the tool has been run against SolidWorks at least once but not comprehensively. "Untested" means only mock/unit tests exist (if any).

Architecture

MCP Protocol (stdio)
    |
Tool Registry (index.ts)
    |
Feature Complexity Analyzer --- routes by param count
    |                    |
Direct COM (winax)    VBA Macro Generator
    |                    |
    +--------------------+
    |
SolidWorks COM API

Key Design Decisions

  • COM parameter limit workaround: SolidWorks API methods like FeatureExtrusion3 take 20+ parameters. Node.js COM bridges choke on these. The complexity analyzer detects this and generates a VBA macro instead.
  • Never pass null to COM: Use undefined for optional parameters. COM interprets null as VT_NULL, causing type mismatch errors (this was the root cause of SelectByID2 failures).
  • Feature tree traversal over SelectByID2: FeatureByPositionReverse() + GetTypeName2() is more reliable for finding sketches than SelectByID2.
  • Winston logger only: Never use console.* - it corrupts the JSON-RPC stdio transport.

Development

bash
npm run build        # TypeScript compile
npm run dev          # Hot-reload dev server (tsx watch)
npm run check        # TypeScript + Biome lint in one command
npm run lint         # Biome lint check
npm run lint:fix     # Biome auto-fix
npm run format       # Biome format
npm run typecheck    # Type check without emit

Testing

See TESTING.md for the full testing guide.

bash
# Unit tests (mock adapter, no SolidWorks needed)
USE_MOCK_SOLIDWORKS=true npm test

# Watch mode
npm run test:watch

Current test status: Unit tests exist for config and environment utilities. Most tool modules lack test coverage. Integration tests require a Windows machine with SolidWorks and have not been run in CI.

Known Issues & Limitations

  • No CI integration testing - Tests only run against mocks. Real SolidWorks integration tests require a self-hosted Windows runner that doesn't exist yet.
  • winax compilation - Must be compiled locally on each machine. No pre-built binaries.
  • Edge.js adapter - Defined in architecture but not implemented.
  • PowerShell bridge - Defined in architecture but not implemented.
  • Connection pooling / circuit breaker - Referenced in code but not battle-tested.
  • Performance metrics are unverified - No real benchmarking has been done.

What Has Worked

Based on development testing:

  • Connecting to a running SolidWorks instance via COM
  • Creating sketch planes and basic sketch geometry
  • Simple extrusions with limited parameters
  • Feature tree traversal for sketch selection
  • VBA macro code generation (execution path needs more testing)

Roadmap

  • Comprehensive integration test suite on real SolidWorks
  • CI with self-hosted Windows runner
  • Validate all modeling tools end-to-end
  • Validate drawing and export tools
  • Edge.js adapter for .NET runtime path
  • PowerShell bridge as alternative COM path
  • Performance benchmarking with real metrics

Contributing

See CONTRIBUTING.md for guidelines.

Key areas where help is needed:

  • Testing against real SolidWorks - The biggest gap. If you have SolidWorks, running tools and reporting results is extremely valuable.
  • COM interop edge cases - Different SolidWorks versions behave differently.
  • Additional tool implementations - Many SolidWorks API methods aren't exposed yet.

Troubleshooting

For winax native build failures on Windows 11 Build 26200+ / VS 2022 BuildTools 17.14+ (issue #23) and other install-time problems, see TROUBLESHOOTING.md.

COM Registration Issues

powershell
regsvr32 "C:\Program Files\SOLIDWORKS Corp\SOLIDWORKS\sldworks.tlb"

Build Issues

bash
rm -rf node_modules dist
npm install
npm run build

Debug Logging

bash
ENABLE_LOGGING=true LOG_LEVEL=debug node dist/index.js

License

MIT - See LICENSE

Acknowledgments

  • winax - COM bridge for Node.js
  • Anthropic MCP - Model Context Protocol
  • SolidWorks API documentation

Installation

TypingMind
Prerequisites:

Node.js 18+

{
  "mcpServers": {
    "vespo92-solidworksmcp-ts": {
      "command": "",
      "args": []
    }
  }
}

Use SolidWorks MCP Server MCP with multiple AI models

TypingMind connects MCP tools at the workspace level, so once SolidWorks MCP Server is connected, you can use it with different AI models in TypingMind instead of setting it up separately for each model. This MCP runs locally through the TypingMind MCP connector on your device.

Setup guide to use the local connector

Use this when the MCP server needs access to local files, apps, or private resources on your computer.

1

Open the MCP settings

In TypingMind, go to Settings, Advanced Settings, then Model Context Protocol and choose Setup Connector.

  1. Open TypingMind in your browser.
  2. Click the Settings icon.
  3. Go to Advanced Settings.
  4. Open the Model Context Protocol section.
  5. Click Setup Connector and choose This Device.
TypingMind MCP connector setup screen with This Device selected
2

Run the connector command

Choose This Device, copy the command from TypingMind, and run it in Terminal. Keep the process running while you use MCP.

  1. Copy the setup command shown by TypingMind.
  2. Open Terminal on macOS or Windows Terminal on Windows.
  3. Paste and run the command.
  4. Approve the package install if Terminal asks you to proceed.
  5. Keep the Terminal window running while using MCP tools.
3

Add SolidWorks MCP Server as a server

When the connector status is Ready, click Edit Servers and paste the MCP server configuration.

  1. Wait until the connector status shows Ready.
  2. Click Edit Servers.
  3. Paste the SolidWorks MCP Server MCP server configuration.
  4. Save the server list.
  5. Refresh if you want to confirm the connector is still ready.
TypingMind MCP settings showing active server and Edit Servers button
{
  "mcpServers": {
    "vespo92-solidworksmcp-ts": {
      "command": "npx",
      "args": [
        "-y",
        "solidworks-mcp-server"
      ]
    }
  }
}
4

Use it across models

Save the server list, open Plugins, enable the SolidWorks MCP Server MCP tools, then select any supported AI model in TypingMind and use the tools in chat or assign them to an AI agent.

  1. Open the Plugins page in TypingMind.
  2. Enable the SolidWorks MCP Server MCP tools.
  3. Start a chat and choose the AI model you want to use.
  4. Use the MCP tools in chat or assign them to an AI agent.
  5. Switch to another AI model whenever needed without reconnecting MCP.
TypingMind chat using enabled MCP tools with a selected AI model
Can you use SolidWorks MCP Server to help me with this task?
SolidWorks MCP Server
Sure. I read it.
Here is what I found using SolidWorks MCP Server.

Frequently asked questions

What is the SolidWorks MCP Server MCP server used for?

SolidWorks MCP Server is an MCP server that lets compatible AI clients connect to external tools and context. In TypingMind, you can add this MCP server once and make its tools available in your AI workspace.

Can I use SolidWorks MCP Server MCP with multiple AI models in TypingMind?

Yes. TypingMind connects MCP tools at the workspace level, so you can use SolidWorks MCP Server with different AI models such as Claude, ChatGPT, Gemini, or other models you have configured in TypingMind without setting up the MCP server separately for each model.

Why use SolidWorks MCP Server MCP with TypingMind?

TypingMind is one of the best frontends for LLM chat because it brings multiple AI models, prompts, plugins, AI agents, API keys, and MCP tools into one workspace. With SolidWorks MCP Server connected, you can use its MCP tools across your preferred models while keeping your chat workflow organized in TypingMind.

How do I connect SolidWorks MCP Server MCP to TypingMind?

SolidWorks MCP Server runs through the TypingMind local MCP connector. This is best when the MCP server needs access to local files, desktop apps, command-line tools, or private resources on your computer.

What tools does SolidWorks MCP Server MCP provide in TypingMind?

SolidWorks MCP Server exposes MCP capabilities that can be enabled from the TypingMind Plugins page and used in chat or assigned to AI agents.

Do I need to share my API keys with TypingMind to use SolidWorks MCP Server MCP?

No. TypingMind is local-first and lets you keep your model providers, API keys, prompts, and MCP configuration under your control. If SolidWorks MCP Server requires authentication, add the required headers, OAuth settings, or local configuration for that MCP server when you create the connection.

Related MCP Servers

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇