MCP_CAD

MCP_CAD

A local MCP server for controlled SOLIDWORKS automation, exposing typed operations for parts, assemblies, configurations, drawings, inspection, and verification.

Category
Visit Server

README

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.

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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured