Open, view, and inspect 3D models (.scad and .stl files) using the openscad-viewer MCP tools. Use when working with OpenSCAD files, STL files, 3D models, or when the user wants to see or inspect a model from different angles.
View and inspect OpenSCAD (.scad) and STL (.stl) 3D models using the openscad-viewer: MCP tools.
$PATH (for .scad files; not needed for .stl)If the MCP server is not already connected, start it manually:
npx openscad-viewer <file.scad|file.stl>
This opens a browser window at http://localhost:8439 showing the 3D model.
The user sees the same view the agent is inspecting.
openscad-viewer:openOpens a .scad or .stl file in the viewer. Use this to load or switch models.
Parameters:
file (required): Absolute or relative path to a .scad or .stl fileReturns:
{
"success": true,
"file": "/absolute/path/to/model.scad",
"fileSize": 2048,
"boundingBox": { "min": [-10, -10, 0], "max": [10, 10, 20] }
}
The bounding box tells you the model's dimensions. Use it to:
openscad-viewer:viewRenders the current model at a specified camera angle and returns a PNG screenshot.
Parameters:
azimuth (optional, default 45): Horizontal angle 0-360 degreeselevation (optional, default 30): Vertical angle -90 to 90 degreesdistance (optional): Distance from model center. Auto-calculated from bounding box if omitted.Returns:
{
"imagePath": "/tmp/openscad-viewer-capture-xxxxx.png",
"camera": { "azimuth": 45, "elevation": 30, "distance": 100 }
}
Read the returned imagePath to see the rendered model.
Side effect: The browser view animates to the requested angle, so the user sees what you are looking at.
| View | Azimuth | Elevation | Use For |
|---|---|---|---|
| Front | 0 | 0 | Width and height |
| Back | 180 | 0 | Rear features |
| Left | 270 | 0 | Left side profile |
| Right | 90 | 0 | Right side profile |
| Top | 0 | 90 | Footprint / layout |
| Bottom | 0 | -90 | Base features |
| Isometric | 45 | 30 | General 3D overview |
| High iso | 45 | 60 | Top-heavy features |
When inspecting or verifying a model:
view { "azimuth": 0, "elevation": 0 }view { "azimuth": 0, "elevation": 90 }view { "azimuth": 45, "elevation": 30 } (default)view { "azimuth": 90, "elevation": 0 }When modifying OpenSCAD code:
view to verify the change from relevant anglesopen after editing a file — the viewer watches for changes automaticallyopen only when switching to a different fileopen helps estimate appropriate camera distances