npm openscad-mcp-serverstdioMITupdated 6mo ago
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).
What can you do with OpenSCAD?
OpenSCAD MCP Server
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:
{
"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:
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(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.
Install
Add OpenSCAD to your client. Pick the one you use.
claude mcp add openscad-mcp-server -- npx -y openscad-mcp-servercodex mcp add openscad-mcp-server -- npx -y openscad-mcp-serveramp mcp add openscad-mcp-server -- npx -y openscad-mcp-server{
"mcpServers": {
"openscad-mcp-server": {
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"openscad-mcp-server": {
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"openscad-mcp-server","command":"npx","args":["-y","openscad-mcp-server"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"openscad-mcp-server": {
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"openscad-mcp-server": {
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"openscad-mcp-server": {
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"openscad-mcp-server": {
"type": "local",
"command": "npx",
"args": [
"-y",
"openscad-mcp-server"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"openscad-mcp-server": {
"command": {
"path": "npx",
"args": [
"-y",
"openscad-mcp-server"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y openscad-mcp-serverRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
4 tools
OpenSCAD exposes 4 tools to a connected agent.
- render_scad_png
- Renders a PNG preview image from SCAD source.
- cameraPreset
- one of `isometric`, `front`, `back`, `left`, `right`, `top`, `bottom`
- cameraPosition
- `{ x, y, z }`
- export_scad_stl
- Exports an STL generated from SCAD source.
Score
61 / 100
Good
- Documentation21/25
- Maintenance9/25
- Trust13/20
- Capability6/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 200 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 4 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 1.0.5Latest | Feb 13, 2026 |
| 1.0.4 | Feb 11, 2026 |