OpenSCAD MCP Server
Allows creating and manipulating 3D CAD models using OpenSCAD, with capabilities to render to 3D mesh formats, generate 2D previews, validate syntax, and get OpenSCAD installation info.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@OpenSCAD MCP Server Create a 20mm cube and export as STL"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
OpenSCAD MCP Server
A Model Context Protocol (MCP) server for OpenSCAD - enables AI assistants to create and manipulate 3D CAD models.
Features
Render: Compile OpenSCAD code to 3D mesh formats (STL, OFF, AMF, 3MF, CSG)
Preview: Generate 2D previews (PNG, SVG, DXF, PDF) with camera controls
Validate: Check OpenSCAD syntax without generating output
Info: Get OpenSCAD installation information
Related MCP server: 3D MCP Server
Prerequisites
Node.js 18 or higher
OpenSCAD installed on your system
Installation
Via npm (Recommended)
npm install -g openscad-mcpFrom Source
# Clone the repository
git clone https://github.com/dkpoulsen/openscad-mcp.git
cd openscad-mcp
# Install dependencies and build
npm install
npm run buildUsage with Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
Using npx (after npm install)
{
"mcpServers": {
"openscad": {
"command": "npx",
"args": ["-y", "openscad-mcp"]
}
}
}Using local build
{
"mcpServers": {
"openscad": {
"command": "node",
"args": ["/path/to/openscad-mcp/dist/index.js"]
}
}
}Tools
render
Compile OpenSCAD code to a 3D mesh format.
Parameters:
scad(string, required): OpenSCAD code to compileformat(string, default: "stl"): Output format -stl,off,amf,3mf, orcsgparameters(object, optional): Variables to pass via -D flagsexportFormat(string, optional): For STL -asciistlorbinstlhardwarnings(boolean, default: true): Treat warnings as errors
preview
Generate a 2D preview or vector export.
Parameters:
scad(string, required): OpenSCAD code to previewformat(string, default: "png"): Output format -png,svg,dxf, orpdfwidth(number, default: 800): Image width in pixelsheight(number, default: 600): Image height in pixelscamera(string, optional): Camera positioncolorscheme(string, default: "Cornfield"): Color schemeprojection(string, default: "perspective"):orthoorperspectiveautocenter(boolean, default: true): Center the designviewall(boolean, default: true): Fit entire design in viewrender(boolean, default: false): Use full CGAL render
validate
Validate OpenSCAD syntax.
Parameters:
scad(string, required): OpenSCAD code to validateparameters(object, optional): Variables to define
info
Get OpenSCAD installation information.
Example Usage with AI Assistant
User: Create a simple 10x10x10 cube in OpenSCAD and render it to STL
AI: I'll create a cube and render it for you.
[Uses render tool with:]
scad: cube([10, 10, 10]);
format: stlColor Schemes
Available color schemes for PNG export:
Cornfield (default)
Metallic
Sunset
Starnight
BeforeDawn
Nature
Daylight Gem
Nocturnal Gem
DeepOcean
Solarized
Tomorrow
Tomorrow Night
ClearSky
Monotone
License
MIT
Available Tools
4 toolsinfoA
Get information about the OpenSCAD installation (version, features, library versions).
Inputs: no named parameters.
previewB
Generate a 2D preview of OpenSCAD code. Export as PNG image or vector formats (SVG, DXF, PDF). Use camera settings to control the view.
Inputs: scad (required), width, camera, format, +7 more.
renderA
Compile OpenSCAD code to a 3D mesh format (STL, OFF, AMF, 3MF, or CSG). Use this to generate 3D-printable files.
Inputs: scad (required), format, parameters, exportFormat, +1 more.
validateA
Validate OpenSCAD code syntax without generating output. Returns errors and warnings if any.
Inputs: scad (required), parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 4 tools
Each tool targets a distinct concern: render produces 3D meshes, preview produces 2D images/vectors, validate checks syntax, and info reports environment details. There is no meaningful overlap or ambiguity between tool purposes.
All tool names are single lowercase verbs in a consistent imperative style: render, preview, validate, info. The pattern is uniform and easy to predict.
Four tools is a well-scoped size for a specialized OpenSCAD server. Each tool serves a clear, necessary function without redundancy or bloat.
The tool surface covers the core OpenSCAD workflow: validate code, preview it in 2D, render it to 3D formats, and check the installation. There are no obvious dead ends or missing lifecycle operations for this domain.
Maintenance
Related MCP Connectors
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
A browser 3D CAD for your AI: it scripts real-size models, uCAD builds them and returns pictures.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Design 3D-printable parts by chatting: create, edit, render and publish parametric forges.
Related MCP Servers
- AlicenseAqualityAmaintenanceEnables AI assistants to render 3D models from OpenSCAD code, generating single views or multiple perspectives with full camera control. Supports animations, custom parameters, and returns base64-encoded PNG images for seamless integration.12449 PyPI170MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI-driven 3D model generation and manipulation using OpenSCAD through natural language commands. Users can create primitives, apply transformations, perform boolean operations, and export models to various formats like STL and OBJ.6 npmMIT
- AlicenseNot gradedqualityNot gradedmaintenanceEnables AI assistants to render 3D models by providing tools to execute OpenSCAD code and generate single or multi-perspective views. It returns high-quality PNG renderings directly to LLM applications for visual feedback and 3D model visualization.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to create and manipulate 3D models using OpenSCAD through MCP tools for code-based modeling, preview, and export.1MIT