SolidWorks MCP Bridge
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@SolidWorks MCP BridgeWhat are the mass properties of the active part?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
{"type": "text"}# SolidWorks MCP Bridge π βοΈ
Server and integration bridge based on Model Context Protocol (MCP) to communicate local language models (via Ollama) with the SolidWorks COM API.
Allows LLMs such as qwen3:8b and qwen3:30b-a3b to inspect the design state, analyze the feature tree, read dimensions, query equations, extract physical mass properties, and export technical files in an automated and structured way.
π― Project Scope
Level 1 (Current Phase - Reading): Non-destructive inspection of parts, assemblies, dimensions, equations, mass, and FEA studies.
Level 2 (Future Phase - Editing): Parametric modification of dimensions, global variables, and controlled rebuild.
Level 3 (Future Phase - Generation): Creation of 2D/3D sketches, features, and automated macros.
Related MCP server: solidworks-mcp
π Project Structure
LOCAL LLM/
βββ requirements.txt # Dependencias Python (mcp, pywin32, pydantic, ollama, etc.)
βββ pyproject.toml # ConfiguraciΓ³n del paquete y testing
βββ .env.example # Plantilla de variables de entorno
βββ .env # ConfiguraciΓ³n activa local
βββ src/
β βββ sw_bridge/
β βββ config.py # Carga de configuraciΓ³n (pydantic-settings)
β βββ logging_config.py # Logging estructurado JSON por sesiΓ³n
β βββ server.py # Servidor MCP (fastmcp / stdio / sse)
β βββ sw_connection/ # ConexiΓ³n COM a SolidWorks
β β βββ connector.py # Singleton y reconexiΓ³n automΓ‘tica
β β βββ exceptions.py # Excepciones tipadas
β β βββ models.py # Modelos de datos Pydantic
β βββ tools/ # Herramientas de Nivel 1
β βββ document_tools.py
β βββ feature_tree_tools.py
β βββ dimension_tools.py
β βββ mass_props_tools.py
β βββ export_tools.py
β βββ fea_tools.py
βββ tests/ # Pruebas automatizadas (pytest)
βββ scripts/
β βββ test_tool_calling.py # ValidaciΓ³n de llamadas a funciones con Ollama
β βββ smoke_test.py # Smoke test contra SolidWorks
βββ docs/ # Especificaciones y resoluciΓ³n de problemas
βββ alcance.md
βββ tool_schemas.md
βββ troubleshooting.mdπ Installation and Setup
1. Activate the virtual environment
.\sw-mcp-env\Scripts\activate2. Verify models in Ollama
Make sure you have the model with tool support available:
ollama list
ollama show qwen3:8b3. Test Tool Calling with the local LLM
.\sw-mcp-env\Scripts\python scripts/test_tool_calling.py4. Run Test Suite
.\sw-mcp-env\Scripts\pytest tests/ -v5. Start the MCP Server (stdio Mode)
.\sw-mcp-env\Scripts\python -m sw_bridge.server --transport stdioπ οΈ Available Tools (Level 1)
Tool | Description |
| Checks if SolidWorks is responding via COM. |
| Gets type, path, configurations, and saved state. |
| Lists all documents loaded in the session. |
| Extracts the complete feature tree (FeatureManager). |
| Inspects definition and parameters of a feature. |
| Lists numeric dimensions of the model or a feature. |
| Reads equations and global variables from the equation manager. |
| Calculates mass (kg), volume, center of gravity, and inertia. |
| Exports the active model to neutral STEP format. |
| Exports the 2D drawing or active view to PDF. |
| Saves a high-resolution screenshot in PNG format. |
| Lists finite element analysis (FEA) studies. |
| Queries von Mises stresses and safety factors. |
βοΈ Configuration as MCP Server in Antigravity / Claude Desktop
Add the following configuration to your MCP client:
{
"mcpServers": {
"solidworks-bridge": {
"command": "C:\\Users\\said\\Desktop\\LOCAL LLM\\sw-mcp-env\\Scripts\\python.exe",
"args": ["-m", "sw_bridge.server", "--transport", "stdio"],
"cwd": "C:\\Users\\said\\Desktop\\LOCAL LLM"
}
}
}This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
An MCP server that provides an API to LLMs to manage their JumpCloud resources.
MCP server unifying ERPs, CRMs, APIs and knowledge base for Claude, ChatGPT and Gemini.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceMCP server that exposes CAD geometry reasoning over STEP files to LLMs, allowing natural language queries about parts, assemblies, dimensions, holes, and mass properties.-
- AlicenseNot gradedqualityDmaintenanceMCP bridge server for SolidWorks that enables AI assistants to control SolidWorks programmatically via COM automation.MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI (e.g., Claude) to control SolidWorks via natural language, automating part creation, sketching, and feature operations through the Model Context Protocol.1MIT
- FlicenseNot gradedqualityCmaintenanceAn MCP server that drives SolidWorks 2023+ on Windows, exposing CAD operations like sketching, extrusions, assemblies, and exports through tools for AI assistants like Kimi and Claude.-