Onshape 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 MCP
Connect Claude (or any MCP client) to your Onshape CAD account. Ask in plain English and Claude can:
π find your documents and look inside Part Studios and Assemblies
πΌοΈ see your model (renders a shaded image Claude can look at)
βοΈ create documents, sketches and extrudes, and edit or delete features
π read mass properties, bounding boxes, BOMs and variables
πΎ export STL files for 3D printing
π§ͺ run FeatureScript, or call any Onshape REST endpoint
Works with free, Education (student) and paid Onshape accounts.
Example: "Here's my Part Studio link: β¦ Show me an isometric view, then make the bracket 5 mm thicker and export it as STL to my Desktop."
Setup (about 5 minutes)
Step 1 β Get Onshape API keys
Sign in at https://dev-portal.onshape.com/keys with your normal Onshape login.
Click Create new API key and tick these scopes:
OAuth2Readβ requiredOAuth2Writeβ to create and editOAuth2Deleteβ to delete features
Copy the Access key and Secret key. The secret is shown only once.
Keep these private. Anyone with them can access your Onshape account. If one leaks, delete it in the dev portal and make a new one.
Step 2 β Install uv
uv downloads and runs this server automatically, so you don't need to manage Python yourself.
Windows (PowerShell):
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"macOS / Linux:
curl -LsSf https://astral.sh/uv/install.sh | shClose and reopen your terminal afterwards.
Step 3 β Add it to Claude
Option A: Claude Code (CLI or desktop app)
Run this once in a terminal, pasting your own keys:
claude mcp add onshape --scope user -e ONSHAPE_ACCESS_KEY=YOUR_ACCESS_KEY -e ONSHAPE_SECRET_KEY=YOUR_SECRET_KEY -- uvx --from git+https://github.com/AnasShaheen2012/onshape-mcp onshape-mcpThen start a new Claude Code session.
Option B: Claude Desktop (chat app)
Open Claude Desktop β Settings β Developer β Edit Config. This opens
claude_desktop_config.json.Paste the following, with your own keys. If the file already has
mcpServers, add just the"onshape"block inside it.
{
"mcpServers": {
"onshape": {
"command": "uvx",
"args": ["--from", "git+https://github.com/AnasShaheen2012/onshape-mcp", "onshape-mcp"],
"env": {
"ONSHAPE_ACCESS_KEY": "YOUR_ACCESS_KEY",
"ONSHAPE_SECRET_KEY": "YOUR_SECRET_KEY"
}
}
}
}Fully quit Claude Desktop and reopen it. On Windows that means right-clicking the tray icon and choosing Quit. On macOS, press Cmd+Q.
macOS: if Claude Desktop says it can't find
uvx, replace"uvx"with its full path. Runwhich uvxin Terminal to get it; it's usually/Users/<you>/.local/bin/uvx.
Other MCP clients (Cursor, VS Code, Windsurf, β¦)
Use the same command and env as in Option B: command uvx, args --from git+https://github.com/AnasShaheen2012/onshape-mcp onshape-mcp.
Step 4 β Try it
Ask Claude:
List my 5 most recent Onshape documents.
If you see your documents, you're done. π
Related MCP server: onshape-mcp
Things to ask Claude
"Show me what's in this document:
<paste Onshape URL>""Render an isometric view of the Part Studio and tell me its overall dimensions."
"Create a new document called Test with a 40 mm Γ 20 mm cylinder."
"What's the mass of each part? Use aluminum 6061 if no material is set."
"Set the
wall_thicknessvariable to 3 mm.""Export this Part Studio as STL to my Downloads folder."
"Save a version called before-changes."
Tip: paste the URL straight from your browser. Claude pulls the document, workspace and tab IDs out of it automatically.
Tools
Area | Tools |
Helpers |
|
Documents |
|
Part Studios |
|
Assemblies |
|
Variables |
|
Visuals / export |
|
Anything else |
|
Most tools take did (document), wvm (w workspace / v version / m microversion), wvmid and eid (tab). Edits need wvm = w, because versions are read-only.
Troubleshooting
Check your keys from a terminal. On macOS / Linux:
ONSHAPE_ACCESS_KEY=YOUR_ACCESS_KEY ONSHAPE_SECRET_KEY=YOUR_SECRET_KEY uvx --from git+https://github.com/AnasShaheen2012/onshape-mcp onshape-mcp --checkWindows PowerShell:
$env:ONSHAPE_ACCESS_KEY="YOUR_ACCESS_KEY"; $env:ONSHAPE_SECRET_KEY="YOUR_SECRET_KEY"; uvx --from git+https://github.com/AnasShaheen2012/onshape-mcp onshape-mcp --checkIt prints OK - connected to β¦ as <your name> or explains what's wrong.
Problem | Fix |
| The keys aren't reaching the server. Check the |
| The key is wrong or was deleted. Make a new one in the dev portal. |
| You only have view access to that document, e.g. a team document shared read-only. Use a document you own, or ask the owner for Edit/Export permission. |
| Rate limited. Wait a bit. Onshape also caps yearly API calls per plan; check usage in the dev portal. |
Server doesn't appear in Claude | Make sure |
Enterprise account | Add |
Advanced
pip install git+https://github.com/AnasShaheen2012/onshape-mcpThen use onshape-mcp as the command in your MCP config, with no args.
git clone https://github.com/AnasShaheen2012/onshape-mcp
cd onshape-mcp
python -m venv .venv
.venv/bin/pip install -e ".[dev]" # Windows: .venv\Scripts\pip install -e ".[dev]"
pytestTest interactively with the MCP Inspector: npx @modelcontextprotocol/inspector .venv/bin/onshape-mcp.
onshape_add_feature takes Onshape's raw feature JSON. Claude usually figures it out, especially if you let it read an existing feature first with onshape_get_features. Here's a tested example that makes a 20 mm diameter, 30 mm tall cylinder.
Sketch on the Top plane. Lengths are in meters. The default plane IDs are Top JDC, Front JCC and Right JEC.
{"btType": "BTMSketch-151", "featureType": "newSketch", "name": "Sketch circle",
"parameters": [{"btType": "BTMParameterQueryList-148", "parameterId": "sketchPlane",
"queries": [{"btType": "BTMIndividualQuery-138", "deterministicIds": ["JDC"]}]}],
"entities": [{"btType": "BTMSketchCurve-4", "entityId": "circle1",
"geometry": {"btType": "BTCurveGeometryCircle-115", "radius": 0.01, "xCenter": 0, "yCenter": 0,
"xDir": 1, "yDir": 0, "clockwise": false}}],
"constraints": []}Extrude it. Use the sketch's featureId from the add response:
{"btType": "BTMFeature-134", "featureType": "extrude", "name": "Extrude cylinder",
"parameters": [
{"btType": "BTMParameterEnum-145", "parameterId": "bodyType", "enumName": "ExtendedToolBodyType", "value": "SOLID", "namespace": ""},
{"btType": "BTMParameterEnum-145", "parameterId": "operationType", "enumName": "NewBodyOperationType", "value": "NEW", "namespace": ""},
{"btType": "BTMParameterQueryList-148", "parameterId": "entities",
"queries": [{"btType": "BTMIndividualSketchRegionQuery-140", "featureId": "<sketch featureId>"}]},
{"btType": "BTMParameterEnum-145", "parameterId": "endBound", "enumName": "BoundingType", "value": "BLIND", "namespace": ""},
{"btType": "BTMParameterQuantity-147", "parameterId": "depth", "expression": "30 mm", "isInteger": false}]}Security & privacy
Your keys stay on your machine. They're read from environment variables and sent only to Onshape over HTTPS, using API-key Basic auth.
This server talks only to Onshape (
cad.onshape.com, or yourONSHAPE_BASE_URL).Claude can edit and delete features in documents you have edit rights to. Onshape keeps full history, so you can always restore earlier states, and saving a version before big changes is a good habit.
License
MIT. This is a community project and isn't affiliated with or endorsed by Onshape or PTC.
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
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
Connect Claude to your Platform7n workspaces: chat, links, work and decks. One-click OAuth.
CAD in ChatGPT and Claude: editable parts, STEP/STL/drawings, in-chat 3D, automatic checks.
Connect Claude to Fathom meeting recordings, transcripts, and summaries
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables Claude Code to drive OnShape CAD through the REST API for parametric modeling, FeatureScript queries, and STL export/verification.MIT
- AlicenseAqualityBmaintenanceEnables AI assistants to drive Onshape CAD with 87 tools for documents, part studios, sketching, solid features, assemblies, drawings, measurement, and export, including zero-configuration browser sign-in.93156 npm7MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude to create and modify real Onshape CAD models β sketches, extrudes, fillets, patterns, mates, and parametric variables β with every mutation returning structured status, warnings, and geometric deltas. Includes multi-view PNG rendering, image-reference decomposition, and drawing OCR so the agent can visually verify and iterate on parts and assemblies.MIT
- AlicenseNot gradedqualityCmaintenanceEnables Claude to create and modify real, editable Onshape CAD models through the Onshape REST API, covering parametric sketches, solid features, configurations, assemblies with mates and motion tests, interference checks, FeatureScript custom features, versions/branches, and import/export.MIT