Skip to main content
Glama
mcp-cad-viewer

mcp-cad-viewer

by gladiatorAsh

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. serveStdio negotiates the protocol era per connection, so the same server works with 2025-era clients and stateless 2026-07-28 clients.

  • View (view/): uses the App class from @modelcontextprotocol/ext-apps to 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: ifc-mcp

Try it

npm install
npm run smoke        # builds, starts the server, calls view_part on samples/bracket-block.stl

Add 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".

Roadmap

  • view_part tool with STL parsing (ASCII and binary), bounding box and triangle count

  • Bundled three.js View delivered as an MCP Apps ui:// resource

  • Smoke 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)

  • 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 tool
view_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.

NameRequiredDescriptionDefault
pathYesPath to an .stl file, relative to the viewer's root folder

TDQS

A3.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are supplied, so the description carries the full behavioral burden. It does disclose the side effect of opening an interactive viewer and the fact that a text summary is also returned, which is genuinely useful. However, it says nothing about whether the viewer blocks, whether a GUI/display is required, file-size limits, or how missing or malformed .stl files are reported.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two compact sentences with the primary action front-loaded and the return behavior appended where it belongs. Nothing is padded, though the parenthetical capability list is slightly dense and could be ordered more usefully.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a one-parameter, no-output-schema tool, the definition covers the action, the interactive capabilities, and the shape of the returned summary. The only meaningful omission is error and environment behavior, which matters but is secondary for a read-only viewer.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100% and the single 'path' parameter is already documented as root-relative in the schema, so the baseline of 3 applies. The description adds only weak reinforcement ('STL part') and no extra semantics such as accepted extensions or path normalization rules.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Open an STL part in an interactive 3D viewer') and states what the call yields (a text summary with triangle count and dimensions). There are no sibling tools to disambiguate against, so the only thing keeping it from a 5 is that the phrase 'view_part' vs. the interactive viewer's scope is not further bounded.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Usage is only implied by the description of the action; there is no explicit statement of when to choose this tool, what prerequisites exist (a viewer session, a valid root-relative file), or what to do on failure. With no siblings, the absence of alternatives is acceptable, but the lack of preconditions leaves guidance thin.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 1 tool updatev0.1.0
    • First observedview_part

TDQS

A3.6/5.0

Scored across 1 tool

Disambiguation5/5

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.

Naming Consistency5/5

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.

Tool Count3/5

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.

Completeness3/5

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

ActivityMaintained
ResponsivenessNo recent community issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    A
    quality
    B
    maintenance
    Give 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.
    5
    578 npm
    7
    MIT
  • A
    license
    A
    quality
    C
    maintenance
    Enables AI assistants to inspect, create, and report on IFC/BIM files locally, and to open models in a viewer with BCF viewpoint support.
    5
    227 npm
    13
    Apache 2.0
  • A
    license
    A
    quality
    D
    maintenance
    Enables reading, analyzing, and editing CAD files (DXF and DWG) via natural language, including entity queries, layer management, and safe copy-based edits.
    17
    1
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Enables 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.
    2
    MIT