mcp-cad-viewer
This MCP server lets you open STL CAD parts from a configured root folder in an interactive 3D viewer inside an MCP Apps chat host.
Call
view_partwith an.stlpath relative toCAD_VIEWER_ROOT.Parse ASCII or binary STL files and return a text summary with triangle count and bounding-box dimensions.
Render the part in a sandboxed three.js iframe where you can rotate and zoom it.
Keep file access confined to the configured root, reject path traversal, and cap parts at 8 MB.
Use it from MCP Apps-capable hosts over stdio, optionally alongside a CAD server that exports STL files.
Currently supports STL only; STEP/IGES and advanced in-view measurement tools are roadmap items.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mcp-cad-viewer Show me bracket-block.stl in the 3D viewer"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
mcp-cad-viewer
An MCP server that opens CAD parts in an interactive 3D viewer inside the chat, using MCP Apps.
Most MCP tools answer with text. For mechanical engineers that's the wrong shape: "the bracket is 20 × 10 × 5 mm with 12k triangles" is less useful than the bracket itself. view_part returns a summary the model can reason about and a View the host renders in a sandboxed iframe, where you can rotate and zoom the part.
Status: early. The server, the STL pipeline and the View are working and smoke-tested. Next up is testing in real MCP Apps hosts and adding STEP support. See the roadmap.
How it works
model ──calls──▶ view_part(path) host (Claude, VS Code, ChatGPT…)
│ │
├─ text: "12 triangles, 20 × 10 × 5" ───▶│ shown to the model
├─ structuredContent: summary + STL ───▶│ passed to the View
└─ _meta.ui.resourceUri ──────────────────▶ fetches ui://cad-viewer/viewer.html
└─ renders it in a sandboxed iframe
(three.js, orbit controls)Server (
src/server.ts): MCP TypeScript SDK v2.serveStdionegotiates the protocol era per connection, so the same server works with 2025-era clients and stateless 2026-07-28 clients.View (
view/): uses theAppclass from@modelcontextprotocol/ext-appsto receive the tool result and three.js to render it. It's bundled with esbuild and inlined into one HTML resource, so it needs no network access and no CSP exceptions.Safety: files are only read from inside
CAD_VIEWER_ROOT. Path traversal is rejected, and parts are capped at 8 MB.
Related MCP server: CAD MCP Server
Try it
npm install
npm run smoke # builds, starts the server, calls view_part on samples/bracket-block.stlAdd it to an MCP Apps–capable host (stdio):
{
"mcpServers": {
"cad-viewer": {
"command": "npx",
"args": ["-y", "mcp-cad-viewer"],
"env": { "CAD_VIEWER_ROOT": "/path/to/your/parts" }
}
}
}Then ask: "Show me bracket-block.stl".
With a CAD server
Root this viewer and a CAD server at the same folder, and "export it as STL and show it to me" ends with the part in the chat. freecad-mcp-server even returns the exact view_part call after an STL export. Its README has the full config and demo prompt.
Roadmap
view_parttool with STL parsing (ASCII and binary), bounding box and triangle countBundled three.js View delivered as an MCP Apps
ui://resourceSmoke test through a real MCP client
Release workflow: tag to publish on npm (with provenance) and the official MCP Registry
Verify rendering in Claude, VS Code and ChatGPT; follow the host's theme
STEP and IGES support (OpenCascade.js, converted server-side to a mesh)
Measurement tools in the View: click two points for a distance, section planes
View-to-server calls: "highlight the face I clicked" goes back to the model as context
Streamable HTTP transport and a hosted demo on free infrastructure
Shrink the View bundle (tree-shake three.js, lazy-load loaders)
Related
freecad-mcp-server: headless FreeCAD over MCP, tested end to end in CI
fusion-mcp-server: drives Autodesk Fusion from an agent; this viewer shows the result
mcp-tool-bench: conformance checks and tool-selection evals for MCP servers
License
MIT © Ashutosh Singh
Available Tools
1 toolview_partView CAD partA
Open an STL part in an interactive 3D viewer (rotate, zoom, measure the bounding box). Returns a text summary with triangle count and dimensions as well.
Inputs: path (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of misselection; its purpose (open an STL in an interactive 3D viewer) is unambiguous and self-contained.
The single name view_part follows a clear verb_noun snake_case convention that reads predictably and would scale well if more tools were added.
One tool is thin for a CAD viewer surface; realistic use cases like re-viewing, closing a session, or exporting a screenshot have no counterpart, though the scope itself is narrow enough that a single entry point is defensible.
The tool covers a single format (STL) and a single action (view/measure), with no support for other CAD formats, section/measurement beyond the bounding box, or capture/export of the view. These are notable gaps an agent cannot work around, though the core stated purpose is met.
Maintenance
Related MCP Connectors
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Read, query, edit and render DWG drawings with AI. No AutoCAD required.
Build, check, and export parametric CAD models in your ForgeCAD Projects from your AI agent.
Parametric 3D CAD for AI agents: build print-ready parts, check them, export STL, 3MF or STEP.
Related MCP Servers
- AlicenseAqualityBmaintenanceGive your AI assistant the ability to inspect, measure, and compare 3D CAD models by dropping in a STEP file and asking engineering questions. Runs entirely on your machine with no cloud, no CAD license, and no setup.5160 npm6MIT
- AlicenseAqualityDmaintenanceEnables reading, analyzing, and editing CAD files (DXF and DWG) via natural language, including entity queries, layer management, and safe copy-based edits.171MIT
- AlicenseAqualityCmaintenanceEnables an AI assistant to open 3D model files (STL, 3MF, Bambu Studio and OrcaSlicer projects) in a local browser viewer where the user clicks exact spots to leave feedback. Each note comes back with the part name, millimetre coordinates, surface direction and a numbered screenshot, so the assistant can revise the design and show the new version.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI assistants to build and edit native CAD parts and assemblies, inspect saved geometry and measurements, retain revisions, run mechanism and interference checks, and export STEP/STL/GLB artifacts through MCP tools.MIT