OpenSCAD

内容与创意

by fboldo

可将 OpenSCAD 代码渲染为 STL 和 PNG 文件,适合快速生成 3D 模型与预览图。

什么是 OpenSCAD

可将 OpenSCAD 代码渲染为 STL 和 PNG 文件,适合快速生成 3D 模型与预览图。

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), optional width/height (numbers), optional cameraPreset and optional cameraPosition
      • cameraPreset: one of isometric, front, back, left, right, top, bottom
      • cameraPosition: { x, y, z }
    • Output: MCP ImageContent
  • export_scad_stl: Exports an STL generated from SCAD source.
    • Input: scadCode (string), optional filename (string)
    • Output: MCP embedded resource (STL)

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:

json
{
  "mcpServers": {
    "openscad": {
      "command": "npx",
      "args": ["-y", "openscad-mcp-server"]
    }
  }
}

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:

bash
npx skills add fboldo/openscad-mcp-server --skill openscad-iterative-modeling

Local development

  • Install deps: bun install
  • Stdio (matches how clients run it): bun index.ts --stdio
  • HTTP (useful for manual testing): bun index.ts
    • Port: MCP_PORT (default 3000)
    • Endpoints: GET /health, MCP at POST /mcp
  • 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.

常见问题

OpenSCAD 是什么?

可将 OpenSCAD 代码渲染为 STL 和 PNG 文件,适合快速生成 3D 模型与预览图。

相关 Skills

主题工厂

by anthropics

Universal
热门

给幻灯片、文档、报告和 HTML 落地页快速套用专业配色与字体主题,内置 10 套预设风格并支持现场生成新主题,适合统一品牌或内容视觉。

主题工厂能帮你把幻灯片、文档到落地页快速统一视觉风格,内置 10 套主题,还能按需即时生成新主题。

内容与创意
未扫描114.1k

平面设计

by anthropics

Universal
热门

先生成视觉哲学,再落地成原创海报、艺术画面或其他静态设计,输出 .png/.pdf,强调构图、色彩与空间表达,适合需要高完成度视觉成品的场景。

做海报、插画或静态视觉稿时,用它能快速产出兼顾美感与版式的PNG/PDF成品,原创设计更省心,也更适合规避版权风险。

内容与创意
未扫描114.1k

内部沟通

by anthropics

Universal
热门

按公司常用模板和语气快速起草内部沟通内容,覆盖 3P 更新、状态报告、领导汇报、项目进展、事故复盘、FAQ 与 newsletter,适合需要统一格式的团队沟通场景。

按公司偏好的模板快速产出状态汇报、领导更新和 FAQ,既省去反复改稿,也让内部沟通更统一、更专业。

内容与创意
未扫描114.1k

相关 MCP Server

热门

免费的加密新闻聚合 MCP,汇集 Bitcoin、Ethereum、DeFi、Solana 与 altcoins 资讯源。

内容与创意
140

by ProfessionalWiki

让 Large Language Model 客户端无缝连接任意 MediaWiki 站点,可创建、更新、搜索页面,并通过 OAuth 2.0 安全管理内容。

内容与创意16 个工具
72

借助 86+ 个云端 media processing robots,处理视频、音频、图像和文档。

内容与创意
71

评论