Model Context Protocol server enabling parametric 3D model generation from text or images via AI-driven multi-view reconstruction, OpenSCAD integration, remote processing, and 3D printer discovery.
python
0 tools
May 30, 2025
Updated Jun 4, 2025
Supercharge Your AI with OpenSCAD MCP Server
MCP Server
Unlock the full potential of OpenSCAD MCP Server through LangDB's AI Gateway. Get enterprise-grade security, analytics, and seamless integration with zero configuration.
FastMCP-based Model Context Protocol server enabling image generation from prompts via remote Comfy server integration, supporting customizable workflows, prompt generation, and flexible output modes for seamless AI-driven image creation.
A Model Context Protocol (MCP) server enabling Retrieval-Augmented Generation with document ingestion, semantic search, local LLM integration via Ollama, and compatibility with RISC Zero's Bonsai documentation for advanced query processing.
A Model Context Protocol (MCP) server enabling remote GDB/MI debugging with AI assistant integration, supporting multi-session management, breakpoint control, stack and variable inspection, and program execution control via stdio or SSE transport.
Fast and secure Model Context Protocol server enabling resource-based AI image generation with real-time updates, template-driven configuration, comprehensive model selection, webhook integration, and progress tracking.
Specialized Model Context Protocol server enabling AI-driven generation and validation of detailed, customizable Product Requirements Documents with multi-provider support and template fallback.
Added May 30, 2025
OpenSCAD MCP Server
A Model Context Protocol (MCP) server that enables users to generate 3D models from text descriptions or images, with a focus on creating parametric 3D models using multi-view reconstruction and OpenSCAD.
Features
AI Image Generation: Generate images from text descriptions using Google Gemini or Venice.ai APIs
Multi-View Image Generation: Create multiple views of the same 3D object for reconstruction
Image Approval Workflow: Review and approve/deny generated images before reconstruction
3D Reconstruction: Convert approved multi-view images into 3D models using CUDA Multi-View Stereo
Remote Processing: Process computationally intensive tasks on remote servers within your LAN
OpenSCAD Integration: Generate parametric 3D models using OpenSCAD
Parametric Export: Export models in formats that preserve parametric properties (CSG, AMF, 3MF, SCAD)
3D Printer Discovery: Optional network printer discovery and direct printing
Architecture
The server is built using the Python MCP SDK and follows a modular architecture:
openscad-mcp-server/
├── src/
│ ├── main.py # Main application
│ ├── main_remote.py # Remote CUDA MVS server
│ ├── ai/ # AI integrations
│ │ ├── gemini_api.py # Google Gemini API for image generation
│ │ └── venice_api.py # Venice.ai API for image generation (optional)
│ ├── models/ # 3D model generation
│ │ ├── cuda_mvs.py # CUDA Multi-View Stereo integration
│ │ └── code_generator.py # OpenSCAD code generation
│ ├── workflow/ # Workflow components
│ │ ├── image_approval.py # Image approval mechanism
│ │ └── multi_view_to_model_pipeline.py # Complete pipeline
│ ├── remote/ # Remote processing
│ │ ├── cuda_mvs_client.py # Client for remote CUDA MVS processing
│ │ ├── cuda_mvs_server.py # Server for remote CUDA MVS processing
│ │ ├── connection_manager.py # Remote connection management
│ │ └── error_handling.py # Error handling for remote processing
│ ├── openscad_wrapper/ # OpenSCAD CLI wrapper
│ ├── visualization/ # Preview generation and web interface
│ ├── utils/ # Utility functions
│ └── printer_discovery/ # 3D printer discovery
├── scad/ # Generated OpenSCAD files
├── output/ # Output files (models, previews)
│ ├── images/ # Generated images
│ ├── multi_view/ # Multi-view images
│ ├── approved_images/ # Approved images for reconstruction
│ └── models/ # Generated 3D models
├── templates/ # Web interface templates
└── static/ # Static files for web interface
Installation
Clone the repository:
git clone https://github.com/jhacksman/OpenSCAD-MCP-Server.git
cd OpenSCAD-MCP-Server
Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
git clone https://github.com/fixstars/cuda-multi-view-stereo.git
cd cuda-multi-view-stereo
mkdir build && cd build
cmake ..
make
Set up API keys:
Create a .env file in the root directory
Add your API keys:
GEMINI_API_KEY=your-gemini-api-key
VENICE_API_KEY=your-venice-api-key # Optional
REMOTE_CUDA_MVS_API_KEY=your-remote-api-key # For remote processing
Remote Processing Setup
The server supports remote processing of computationally intensive tasks, particularly CUDA Multi-View Stereo reconstruction. This allows you to offload processing to more powerful machines within your LAN.
Server Setup (on the machine with CUDA GPU)
Install CUDA Multi-View Stereo on the server machine:
git clone https://github.com/fixstars/cuda-multi-view-stereo.git
cd cuda-multi-view-stereo
mkdir build && cd build
cmake ..
make
Start the remote CUDA MVS server:
python src/main_remote.py
The server will automatically advertise itself on the local network using Zeroconf.