Skip to main content
Glama
danielproxd2

MCP_CAD

by danielproxd2

MCP_CAD

MCP_CAD is a local Model Context Protocol (MCP) server for controlled SOLIDWORKS automation. It exposes typed operations for parts, assemblies, configurations, drawings, inspection, verification, and reusable automation plans.

The core server communicates over standard input/output and can be used by any MCP client that supports local stdio servers. It does not require a particular model provider.

IMPORTANT

SOLIDWORKS is proprietary software and is not included with MCP_CAD. A licensed local installation is required for live CAD operation. This project is independent and is not affiliated with, endorsed by, or sponsored by Dassault Systèmes or SOLIDWORKS.

What is included

  • A Python MCP server built with FastMCP.

  • A constrained SolidWorksClient protocol with three execution backends.

  • Part, assembly, configuration, drawing, inspection, and verification tools.

  • Record-review-run plans for repeatable assembly, batch, and macro workflows.

  • A local part index for reuse-oriented searches.

  • A deterministic in-memory mock for development without SOLIDWORKS.

  • An optional C# in-process add-in backend.

Call the MCP tool list_capabilities for the authoritative runtime tool inventory. See docs/TOOLS.md for detailed tool documentation.

Related MCP server: comsol-mcp

Execution backends

Backend

Selection

Platform and purpose

Mock

MCP_CAD_USE_MOCK=1

In-memory development and automated tests. Does not open or modify SOLIDWORKS files.

pywin32 COM

Default

Live Windows backend. Drives a running local SOLIDWORKS process out of process through COM.

C# add-in

MCP_CAD_USE_ADDIN=1

Opt-in Windows backend. Routes implemented operations to the in-process add-in through a local named pipe and falls back to pywin32 COM for operations not yet ported.

The public tool surface uses millimetres for lengths and degrees for angles. Conversion to SOLIDWORKS-native units occurs at the backend boundary.

Some inputs accept localized SOLIDWORKS entity names, including English and Spanish default plane names. This is a compatibility feature for installations using different UI languages; the project documentation and API guidance use neutral English.

Requirements

For the core MCP server:

  • Python 3.10 or newer.

  • uv for the documented environment and run commands.

  • An MCP client that can start a local stdio server.

  • Windows, a licensed local SOLIDWORKS installation, and pywin32 for live operation.

macOS and Linux can run the mock backend for development, but cannot use the live COM backends.

Install

Clone the repository, then install the core server:

git clone <repository-url> MCP_CAD
cd MCP_CAD
uv sync

Start the server directly in mock mode to confirm that the Python entry point loads:

MCP_CAD_USE_MOCK=1 uv run mcp_cad

PowerShell equivalent:

$env:MCP_CAD_USE_MOCK = "1"
uv run mcp_cad

The process waits for MCP messages on standard input. It is normal for it to appear idle when launched without an MCP client.

Configure an MCP client

Configure your client to run uv run mcp_cad with this repository as its working directory. The exact configuration location and property names depend on the client. A common stdio-server shape is:

{
  "mcpServers": {
    "mcp_cad": {
      "command": "uv",
      "args": ["run", "mcp_cad"],
      "cwd": "C:\\path\\to\\MCP_CAD"
    }
  }
}

For a development session without SOLIDWORKS, add MCP_CAD_USE_MOCK=1 using the environment-variable syntax supported by your MCP client. Do not put model-provider API keys in the MCP_CAD server configuration; the core server does not need one.

Restart the MCP client after changing its server configuration. Then invoke:

  1. list_capabilities to confirm tool discovery.

  2. verify_setup to identify the active backend and check the SOLIDWORKS connection.

An inactive-document warning from verify_setup is expected when no part or assembly is open.

Live SOLIDWORKS setup

  1. Install the project on the Windows workstation that runs SOLIDWORKS.

  2. Make sure MCP_CAD_USE_MOCK is not set.

  3. Start SOLIDWORKS and open a part or assembly.

  4. Start or restart the MCP client.

  5. Invoke verify_setup.

The default live path is the out-of-process pywin32 COM backend. The C# add-in is optional; see addin/README.md for build, registration, verification, and removal instructions.

Privacy and safety boundary

MCP_CAD runs locally and exposes a bounded set of CAD operations; it does not itself provide a hosted model service. However, an MCP client or model provider may receive prompts, tool arguments, tool results, captured images, filenames, metadata, or other context that the client chooses to send. Review the client and provider configuration before using confidential designs.

The server does not make every operation read-only. Use source control or normal CAD backups, review tool calls, and test unfamiliar workflows on copies. Approval behavior is controlled by the MCP client or agent loop; do not assume every third-party MCP client will request confirmation before a mutating call.

Arbitrary VBA execution is disabled by default. Enabling it with MCP_CAD_ENABLE_UNSAFE_MACROS=1 accepts code-execution risk; source review and token scanning are not a sandbox.

Development

Lint and confirm the mock backend loads:

uv sync
uvx ruff check .
MCP_CAD_USE_MOCK=1 uv run mcp_cad

tools/addin_ping.py requires a live SOLIDWORKS session with the add-in enabled and must be run explicitly.

When adding a CAD operation, keep the protocol seam aligned:

  1. Add the method to SolidWorksClient.

  2. Implement deterministic mock behavior.

  3. Implement the pywin32 COM behavior.

  4. If appropriate, add or port the operation in the C# add-in.

  5. Expose the operation as an MCP tool.

Useful references:

License

Licensed under the Apache License, Version 2.0. Third-party components retain their own licenses — see NOTICE.

Install Server
A
license - permissive license
A
quality
B
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

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/danielproxd2/solidworks-mcp'

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