- Home
- MCP servers
- OpenSCAD
OpenSCAD
- python
45
GitHub Stars
python
Language
4 months ago
First Indexed
3 weeks ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"quellant-openscad-mcp": {
"command": "uv",
"args": [
"run",
"--with",
"git+https://github.com/quellant/openscad-mcp.git",
"openscad-mcp"
],
"env": {
"MCP_HOST": "localhost",
"MCP_PORT": "8000",
"MCP_TEMP_DIR": "/tmp/openscad-mcp",
"MCP_LOG_LEVEL": "INFO",
"MCP_TRANSPORT": "stdio",
"OPENSCAD_PATH": "YOUR_OPENSCAD_PATH",
"MCP_CACHE_ENABLED": "true",
"MCP_CACHE_SIZE_MB": "500",
"MCP_RENDER_TIMEOUT": "300",
"MCP_CACHE_TTL_HOURS": "24",
"MCP_MAX_FILE_SIZE_MB": "10",
"MCP_MAX_CONCURRENT_RENDERS": "5"
}
}
}
}You can run the OpenSCAD MCP Server to render, export, and analyze 3D models using OpenSCAD through a Model Context Protocol (MCP) interface. This server enables AI assistants to interact with OpenSCAD projects by rendering views, exporting formats, validating code, and managing models efficiently within your workspace.
How to use
You connect to the OpenSCAD MCP Server using an MCP client and issue tools to render, export, or analyze models. Start the server locally and point your client at the server’s transport channel. Use the available tools to render single views, render multiple perspectives in parallel, export models to various file formats, validate OpenSCAD code for syntax errors, and examine model metadata and dependencies. You can also manage your project files, clear render caches, and inspect libraries installed for OpenSCAD.
How to install
Prerequisites you need before installing: OpenSCAD must be installed on your system. You should have a runtime capable of running MCP servers, such as uv (Ultraviolet) for Python, with Python 3.10 or newer recommended.
uv run --with git+https://github.com/quellant/openscad-mcp.git openscad-mcp
If OpenSCAD is not on your PATH, specify its location using OPENSCAD_PATH in your environment, then start the server with the same run command.
uv run --with git+https://github.com/quellant/openscad-mcp.git openscad-mcp
Optionally, you can configure the MCP server for different environments or editors by placing configuration blocks in your editor’s project file, or by using a YAML configuration file for advanced setup.
Configuration and usage notes
The server supports a variety of configuration methods and environment variables to tailor its behavior. You can set the path to OpenSCAD, rendering limits, caching, transport type, and other operational parameters. Ensure you align the transport with your client, and set concurrency, timeouts, and file size limits to suit your workflow.
Project-specific setup (example configurations)
For editor integrations, you can add a local MCP configuration block to your project to connect to the OpenSCAD MCP Server. See examples in the configuration section for how to reference the server from your environment.
Security considerations
The server validates file paths and restricts certain operations to prevent unsafe execution. It enforces file size limits, validates variable names, and applies a configurable subprocess timeout to guard against runaway renders. Model names must be alphanumeric and may include hyphens/underscores to avoid path traversal.
Troubleshooting
If you encounter issues starting the server or rendering, verify that OpenSCAD is installed and reachable via OPENSCAD_PATH. Check that your MCP transport and host/port settings are correct, and review render timeouts and cache settings to diagnose performance problems.
Notes
This MCP server is built with FastMCP for Python and leverages a modular tool set to render, export, and analyze OpenSCAD projects. You can use it in CLI workflows, editor integrations, or AI-assisted environments to streamline OpenSCAD model work.
Available tools
render_single
Render a single view with camera control, quality presets, and view presets.
render_perspectives
Render multiple standard views (front, back, left, right, top, bottom, isometric) in parallel.
compare_renders
Display side-by-side before/after renders to compare changes.
export_model
Export the model to STL, 3MF, AMF, OFF, DXF, or SVG formats.
create_model
Create a new .scad file in the workspace.
get_model
Read a model file and its metadata.
update_model
Update an existing model's content.
list_models
List all models in the workspace.
delete_model
Delete a model file.
validate_scad
Syntax-check code without a full render; returns errors, warnings, and echo output.
analyze_model
Compute bounding box, dimensions, and triangle count via STL export.
get_libraries
Discover installed OpenSCAD libraries.
check_openscad
Verify OpenSCAD installation and version.
get_project_files
List .scad files and their include/use dependency graph.
clear_cache
Clear the render cache.