{
  "markdown": "# OpenSCAD MCP Server\n\n[![npm version](https://img.shields.io/npm/v/openscad-mcp-server.svg)](https://www.npmjs.com/package/openscad-mcp-server)\n[![npm downloads](https://img.shields.io/npm/dt/openscad-mcp-server.svg)](https://www.npmjs.com/package/openscad-mcp-server)\n[![CI](https://github.com/fboldo/openscad-mcp-server/actions/workflows/ci.yml/badge.svg)](https://github.com/fboldo/openscad-mcp-server/actions/workflows/ci.yml)\n\nAn 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).\n\n⚠️ **Beta**  \nThis MCP server is currently in beta. Performance, APIs, and capabilities may change. Issues and contributions are welcome.\n\n## Use cases\n\n- **Iterative agent-driven modeling**  \n  Agents generate or modify OpenSCAD source, render PNG previews to evaluate shape and proportions, and refine the model across multiple turns.\n\n- **Geometry artifact generation within MCP contexts**  \n  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.\n\n- **Visual grounding for parametric design**  \n  PNG previews provide visual grounding for parametric or programmatic SCAD code, reducing hallucination and enabling agents to reason about spatial changes.\n\n- **Design validation and comparison**  \n  Agents can render multiple variants of a model (e.g. parameter sweeps) and visually compare results before deciding which geometry to persist or export.\n\n## Available Tools\n\n- `render_scad_png`: Renders a PNG preview image from SCAD source.\n  - Input: `scadCode` (string), optional `width`/`height` (numbers), optional `cameraPreset` and optional `cameraPosition`\n    - `cameraPreset`: one of `isometric`, `front`, `back`, `left`, `right`, `top`, `bottom`\n    - `cameraPosition`: `{ x, y, z }`\n  - Output: MCP `ImageContent`\n- `export_scad_stl`: Exports an STL generated from SCAD source.\n  - Input: `scadCode` (string), optional `filename` (string)\n  - Output: MCP embedded resource (STL)\n\n## Skill\n\nThis repository also includes an [OpenSCAD iterative modeling skill](skills/openscad-iterative-modeling/SKILL.md) that demonstrates how to use this MCP server to support an iterative SCAD → PNG → critique → refine loop.\n\n## Limitations\n\n- **Performance**: Rendering complex SCAD models can be slow, especially in a WASM environment.\n- **Feature support**: Not all OpenSCAD features may be fully supported or may have limitations in the WASM version.\n- **Fonts**: Text rendering is not currently supported. Support is planned for a future release.\n\n## Installation\n\nThe published package is intended to run over stdio. Configure it in your MCP client using `npx`:\n\n```json\n{\n  \"mcpServers\": {\n    \"openscad\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"openscad-mcp-server\"]\n    }\n  }\n}\n```\n\n### Using the Skill\n\n[Agents skills](https://github.com/agentskills/agentskills) are a simple, open format for giving agents new capabilities and expertise.\n\nThe most straightforward to use the OpenSCAD iterative modeling skill is to install it using the [skills CLI](https://github.com/vercel-labs/skills):\n\n```bash\nnpx skills add fboldo/openscad-mcp-server --skill openscad-iterative-modeling\n```\n\n## Local development\n\n- Install deps: `bun install`\n- Stdio (matches how clients run it): `bun index.ts --stdio`\n- HTTP (useful for manual testing): `bun index.ts`\n  - Port: `MCP_PORT` (default `3000`)\n  - Endpoints: `GET /health`, MCP at `POST /mcp`\n- MCP Inspector: `bun run dev`\n\n## Similar Projects\n\n- [jhacksman/OpenSCAD-MCP-Server](https://github.com/jhacksman/OpenSCAD-MCP-Server)\n  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.\n\n- [petrijr/openscad-mcp](https://github.com/petrijr/openscad-mcp)\n  Similar to this project, but it uses a Python-based server and relies on the OpenSCAD CLI for rendering.\n\n## Relevant Links\n\n- [OpenSCAD](https://openscad.org/)\n- [OpenSCAD WASM](https://github.com/openscad/openscad-wasm)\n- [Model Context Protocol (MCP)](https://modelcontextprotocol.org/)\n- [Bun](https://bun.sh/)\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n",
  "bytes": 4531,
  "sha": "8313f883f79aaff8866596bb80325d6d9dd4137caa480985832a5f434f305132",
  "repo_slug": "fboldo/openscad-mcp-server",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_fboldo_openscad_mcp_server_3a05bc59/readme"
}