swlamp-mcp
Integrates with SolidWorks 2025 desktop via COM to build sheet-metal lamp parts, generate shop-ready flat DXF files, export SLDPRT/3MF/STL, capture screenshots, measure geometry, and validate dimensions and flat patterns.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MakerSG SolidWorks MCP (swlamp-mcp)
MCP server mã nguồn mở để Claude thiết kế đèn decor bằng tôn (cắt laser, chấn) trên SolidWorks 2025. Claude viết bản mô tả (spec) YAML cho một mẫu đèn. Với mỗi đơn hàng, server dựng part sheet metal trong SolidWorks đang mở và tạo một thư mục riêng cho đơn, gồm:
DXF phẳng cho xưởng (
CUT,BEND_UP,BEND_DOWN, đơn vị mm);file SLDPRT, 3MF, STL;
ảnh xem trước;
bản tóm tắt.
English: an open-source MCP server that lets Claude design flat-pack sheet-metal decor lamps in SolidWorks 2025, from a YAML spec to a per-order folder of shop-ready flat DXF (CUT / BEND_UP / BEND_DOWN), SLDPRT, 3MF and STL. Windows only.
Làm được gì
Hộp hoặc khay từ 0 đến 4 vách. Mỗi vách có thể có mép gập vào trong hoặc open hem. Không có vách nào thì part là một tấm phẳng (nắp, đế).
Lỗ tròn, hoa văn lưới hoặc lục giác, hình DXF/SVG cắt xuyên.
Chữ khắc cắt xuyên. Lõi của các chữ có vòng kín như O, A, D được tự nối cầu nên không rơi ra.
Khớp tab-slot giữa các tấm để lắp không cần hàn. Khe được nới theo độ dày sơn tĩnh điện.
Mỗi đơn chỉ đổi tham số (kích thước, chữ, hoa văn). Template không bao giờ bị sửa.
Chi tiết in 3D: bạn tự dựng model tham số có biến toàn cục
ord_*. MCP sao chép model, đổi biến theo đơn rồi xuất 3MF/STL.Hiệu chỉnh hệ số K bằng thanh thử chữ L. K được lưu theo xưởng, vật liệu, độ dày và độ mở cối V.
DXF chỉ được giao khi cả hai cổng kiểm đều đạt:
part SolidWorks dựng ra khớp kích thước ngoài trong spec trong 0.05 mm, kiểm cả khung bao lẫn từng đặc điểm (đỉnh mỗi vách, mép trong của mép gập, đầu hem, đỉnh tab);
flat pattern của SolidWorks khớp file DXF trong 0.05 mm.
Phiên bản đã kiểm: SolidWorks 2025 SP5 (bản desktop), Windows 10, Python 3.11. Phiên bản SW khác chưa kiểm; nếu bạn chạy được hoặc gặp lỗi, hãy báo lại.
Related MCP server: solidworks-mcp
Cài đặt
Yêu cầu: Windows, SolidWorks 2025 có license, uv.
git clone https://github.com/hub-makersg/makersg-solidworks-mcp.git
cd makersg-solidworks-mcp
uv sync
uv run swlamp-mcp --prepare # tạo sẵn wrapper COM cho SolidWorks 2025Đăng ký với Claude Code:
claude mcp add --transport stdio swlamp --scope user -- uv run --directory C:\duong\dan\makersg-solidworks-mcp swlamp-mcpVới Claude Desktop, thêm vào claude_desktop_config.json:
{ "mcpServers": { "swlamp": { "command": "uv", "args": ["run", "--directory", "C:\\duong\\dan\\makersg-solidworks-mcp", "swlamp-mcp"] } } }Mở SolidWorks trước khi gọi tool. MCP không tự khởi động SolidWorks.
Dùng thử
Mở SolidWorks 2025.
Nhờ Claude: "Kiểm
examples/box4-inox08.template.yamlrồi chạy đơnexamples/order-300.yaml".Kết quả nằm trong
Documents\swlamp-orders\o300\. Đọcsummary.mdtrước khi gửi xưởng.
Tool | Việc |
| Kiểm tra SolidWorks đang chạy |
| Kiểm luật gia công, tính bản phẳng (không cần SW) |
| Ảnh bản phẳng dự đoán (không cần SW) |
| Dựng và xuất trọn một đơn |
| Xem và đo part đang mở |
| Hiệu chỉnh hệ số K |
| Xuất 3MF/STL part đang mở |
Tool run_script (chạy Python tuỳ ý trong SolidWorks) chỉ xuất hiện khi đặt biến môi trường SWLAMP_ENABLE_SCRIPT=1.
Biến môi trường khác:
SWLAMP_OUTPUT_DIR: nơi tạo thư mục đơn.SWLAMP_CONFIG_DIR: nơi lưu bảng K, mặc định%APPDATA%\swlamp.
Trước khi gia công thật
Khi chưa hiệu chỉnh, K chỉ là giá trị tạm, và summary.md ghi rõ "K chưa hiệu chỉnh". Làm theo docs/calibration.md cho từng cặp xưởng + vật liệu + độ dày.
Tiêu chí ±0.5 mm áp cho kích thước ngoài đi qua tối đa 2 nếp gập, đo tại nếp gập.
Hiệu chỉnh chỉ có giá trị với nếp 90°. Hem 180° luôn ghi là chưa hiệu chỉnh.
Định dạng spec: docs/spec-format.md.
Phát triển
uv run ruff check
uv run pytest -m "not sw" # không cần SolidWorks
uv run pytest -m sw # cần SolidWorks 2025 đang mở; khoảng 10 phútGhi công
Dự án tham khảo ý tưởng (không sao chép mã) từ các repo MIT sau:
soheil-mp/solidworks-mcp: đặt tên tool sheet metal;
aryesil/SolidworksMCP: xuất flat pattern;
hjbaard/SolidWorks-MCP: lớp COM Python với early binding và luồng STA.
Quy tắc gia công lấy từ hướng dẫn công khai của Protolabs, Hubs, SendCutSend và TheFabricator.
Giấy phép và nhãn hiệu
Mã nguồn phát hành theo giấy phép MIT, © MakerSG Workshop và những người đóng góp.
Mọi thư viện phụ thuộc đều dùng giấy phép mở dễ dãi, tương thích với MIT: MIT, BSD, Apache-2.0, PSF, MIT-CMU (Pillow). Repo không đóng gói lại font, thư viện hay type library của SolidWorks. Wrapper COM được sinh trên máy người dùng từ bản SolidWorks có license của chính họ.
SOLIDWORKS là nhãn hiệu của Dassault Systèmes. Dự án này độc lập, không liên kết và không được Dassault Systèmes bảo trợ. Tên SOLIDWORKS chỉ được dùng để chỉ phần mềm mà dự án tương thích.
Made by MakerSG for the maker community.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Text-to-CAD: build exact STEP or 3MF/STL on the server, each stated requirement measured.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Edit AutoCAD and Revit MEP drawings from Claude or ChatGPT in plain English.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceEnables Claude to create and manipulate SolidWorks CAD models through natural language commands, automating part creation, sketching, and extrusion.12-
- AlicenseNot gradedqualityCmaintenanceEnables Claude Desktop to connect to SolidWorks via the COM API for automated sheet metal part analysis, including inspecting thickness, holes, bends, and exporting flat patterns as DXF.MIT
- AlicenseBqualityCmaintenanceEnables Claude or any MCP client to drive a live SOLIDWORKS session through its COM API, modeling parts, building assemblies with mates, checking interferences and machining feasibility, and exporting STEP or DXF files. It also exposes a local semantic index of the SOLIDWORKS API so the model can look up signatures, enums, and official examples before running arbitrary Python against the session.222MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to control SolidWorks through natural language, supporting part and assembly creation, sketches, advanced features, dimension editing, selection inspection, screenshots, and rebuilds.MIT