Provides an OpenSCAD-powered MCP server to create, transform, combine, and export 3D models via natural language.
Configuration
View docs{
"mcpServers": {
"jagjerez-org-3d-mcp-server": {
"command": "3d-mcp-server",
"args": [],
"env": {
"OPENSCAD_BIN": "openscad",
"SCAD_WORK_DIR": "/tmp/3d-mcp-work"
}
}
}
}You can generate and export 3D models by guiding an MCP-compatible AI client to build OpenSCAD-powered scenes. This server translates natural language requests into chained 3D operations, enabling you to create, transform, combine, and export models with ease.
To use this MCP server, start it from your preferred MCP-enabled AI client and point the client to the local server binary. You can then issue natural language requests to create primitives, apply transforms, combine objects, and export results to common 3D formats. The server maintains a scene graph in memory and converts each action into clean OpenSCAD code, which is then rendered or exported as needed.
Prerequisites for this server include Node.js for the MCP runtime and OpenSCAD for export and preview rendering.
npm install -g @jagjerez-org/3d-mcp-server
# Prerequisites for OpenSCAD rendering (required for export and preview):
# Ubuntu/Debian
sudo apt install openscad
# macOS
brew install openscad
# Windows — download from https://openscad.org/downloads.html
> Note: OpenSCAD is only required for export and preview tools. Scene building and SCAD code generation work without it.Configure your MCP client to connect to the server. The Quick Start examples show configuring Claude Desktop or Cursor to invoke the MCP server when issuing requests. You typically specify the server command and then issue a request such as asking to create a primitive, apply a transformation, and export the result.
Example client configuration (local run) would reference the server binary directly. You can reuse these patterns in any MCP-capable client by replacing the specific client adapter with the appropriate integration for your environment.
The server uses OpenSCAD to render final results for export and preview. Ensure the OpenSCAD binary is available in your PATH when you plan to use export or preview tools.
- To create basic shapes, request primitives such as a cube, sphere, cylinder, cone, or torus. Combine them using boolean operations like union, difference, or intersection. Render previews or export to formats like STL or OBJ when needed.
- Use transforms to translate, rotate, scale, mirror, or color objects. Maintain a clean scene by listing objects, applying operations, and exporting only after your final shape is assembled.
Keep your server up to date by installing the latest MCP server package from your trusted source. Run the server in a trusted environment and follow your organization’s security practices when exposing any local endpoints to clients.
If export or preview fails, verify that OpenSCAD is correctly installed and accessible from your environment. Check the environment variable OPENSCAD_BIN if you customize the binary path, and ensure your working directory permits OpenSCAD operations.
This server focuses on 3D model generation via OpenSCAD. It supports creating primitives, applying transformations, performing boolean operations, and exporting results to standard 3D formats. The server keeps an in-memory scene graph and generates OpenSCAD code for each action.
Create 3D primitive shapes such as cube, sphere, cylinder, cone, or torus.
Create 3D extruded text.
Create a custom mesh from defined vertices and faces.
Insert raw OpenSCAD code directly into the scene.
Apply translate, rotate, scale, mirror, or color to an object.
Perform union, difference, or intersection on multiple objects.
Extrude a 2D shape into 3D via linear extrusion.
Create a solid of revolution from a 2D profile.
Check OpenSCAD installation and current scene information.
List all objects currently in the scene.
Clear all objects from the scene.
Remove a specific object by its identifier.
Retrieve the full OpenSCAD source code for the current scene.
Save the current scene as a .scad file.
Export the scene to formats such as STL, OBJ, 3MF, AMF, OFF, DXF, SVG, or CSG.
Render a PNG preview image of the current scene.