
OpenSCAD
io.github.fboldo由 GitHub 帳號 fboldo 發布v1.0.6更新於 Oct 24, 2026
Render STL and PNG from OpenSCAD code.
概覽
把 OpenSCAD 原始碼算繪成 PNG 預覽圖與 STL 幾何檔,讓助理能反覆迭代 CAD 模型。
- 可以做什麼
- 從 SCAD 原始碼算繪 PNG 預覽圖,可指定寬高、相機預設或相機座標
- 從 SCAD 原始碼匯出 STL 檔,可指定輸出檔名
- 以 MCP 影像內容與內嵌資源的形式回傳結果,供後續工具使用
- 適用情境
- 適合助理撰寫或修改 OpenSCAD 程式碼後需要查看結果、比較不同參數版本,或產出可交付幾何模型的場合。也適用於「產生—預覽—檢視—修正」的迭代式 CAD 工作流程。
- 執行需求
- 以 stdio 方式在本機執行,通常透過 npx 從 npm 套件啟動,需要 Node.js。另提供選用的 HTTP 模式,連接埠可設定。未宣告需要帳號、API 金鑰或環境變數。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 OpenSCAD,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
OpenSCAD MCP Server
[npm version] [npm downloads] [CI]
An MCP (Model Context Protocol) server that renders PNG previews and STL geometry from OpenSCAD (SCAD) source code. It is designed to support iterative, agent-driven CAD workflows, where models can be previewed visually and exported for downstream use (e.g. fabrication, simulation, or inspection).
⚠️ Beta
This MCP server is currently in beta. Performance, APIs, and capabilities may change. Issues and contributions are welcome.
Use cases
-
Iterative agent-driven modeling
Agents generate or modify OpenSCAD source, render PNG previews to evaluate shape and proportions, and refine the model across multiple turns. -
Geometry artifact generation within MCP contexts
Agents export STL files as concrete geometry artifacts that can be passed to downstream tools, stored, inspected, or handed off to other MCP-enabled systems. -
Visual grounding for parametric design
PNG previews provide visual grounding for parametric or programmatic SCAD code, reducing hallucination and enabling agents to reason about spatial changes. -
Design validation and comparison
Agents can render multiple variants of a model (e.g. parameter sweeps) and visually compare results before deciding which geometry to persist or export.
Available Tools
render_scad_png: Renders a PNG preview image from SCAD source.- Input:
scadCode(string), optionalwidth/height(numbers), optionalcameraPresetand optionalcameraPositioncameraPreset: one ofisometric,front,back,left,right,top,bottomcameraPosition:{ x, y, z }
- Output: MCP
ImageContent
- Input:
export_scad_stl: Exports an STL generated from SCAD source.- Input:
scadCode(string), optionalfilename(string) - Output: MCP embedded resource (STL)
- Input:
Skill
This repository also includes an OpenSCAD iterative modeling skill that demonstrates how to use this MCP server to support an iterative SCAD → PNG → critique → refine loop.
Limitations
- Performance: Rendering complex SCAD models can be slow, especially in a WASM environment.
- Feature support: Not all OpenSCAD features may be fully supported or may have limitations in the WASM version.
- Fonts: Text rendering is not currently supported. Support is planned for a future release.
Installation
The published package is intended to run over stdio. Configure it in your MCP client using npx:
To run it over HTTP instead (e.g. in Docker), pass --http:
The server exposes GET /health and a stateless streamable HTTP MCP endpoint at POST /mcp.
Using the Skill
Agents skills are a simple, open format for giving agents new capabilities and expertise.
The most straightforward to use the OpenSCAD iterative modeling skill is to install it using the skills CLI:
Local development
- Install deps:
bun install - Stdio (matches how clients run it):
bun index.ts --stdio - HTTP (useful for manual testing):
bun index.ts(or--http)- Port:
MCP_PORT(default3000) - Endpoints:
GET /health, MCP atPOST /mcp
- Port:
- MCP Inspector:
bun run dev
Similar Projects
-
jhacksman/OpenSCAD-MCP-Server This project provides a different approach relying on generating images from user prompts, followed by 3D reconstruction and even 3D printer discovery. It's a very interesting project, and I recommend checking it out if you are interested in OpenSCAD and MCP servers.
-
petrijr/openscad-mcp Similar to this project, but it uses a Python-based server and relies on the OpenSCAD CLI for rendering.
Relevant Links
License
MIT — see LICENSE.
來源:README.md,提交 66f7589
工具
0版本歷史
2- v1.0.6最新Sep 25, 2026
- v1.0.5Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分