MCP CAD Studio
io.github.mario-andreschak由 GitHub 帳號 mario-andreschak 發布v0.2.2更新於 Oct 25, 2026
A self-contained parametric CAD studio MCP server with an interactive MCP App.
概覽
一個本機參數化 CAD 伺服器,讓助理建立、編輯、驗證並匯出 3D 模型,還可在相容的宿主中開啟互動式 3D 工作室
- 可以做什麼
- 用形狀樹建立和編輯參數化模型,包含基本幾何、變換與巢狀布林樹,以及支架、齒輪、外殼等範本。管理已儲存的模型:列出、載入、複製、刪除,並透過修訂檢查就地修補或重新產生。在儲存前驗證草稿與匯入網格,提供拓撲診斷。匯入 STL/OBJ 資料並匯出 ASCII STL/OBJ。在支援 MCP Apps 的宿主中開啟互動式 3D 工作室;資料工具不需該介面也能使用。
- 適用情境
- 適合讓助理建構或調整參數化 3D 零件並匯出為 STL/OBJ,或讓人和代理在同一即時編輯器中處理同一批模型。適用於不需安裝原生 CAD 軟體的設計與原型製作。
- 執行需求
- 需要 Node.js 20 或更新版本;CAD 引擎與相依套件隨 npm 套件一併安裝,不需 OpenSCAD、Python、編譯器、Docker 或原生 CAD。預設透過 stdio 執行,也支援 Streamable HTTP/HTTPS。模型預設持久化到本機 JSON 檔案,可用資料檔案選項變更,或關閉以使用記憶體工作階段。未宣告身分驗證或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 MCP CAD Studio,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
MCP CAD Studio
A self-contained parametric CAD workspace delivered as an MCP server and an interactive MCP App. Agents can create and edit models through tools; people can work on the same models in a live 3D studio rendered inside any compatible host.
What it does
- Renders a full 3D editor through the
studio_uitool. - Creates boxes, spheres, cylinders, cones, polygon extrusions, imported meshes, transforms, and nested union/difference/intersection trees.
- Generates editable brackets, pipes, gears, enclosures, and bolts.
- Loads, patches, regenerates, and deletes persistent model documents with optimistic revision checks.
- Preflights extrusion outlines and raw meshes with actionable topology diagnostics before they reach the CAD kernel.
- Imports ASCII/binary STL and OBJ; exports ASCII STL and OBJ.
- Keeps an open app synchronized with model-initiated MCP tool calls.
- Runs over stdio or Streamable HTTP, with direct HTTPS support.
- Uses a bundled WebAssembly CAD kernel—no OpenSCAD, Python, compiler, Docker, or native CAD installation is needed.
The server's data tools are UI-independent. A client that cannot render MCP Apps can still perform every CAD operation and receive structured model/mesh data.
Install
Node.js 20 or later is the only runtime requirement. The CAD engine and all JavaScript dependencies install with the package.
Run the published npm package:
Or clone and build:
MCP client configuration (stdio)
Models persist by default to ~/.mcp-cad-studio/models.json. Use
--data-file <path> to choose another file or --no-persist for an in-memory
session.
HTTPS / Streamable HTTP
Run a local HTTPS endpoint with a generated self-signed certificate:
For a remotely reachable production server, use a trusted certificate:
The MCP endpoint is /mcp; a read-only health endpoint is available at
/health. TLS termination at a reverse proxy is also supported—run with
--transport http behind the proxy.
MCP tools
All mutating results include models, activeModel, and mesh in
structuredContent, so the UI and model see the same canonical state. Model
creation is reserved for genuinely separate models. For revisions, first call
load_model, then pass its modelId and revision back as
expectedRevision to update_model, generate_model, or delete_model.
Updating without creating copies
update_model preserves the model ID and supports either a complete replacement
shape or small RFC 6901 JSON-Pointer-style patches. This changes the X size of
a saved box without resending its whole definition:
Patches can target /shape, /name, or /color and are applied in order.
add, replace, and remove are supported. The completed definition is
schema-checked and geometry-checked before the saved model is changed.
For template-level edits, such as changing a gear's tooth count, call
generate_model with the existing modelId and expectedRevision. The
template is regenerated into the same document instead of creating another
model.
Parametric model format
create_model and update_model accept a recursive shape tree. For example, a
plate with a cylindrical hole:
Every node can include a transform:
Rotations use degrees. Dimensions are unit-agnostic in the kernel; the studio labels them as millimeters.
Shape objects are strict: misspelled or unsupported fields produce an error
instead of being silently ignored. validate_shape checks a draft without
saving and reports JSON paths, error codes, and suggested repairs. Checks
include:
- repeated, zero-length, zero-area, and self-intersecting extrusion outlines;
- incomplete or out-of-range mesh arrays and degenerate triangles;
- open boundaries, edges shared by too many faces, inconsistent winding, and disconnected surface fans at a vertex;
- shape-tree and twisted-extrusion complexity limits;
- final verification by the Manifold CAD kernel.
If the kernel still rejects a shape, its status is translated into guidance for non-finite vertices, non-manifold geometry, invalid construction, oversized results, and the other kernel status classes.
Architecture
The studio_ui tool links to ui://cad-studio/studio.html with
_meta.ui.resourceUri. The component uses the stable MCP Apps bridge
(ui/initialize, ui/notifications/*, and tools/call) rather than requiring
host-specific globals. Model polling is revision-aware, making external tool
edits visible in an already-open editor.
Development
npm run check performs strict TypeScript checking, 16 kernel/store/protocol/
transport tests, and a production build. The test suite uses the real
WebAssembly geometry engine and both in-memory and Streamable HTTP MCP clients.
Useful commands:
To publish the current version to npm:
The release command signs in through npm when necessary, runs the complete check suite, publishes the package publicly, and confirms that npm serves the version. It is safe to rerun: if that exact version is already published, it verifies the project and skips the duplicate publish.
Run npm run release:check to validate the release helper without publishing.
Security notes
- Tool schemas cap shape depth, node count, mesh size, and imported file size.
- Mutation tools accurately declare read-only/destructive/open-world hints.
expectedRevisionprevents accidental overwrites and stale deletion during concurrent editing.- Patch paths are restricted to editable model fields and reject prototype traversal.
- The app resource declares an empty external-resource/connect CSP.
- A generated self-signed certificate is intended for local development only.
- Authentication is deployment-specific. Put remote multi-user instances behind an authenticated gateway and enforce per-user authorization there.
License
MIT
來源:README.md,提交 a99589d
工具
0版本歷史
1- v0.2.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分