The OpenSCAD MCP Server enables AI assistants to render, export, analyze, and manage 3D models using OpenSCAD through a standardized protocol interface.
Rendering
Render single views with extensive camera control (position, target, up vector), image size, color schemes, view presets, and output format options
Render multiple standard perspectives (front, back, top, isometric, etc.) concurrently
Generate side-by-side before/after renders for visual comparison
Export & Model Management
Export models to STL, 3MF, AMF, OFF, DXF, or SVG
Create, read, update, list, and delete
.scadfiles in the workspace
Analysis & Validation
Validate OpenSCAD syntax without a full render, returning errors, warnings, and echo output
Analyze models to compute bounding box, dimensions, and triangle count
Discover installed OpenSCAD libraries
Verify OpenSCAD installation and retrieve version information
Project & Server Management
List project files with their
include/usedependency graphsClear the render cache
Security features include path validation, file size limits, variable name validation, and subprocess timeouts to prevent injection and abuse.
Provides 3D rendering capabilities for OpenSCAD models, including single view rendering with camera control, multiple perspective generation (orthographic and isometric views), and animation support for 360° model visualization.
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 Serverrender a cube with dimensions 50x50x50 from a 45-degree angle"
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 that gives AI assistants the ability to render, export, and analyze 3D models using OpenSCAD. Built with FastMCP for Python.
Prerequisites
Related MCP server: OpenSCAD MCP Server
Installation
Claude Code
Add the server with a single command:
Or, if OpenSCAD is not on your PATH:
Use the --scope flag to control where the configuration is saved:
Scope | Flag | Effect |
Local (default) |
| Available only to you in the current project |
Project |
| Shared with the team via |
User |
| Available to you across all projects |
Claude Desktop
Add to your configuration file:
macOS:
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows:
%APPDATA%\Claude\claude_desktop_config.json
Then restart Claude Desktop.
Cursor / Windsurf / VS Code
Add a .mcp.json file to your project root:
Manual / Standalone
Available Tools
Rendering
Tool | Description |
| Render a single view with camera control, quality presets, and view presets |
| Render multiple standard views (front, back, left, right, top, bottom, isometric) in parallel |
| Side-by-side before/after renders for visual comparison |
Export & Model Management
Tool | Description |
| Export to STL, 3MF, AMF, OFF, DXF, or SVG |
| Create a new |
| Read a model file and its metadata |
| Update an existing model's content |
| List all models in the workspace |
| Delete a model file |
Analysis & Validation
Tool | Description |
| Syntax-check code without a full render (errors, warnings, echo output) |
| Compute bounding box, dimensions, and triangle count via STL export |
| Discover installed OpenSCAD libraries |
| Verify OpenSCAD installation and version |
Project Support
Tool | Description |
| List |
| Clear the render cache |
Usage Examples
Once connected, ask your AI assistant:
"Render a cube with rounded edges"
"Show me this model from all angles"
"Export my gear model to STL"
"Compare the model before and after changing the radius to 15"
"Validate this OpenSCAD code for errors"
"What are the dimensions of this model?"
Tool Parameters
render_single
Parameter | Type | Default | Description |
| string | — | OpenSCAD code to render* |
| string | — | Path to |
| string | — | Preset view: |
| list/string |
| Camera eye position |
| list/string |
| Camera look-at point |
| list/string |
| Output dimensions |
| string |
| OpenSCAD color scheme |
| dict |
| OpenSCAD |
| string | — |
|
| list | — | Extra |
| string |
|
|
*Exactly one of scad_content or scad_file must be provided.
All parameter parsers accept multiple input formats (JSON strings, lists, dicts, CSV) for AI assistant compatibility.
Configuration
Environment Variables
Variable | Description | Default |
| Path to OpenSCAD executable | Auto-detected |
| Temporary file directory |
|
| Transport type: |
|
| Host for HTTP/SSE transport |
|
| Port for HTTP/SSE transport |
|
| Max parallel renders |
|
| Render timeout in seconds |
|
| Enable render caching |
|
| Max cache size in MB |
|
| Cache TTL in hours |
|
| Logging level |
|
| Max SCAD file size |
|
YAML Configuration
Create a config.yaml for advanced configuration:
Security
Path validation:
scad_fileandinclude_pathsvalidated against configurableallowed_pathsFile size limits: Content checked against
max_file_size_mbVariable name validation: Only
^[a-zA-Z_][a-zA-Z0-9_]*$allowed (prevents injection)Subprocess timeout: Configurable, default 300s
Model name validation: Alphanumeric, hyphens, and underscores only; no path traversal
Development
Project Structure
Testing
Tests mock the OpenSCAD subprocess — no OpenSCAD installation required to run them. Coverage target: 80% minimum.
Troubleshooting
OpenSCAD Not Found
Server Not Connecting
Render Timeout
Increase the timeout:
Contributing
Fork the repository
Create a feature branch (
git checkout -b feature/my-feature)Make your changes with tests
Ensure tests pass (
uv run pytest)Open a Pull Request
Commit style: feat:, fix:, docs:, refactor:, chore:
License
MIT — see LICENSE
Acknowledgments
FastMCP — Python MCP framework
OpenSCAD — Programmable CAD software
Model Context Protocol — The MCP specification