onshape-automation-mcp
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
onshape-automation-mcp
Browser-based Onshape MCP automator: exposes Model Context Protocol tools that act on your own logged-in Onshape session — no public-API quota, no keys.
Every tool in this project drives the Onshape web app through the logged-in Chrome tab via Chrome DevTools Protocol (CDP): keystrokes, clicks, DOM reads, and Runtime.evaluate. CDP is the primary mechanism. Only a handful of tools use Onshape's internal v14 app API directly — and those are all listed in the Architecture section below. The MCP never reads cookies, never logs in, never touches the public v9/v8 API.
Not an API wrapper. This is a single-user, single-tab automator that drives your own account through your own browser — not a scraping tool, not a public-document extractor.
What it does
Any MCP-compatible client (Hermes, Claude Desktop, MCP Inspector, etc.) can:
Discover documents, workspaces, part studios, unit/precision settings
Create new documents and part studios (account-level scope is intentionally limited to creation — deletions stay in Onshape and are done manually)
Sketch — rectangles, circles, lines, arcs, dimensions, constraints, on the top plane (viewport-pixel coords via
take_screenshot)Build parts — extrude, thicken, revolve, linearly/circularly pattern, boolean, fillet, chamfer, shell, hole, mirror, move face, plane, loft, sweep, enclose, rib, wrap, split, draft, body draft, cap, face blend, replace face, modify fillet, transform
Sheet metal — base feature, flange, face flange, fold, thickness change (reform is
not_supported)Variables — read, set, create variable studios
Analyze — features, parts, body details, bounding box, eval_featurescript (
not_supported— no FeatureScript engine in the browser)Screenshot the live viewport via CDP
Related MCP server: chrome-mcp
Architecture
agent (MCP client)
│ stdio or HTTP POST /mcp
▼
MCP server (server.ts / http-server.ts)
│ registry.ts — tool definitions + executeTool
▼
rateLimiter.ts — single-action-at-a-time queue (read: 1500ms, write: 3000ms spacing)
│
▼
shim.ts — CDP (Bun WebSocket) → Runtime.evaluate in the logged-in tab
│
▼
logged-in tab (cad.onshape.com)Every tool runs through shim.ts as a CDP Runtime.evaluate — clicking the Feature toolbar, reading the DOM, dispatching keyboard shortcuts, simulating drags. Most tools never touch v14 at all:
Tier | Mechanism | Tools |
Most tools (46) | Pure CDP/DOM — Runtime.evaluate + key/mouse events | Everything except the discovery/creation tools and the shortcut-resolution fallback tools below |
7 direct v14 calls | Same-origin |
|
8 shortcut-resolution fallbacks | CDP-first; |
|
(create_sketch_circle hardcodes KeyC after a one-time verification against the v14 shortcut table — it does not call v14 at call time. eval_featurescript is not_supported by design — no FeatureScript engine is reachable from the browser.)
src/shim.ts—resolveTabId()(env or firstcad.onshape.comtab),evaluate(), andv14()(in-page fetch; non-2xx and in-page failures becomeOnshapeError('api')).src/rateLimiter.ts— one action in flight; failures do not wedge the queue.src/tools/*.ts— one module per category;buildTools()in the registry merges them.src/registry.ts—buildTools()= all real tools, 0 stubs.
Status
61 tools registered — tsc --noEmit clean.
Category | Tools | Count |
Discovery |
| 6 |
Creation |
| 2 |
Sketch |
| 13 |
Features |
| 5 |
Body |
| 21 |
Sheet metal |
| 6 |
Analysis |
| 5 |
Variables |
| 3 |
Quick start
1. Install
bun install2. Start the server
bun run start # stdio MCP server
bun run start:http # HTTP on :8471 (POST /mcp, GET /health)
bun run typecheck3. Drive a logged-in tab
Start any Chromium with remote debugging (e.g. --remote-debugging-port=9222), open cad.onshape.com, sign in manually. The automator never logs in — you own the session.
Heads-up about the CDP tab scan: the default tab lookup matches the first page whose URL contains cad.onshape.com. If you have several, set ONSHAPE_AUTOMATION_TAB explicitly (from http://127.0.0.1:9222/json/list).
Environment variables
Variable | Required | Purpose |
| no | Explicit tab id to drive. If unset, the first |
| yes for the 7 direct v14 tools ( | Your Onshape user id (24-char lowercase, |
| no | HTTP bind host (default |
| no | HTTP bind port (default |
| no | If set, require |
Limitations & Warnings
This is not a drop-in, production-ready replacement for the public API. Each tool drives a live application via DOM/CDP keystrokes and clicks, so:
UI-driven flows can break. Tools rely on live-DOM control discovery and never hardcode selectors. If Onshape renames a control, a tool fails with
not_supportedrather than silently misbehaving — that is the intended behavior.Coordinates are viewport-relative. Sketch tools take viewport pixel coordinates (
take_screenshotfirst to inspect). Tools are best-effort and unverified live.Unverifiable steps raise errors. Any step that can't be verified — locating a control, committing a feature, detecting a new feature in the tree — throws
not_supportedwith a reason instead of claiming success.Shallow DOM surface. Tools read whatever the app exposes in the DOM (the feature tree, the Parts list, document structure). 3D geometry detection (bounding box, body details) is best-effort and may be incomplete;
get_bounding_box/get_body_detailsare DOM-only and labeled as such.eval_featurescriptandcreate_sheet_metal_reformarenot_supportedby design (no FeatureScript engine in the browser; reform flow is not drivable reliably via CDP).Account-level operations are out of scope. New document/part studio creation is supported; deletions/replacement/removal stay in Onshape and are done manually.
No test suite. This release ships with
tsc --noEmitclean but no automated tests of the tools themselves. Verify against your own sandbox document.
Terms of use
Onshape's Terms of Use prohibit any robot, spider, scraper, or other automated means to access the Service for data mining or extraction — and separately prohibit scraping public documents. Onshape's own moderator (Jason_S, Feb 2020, in this discussion) confirmed that automating your own model is fine: "You would be manipulating your model, not trying to uncover trade secrets/exploit Onshape. Full speed ahead on the automation of your model."
This tool is designed around that scope: one logged-in user, one session, own model only. It never scrapes, never extracts data from public documents, never collects anything beyond what the user's own session already exposes. Do not use it to traverse other users' data or public documents.
Undocumented v14 app internals can break between Onshape app releases — this applies to the handful of direct v14 calls (and the keyboardshortcuts fallback), not to the CDP-driven tools. Do not rely on v14 for production-critical data extraction.
License
MIT. Copyright (c) 2026 Jesse Foltz.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Unofficial Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Browser MCP for logged-in tasks. Uses your Chrome — credentials stay local. Zero-token replay.
Browser automation MCP for whole web tasks in a cloud browser: saved logins, bot checks, replays.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables MCP clients to drive a real, logged-in Chrome browser for web automation tasks like navigation, clicking, typing, and screenshotting.MIT
- AlicenseBqualityCmaintenanceEnables MCP clients to drive a real Chromium browser for automation, including navigation, JavaScript execution, CDP commands, network capture, and multi-tab control.729 PyPIGPL 3.0
- AlicenseNot gradedqualityBmaintenanceEnables MCP clients to control Chrome/Edge browsers via CDP, including page navigation, element interaction, snapshots, network debugging, script execution, and performance tracing.AGPL 3.0
- AlicenseNot gradedqualityCmaintenanceEnables MCP clients to drive the user's real Chrome over CDP with tools for tab management, page inspection, smart form interaction, disabled-control diagnostics, and screenshots while keeping one connection alive across multi-step agent loops.MIT