SolidWorks MCP Bridge
SolidWorks MCP Bridge 🌉 ⚙️
基于模型上下文协议(MCP)的服务器和集成桥接,用于将本地语言模型(通过Ollama)与SolidWorks的COM API进行通信。
允许像 qwen3:8b 和 qwen3:30b-a3b 这样的LLM以自动化、结构化的方式检查设计状态、分析特征树、读取尺寸、查询方程、提取物理质量属性以及导出技术文件。
🎯 项目范围
级别1(当前阶段 - 读取):对零件、装配体、尺寸、方程、质量和FEA研究进行非破坏性检查。
级别2(未来阶段 - 编辑):尺寸、全局变量的参数化修改以及受控重建。
级别3(未来阶段 - 生成):创建2D/3D草图、特征和自动化宏。
Related MCP server: solidworks-mcp
📂 项目结构
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🚀 安装与启动
1. 激活虚拟环境
.\sw-mcp-env\Scripts\activate2. 验证Ollama中的模型
请确保您拥有支持工具调用的模型可用:
ollama list
ollama show qwen3:8b3. 使用本地LLM测试工具调用
.\sw-mcp-env\Scripts\python scripts/test_tool_calling.py4. 运行测试套件
.\sw-mcp-env\Scripts\pytest tests/ -v5. 启动MCP服务器(stdio模式)
.\sw-mcp-env\Scripts\python -m sw_bridge.server --transport stdio🛠️ 可用工具(级别1)
工具 | 描述 |
| 检查SolidWorks是否通过COM响应。 |
| 获取类型、路径、配置和保存状态。 |
| 列出会话中加载的所有文档。 |
| 提取完整的特征树(FeatureManager)。 |
| 检查特征的定义和参数。 |
| 列出模型或特征的数值尺寸。 |
| 读取方程管理器中的方程和全局变量。 |
| 计算质量(kg)、体积、重心和惯性。 |
| 将活动模型导出为中性STEP格式。 |
| 将2D工程图或活动视图导出为PDF。 |
| 以PNG格式保存高分辨率截图。 |
| 列出有限元分析(FEA)研究。 |
| 查询von Mises应力和安全系数。 |
⚙️ 在Antigravity / Claude Desktop中配置为MCP服务器
将以下配置添加到您的MCP客户端:
{
"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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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 gradedqualityBmaintenanceMCP 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.
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server for generating rough-draft project plans from natural-language prompts.
MCP server for AI dialogue using various LLM models via AceDataCloud
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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/Said-AER/solidworks-mcp-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server