SolidWorks MCP Server
Click on "Install 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 ServerCreate a new part with a 50mm circle extruded 20mm"
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.
SolidWorks MCP Server
通过 MCP 协议连接 Claude Code 和 SolidWorks,实现自然语言控制 SolidWorks 画图。
工作原理
用户自然语言 → Claude Code → MCP Server → SolidWorks COM API → 3D 模型Related MCP server: SolidWorks MCP Server
环境要求
Windows 10/11
SolidWorks 2020 或更高版本
Python 3.10+
Claude Code CLI
安装步骤
1. 克隆项目
git clone <your-repo-url>
cd solidworks-mcp2. 安装依赖
pip install -r requirements.txt3. 配置 Claude Code
在项目根目录创建 .claude/settings.json:
{
"mcpServers": {
"solidworks": {
"command": "python",
"args": ["-m", "server.mcp_server"],
"cwd": "<项目绝对路径>"
}
}
}或者在全局配置 ~/.claude/settings.json 中添加同样的配置。
使用方法
1. 启动 SolidWorks
确保 SolidWorks 已经打开。
2. 启动 Claude Code
claude3. 开始对话
直接用自然语言描述你要画什么:
基础操作:
"帮我创建一个新零件"
"在前视基准面画一个 100x50 的矩形"
"拉伸 30mm"
"保存到 D:\models\test.sldprt"
进阶操作:
"画一个直径 50 高 80 的圆柱"
"在顶面开一个直径 10 的通孔"
"对所有边做半径 5 的圆角"
"把这个特征镜像到右边"
复合操作:
"画一个 100x50x30 的长方体,在顶面中心开一个直径 8 的通孔,然后对所有边做圆角"
支持的 MCP Tools
Tool | 功能 |
| 创建新零件 |
| 创建新装配体 |
| 创建新工程图 |
| 打开现有文档 |
| 保存文档 |
| 导出 STEP |
| 关闭文档 |
| 创建草图 |
| 画线段 |
| 画圆 |
| 画弧 |
| 画矩形 |
| 画中心矩形 |
| 画正多边形 |
| 退出草图 |
| 拉伸凸台 |
| 拉伸切除 |
| 旋转 |
| 圆角 |
| 倒角 |
| 抽壳 |
| 镜像 |
| 线性阵列 |
| 圆周阵列 |
| 创建基准面 |
| 创建基准轴 |
| 删除特征 |
| 撤销 |
| 尺寸标注 |
| 缩放至适合 |
| 重建模型 |
| 获取模型信息 |
| 列出特征 |
故障排除
无法连接 SolidWorks
确保 SolidWorks 已启动
检查 SolidWorks 版本是否支持 COM 自动化
以管理员权限运行 Python
MCP Server 启动失败
检查 Python 版本:
python --version检查依赖是否安装:
pip list | grep mcp检查
cwd路径是否正确
操作执行失败
检查草图是否封闭
检查尺寸参数是否合理
使用
sw.get_model_info查看当前状态
开发
项目结构
solidworks-mcp/
├── .claude/skills/solidworks.md # Skill 定义
├── server/
│ ├── __init__.py
│ ├── mcp_server.py # MCP Server 入口
│ └── sw_api.py # SolidWorks COM 封装
├── requirements.txt
├── pyproject.toml
└── README.md扩展新功能
在
sw_api.py中添加新的 API 方法在
mcp_server.py中注册对应的 MCP tool在
.claude/skills/solidworks.md中更新操作指南
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
- Alicense-qualityCmaintenanceConnect Claude AI to Dassault Systemes CATIA V5 via the Model Context Protocol (MCP). Drive CATIA V5 CAD modeling from Claude Desktop or Claude Code using natural language.62MIT
- Flicense-qualityDmaintenanceEnables Claude to create and manipulate SolidWorks CAD models through natural language commands, automating part creation, sketching, and extrusion.8
- Alicense-qualityCmaintenanceEnables AI (e.g., Claude) to control SolidWorks via natural language, automating part creation, sketching, and feature operations through the Model Context Protocol.1MIT
- Alicense-qualityCmaintenanceEnables connecting MCP clients to local SolidWorks for automated 3D part creation, template generation, file export, and basic review via natural language.1MIT
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Augments MCP Server - A comprehensive framework documentation provider for Claude Code
Self-hosted MCP gateway: turn any API, database or MCP server into AI connectors — no code.
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/DongZiJie1/solidworks-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server