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.
OpenSCAD MCP Server
A production-ready Model Context Protocol (MCP) server that provides OpenSCAD 3D rendering capabilities to AI assistants and LLM applications. Built with FastMCP for robust, scalable performance.
šÆ Zero-Installation Execution
Run directly from GitHub without any setup:
Perfect for MCP clients, CI/CD pipelines, and instant deployment scenarios!
Related MCP server: OpenSCAD MCP Server
š Quick Start
Zero-Installation Execution with uv
No installation required! Run directly from GitHub:
Traditional Installation (Optional)
Configure with Claude Desktop
Add to your Claude Desktop configuration (~/Library/Application Support/Claude/claude_desktop_config.json on macOS):
Option 1: Direct from GitHub (Recommended)
Option 2: Local Installation
š Security: --allowedTools Requirement
IMPORTANT: When using the OpenSCAD MCP server with Claude CLI or other MCP clients, you MUST explicitly grant permissions using the --allowedTools flag for security. This prevents unauthorized tool usage and ensures controlled access to server capabilities.
Required Permissions
The OpenSCAD MCP server requires explicit permission for each tool:
openscad-mcp:check_openscad- Permission to check OpenSCAD installationopenscad-mcp:render_single- Permission to render single viewsopenscad-mcp:render_perspectives- Permission to render multiple perspectives
Example Usage with Claude CLI
Create
Testing with Permissions
Use the provided test script to verify proper permission configuration:
⨠Features
šÆ Production-Ready: 100% test success rate with comprehensive integration testing
š§ Single View Rendering: Render OpenSCAD models from any camera angle with full control
š Multiple Perspectives: Generate standard orthographic and isometric views automatically
š¬ Animation Support: Create turntable animations for 360° model visualization
ā” Async Processing: Non-blocking renders using FastMCP framework for optimal performance
š¼ļø Base64 Encoding: Images returned as base64-encoded PNGs for seamless integration
ā Verified Compatibility: Fully compatible with FastMCP 2.11.3 and Pydantic 2.11.7
š Prerequisites
Python 3.10+ (required for FastMCP 2.11.3)
OpenSCAD (Download from openscad.org)
uv (Install from docs.astral.sh) - Only needed for zero-installation execution
No additional Python packages required when using
š¦ Installation
Method 1: Zero-Installation with uv (Recommended)
No installation required! Just run directly:
Method 2: Local Development with uv
Method 3: Traditional pip Installation
āļø Configuration
Environment Variables
Create a .env file in the project root:
Configuration File (Optional)
Create config.yaml for advanced configuration:
š ļø Available MCP Tools
1. render_single
Render a single view of an OpenSCAD model with complete camera control.
Parameters:
Parameter | Type | Required | Description |
| string | No* | OpenSCAD code to render |
| string | No* | Path to .scad file |
| [x,y,z] | No | Camera position (default: [30,30,30]) |
| [x,y,z] | No | Look-at point (default: [0,0,0]) |
| [x,y,z] | No | Up vector (default: [0,0,1]) |
| [w,h] | No | Image dimensions in pixels |
| string | No | OpenSCAD color scheme |
| dict | No | Variables to pass to OpenSCAD |
| bool | No | Auto-center the model |
*Either scad_content or scad_file must be provided
Example Request:
Example Response:
2. render_perspectives
Generate multiple standard views of a model (front, back, left, right, top, bottom, isometric).
Parameters:
Parameter | Type | Required | Description |
| string | No* | OpenSCAD code to render |
| string | No* | Path to .scad file |
| float | No | Camera distance from origin |
| [w,h] | No | Image dimensions for each view |
| dict | No | Variables to pass to OpenSCAD |
| list | No | Specific views to render |
Example Request:
3. check_openscad
Verify OpenSCAD installation and get version information.
Parameters:
Parameter | Type | Required | Description |
| bool | No | Include searched paths in response |
Example Request:
š MCP Resources
resource://server/info
Get server configuration and capabilities.
Returns:
Server version and status
OpenSCAD version and path
Rendering capabilities
Active operations count
Configuration details
šļø Architecture
The server implements a clean architecture pattern:
š§Ŗ Testing
The server has achieved 100% test success rate across all integration tests:
See Test Report for detailed results.
š§ Development
Project Structure
Extending the Server
To add new rendering capabilities:
Define parameter types in
types.py:
Add tool function in
server.py:
Update documentation in
API.md
š Troubleshooting
OpenSCAD Not Found
Permission Errors
Rendering Timeouts
Increase timeout in configuration:
FastMCP Compatibility Issues
Ensure correct versions:
š Performance
Single view rendering: ~1-3 seconds (complexity dependent)
Multiple perspectives: ~5-10 seconds for 8 views
Base64 encoding: < 0.1s overhead
Memory footprint: ~50 MB base + 10-20 MB per render
Concurrent renders: Up to 4 (configurable)
š¦ Production Status
ā Ready for Production
All tests passing (100% success rate)
FastMCP 2.11.3 compatibility verified
Comprehensive error handling
Async operation support
Resource management implemented
Documentation complete
š License
MIT License - See LICENSE file for details
š¤ Contributing
Contributions are welcome! Please:
Fork the repository
Create a feature branch (
git checkout -b feature/amazing-feature)Commit your changes (
git commit -m 'Add amazing feature')Push to the branch (
git push origin feature/amazing-feature)Open a Pull Request
š® Support
Issues: GitHub Issues
Documentation: Full API Documentation
Test Report: Integration Test Results
š Acknowledgments
FastMCP - The excellent MCP framework
OpenSCAD - The programmable CAD software
Model Context Protocol - The MCP specification
Version: 1.0.0 | Status: Production Ready | Last Updated: 2025-08-25