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!
🚀 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 mcp-config.json
for Claude CLI:
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 uv
- all dependencies are handled automatically!
📦 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 |
---|---|---|---|
scad_content | string | No* | OpenSCAD code to render |
scad_file | string | No* | Path to .scad file |
camera_position | [x,y,z] | No | Camera position (default: [30,30,30]) |
camera_target | [x,y,z] | No | Look-at point (default: [0,0,0]) |
camera_up | [x,y,z] | No | Up vector (default: [0,0,1]) |
image_size | [w,h] | No | Image dimensions in pixels |
color_scheme | string | No | OpenSCAD color scheme |
variables | dict | No | Variables to pass to OpenSCAD |
auto_center | 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 |
---|---|---|---|
scad_content | string | No* | OpenSCAD code to render |
scad_file | string | No* | Path to .scad file |
distance | float | No | Camera distance from origin |
image_size | [w,h] | No | Image dimensions for each view |
variables | dict | No | Variables to pass to OpenSCAD |
views | list | No | Specific views to render |
Example Request:
3. check_openscad
Verify OpenSCAD installation and get version information.
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
include_paths | 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
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
Enables AI assistants to render 3D models from OpenSCAD code, generating single views or multiple perspectives with full camera control. Supports animations, custom parameters, and returns base64-encoded PNG images for seamless integration.
- 🎯 Zero-Installation Execution
- 🚀 Quick Start
- 🔒 Security: --allowedTools Requirement
- ✨ Features
- 📋 Prerequisites
- 📦 Installation
- ⚙️ Configuration
- 🛠️ Available MCP Tools
- 📚 MCP Resources
- 🏗️ Architecture
- 🧪 Testing
- 🔧 Development
- 🐛 Troubleshooting
- 📈 Performance
- 🚦 Production Status
- 📝 License
- 🤝 Contributing
- 📮 Support
- 🙏 Acknowledgments
Related MCP Servers
- AsecurityFlicenseAqualityAllows interaction with Sketchfab's 3D model platform through Claude or Cursor, enabling users to search, view details, and download 3D models directly from the AI interface.Last updated -429627
- -securityFlicense-qualityEnables users to generate parametric 3D models from text descriptions or images using multi-view reconstruction and OpenSCAD, with support for AI image generation and remote processing.Last updated -75
- -securityAlicense-qualityThis project provides a robust integration between AI assistants and FreeCAD CAD software using the Model Context Protocol (MCP). It allows external applications to interact with FreeCAD through a standardized interface, offering multiple connection methods and specialized tools.Last updated -11MIT License
- -securityFlicense-qualityEnables AI assistants to interact programmatically with Autodesk Fusion 360 for creating parametric 3D models through simple API calls.Last updated -13