openscad
A Model Context Protocol (MCP) server for OpenSCAD 3D modeling and rendering
claude mcp add --transport stdio quellant-openscad-mcp uv run --with git+https://github.com/quellant/openscad-mcp.git openscad-mcp \ --env OPENSCAD_PATH="/usr/bin/openscad"
How to use
This MCP server enables AI assistants to render, export, and analyze 3D OpenSCAD models. It leverages OpenSCAD via a Python-based FastMCP setup and exposes tools for rendering (single views, multiple perspectives, and side-by-side comparisons), exporting models to common formats, managing models in a workspace, and performing analysis and validation of OpenSCAD code. After connecting your assistant to the server, you can ask it to render with specific camera angles, export models to STL or other supported formats, validate syntax, or inspect libraries and dependencies. The available tools cover rendering, export and model management, analysis and validation, and project support, making it suitable for automated workflows and AI-assisted design review.
How to install
Prerequisites:
- OpenSCAD installed on your system
- Python environment with uv (via uv, or your preferred Python tool) installed
Installation steps:
-
Install uv if you don’t have it:
- macOS/Linux: pipx or pip install uvw, or follow uv installation instructions from https://uv.rocks
- Windows: follow uv installation docs and ensure it’s on your PATH
-
Clone the MCP server repository: git clone https://github.com/quellant/openscad-mcp.git cd openscad-mcp
-
Install dependencies (via uv): uv sync --dev
-
Run the server locally to confirm it works: uv run openscad-mcp
-
Optional: integrate with Claude or your editor by adding the MCP server configuration as shown in the README (see Claude Desktop/CLI examples).
Additional notes
Environment variables:
- OPENSCAD_PATH: Path to the OpenSCAD executable. If OpenSCAD is on your PATH, you can omit this.
- MCP_HOST / MCP_PORT: Configure the host and port for HTTP/SSE transports if you switch from stdio to network transports.
- MCP_MAX_CONCURRENT_RENDERS, MCP_RENDER_TIMEOUT, MCP_CACHE_ENABLED/Size/TTL: Tune performance and caching as needed.
Common issues:
- Ensure OpenSCAD is accessible at the path specified by OPENSCAD_PATH or on your system PATH.
- When using Claude integration, verify the scope (local/project/user) to control where configuration is saved.
- If you see module import or library discovery issues, check get_libraries and include_paths for valid OpenSCAD library paths.
Configuration tips:
- You can adjust environment variables and YAML config as shown in the README to tailor rendering limits, caching, and security constraints.
- The server validates model names and file paths to prevent injections; ensure input uses safe names and does not attempt path traversal.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP