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 "Install 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 ServerCreate 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
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/dkpoulsen/openscad-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server