onshape-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| ONSHAPE_WS | No | Default target workspace; this argument becomes optional when set | |
| ONSHAPE_DOC | No | Default target document; this argument becomes optional when set | |
| ONSHAPE_ELEM | No | Default target element; this argument becomes optional when set | |
| ONSHAPE_BASE_URL | No | Onshape API host | https://cad.onshape.com |
| ONSHAPE_ACCESS_KEY | No | Onshape API access key. Use this key pair instead of signing in. | |
| ONSHAPE_MCP_CONFIG | No | Credential file path | ~/.onshape-mcp/credentials.json |
| ONSHAPE_SECRET_KEY | No | Onshape API secret key. Use this key pair instead of signing in. | |
| ONSHAPE_TIMEOUT_MS | No | Per-request timeout | 120000 |
| ONSHAPE_MCP_AUTO_LOGIN | No | Set to 0 to stop tool calls from starting a browser sign-in | |
| ONSHAPE_MCP_NO_BROWSER | No | Set to 1 to never launch a browser; the URL is reported instead | |
| ONSHAPE_MCP_OUTPUT_DIR | No | Where relative export paths land | working directory |
| ONSHAPE_OAUTH_CLIENT_ID | No | OAuth app client ID to sign in with, instead of an API key | |
| ONSHAPE_MCP_SIGNIN_WAIT_MS | No | How long a call waits for sign-in | 120000 |
| ONSHAPE_OAUTH_CLIENT_SECRET | No | OAuth app client secret to sign in with, instead of an API key | |
| ONSHAPE_MCP_MAX_RESPONSE_BYTES | No | Response size before spilling to a file | 200000 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": true
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| onshape_loginA | Sign in to Onshape by opening a browser. method='api_key' (default) opens a local page that links to the Onshape developer key page and accepts the pasted key pair. method='oauth' runs the OAuth 2.0 authorization-code flow against an app you registered in the Onshape developer portal. The credential is verified against Onshape and stored in the OS keychain. Returns immediately with status 'pending' if the user has not finished yet — poll with onshape_login_status. |
| onshape_login_statusA | Wait for, and report on, the login started by onshape_login. Call this repeatedly while the user is in the browser; each call waits up to wait_seconds before returning. |
| onshape_set_api_keyA | Store an Onshape access key and secret key directly, without a browser. Use when the user already has a key pair from https://cad.onshape.com/user/developer/apiKeys. The pair is verified against Onshape before it is saved. |
| onshape_auth_statusA | Report which Onshape credential is active, where it came from and whether it still works. Secrets are redacted. |
| onshape_logoutA | Delete the credential this server stored (keychain entry and config file). Credentials coming from environment variables or from an existing onshape-cli install are not touched. |
| onshape_list_documentsA | List documents visible to the signed-in user, most recently modified first. |
| onshape_search_documentsA | Find documents by name. Search before creating, so repeated runs do not make duplicates. |
| onshape_get_documentB | Read one document's metadata, including its default workspace id. |
| onshape_get_document_summaryA | Document metadata plus every workspace and the elements (tabs) inside each — the fastest way to orient in an unfamiliar document and collect the ids other tools need. |
| onshape_create_documentA | Create a document. Free Onshape accounts may only create public documents, so pass public=true there. The result carries the new document id and its default workspace id. |
| onshape_update_documentC | Change a document's name or description. |
| onshape_delete_documentA | Move a document to the trash. This affects the whole document, not a single tab. |
| onshape_get_workspacesA | List a document's workspaces (branches). |
| onshape_get_elementsA | List the elements (tabs) in a workspace: Part Studios, assemblies, drawings, Feature Studios. |
| onshape_find_part_studiosA | List the Part Studios in a workspace, optionally filtered by a substring of the name. |
| onshape_list_versionsA | List the immutable versions of a document, newest first. |
| onshape_create_versionA | Snapshot the workspace as an immutable version. Do this before restructuring an existing design: it is the only way back to the previous state, and drawings must reference a version. |
| onshape_delete_elementB | Delete one element (tab) from a workspace. |
| onshape_create_part_studioA | Add a Part Studio tab to a workspace. The new element id is at result.response.id. |
| onshape_get_featuresA | The full feature tree with each feature's id, type, parameters and regeneration state. Large — prefer onshape_measure or onshape_get_parts when you only need the result of the tree. |
| onshape_get_feature_specsA | The parameter ids, enum names and defaults Onshape expects for every feature type in this Part Studio. Read this before hand-writing a payload for onshape_add_feature. |
| onshape_get_sketch_infoB | Entities and solved geometry for every sketch in a Part Studio, or for one sketch. |
| onshape_get_body_detailsA | Bodies, faces and edges with their deterministic ids — the source for explicit edge selection. |
| onshape_get_partsA | The parts a Part Studio produces, with part ids for export and assembly insertion. |
| onshape_mass_propertiesB | Volume, mass, centroid and inertia for the Part Studio's bodies. |
| onshape_measureA | Body count, overall bounding box in inches and total volume. Use this to check a model matches its intended dimensions before exporting. |
| onshape_clearanceA | Minimum distance between two solid bodies in the same Part Studio, each named by part id or by the feature that created it. 0 (clear: false) means they touch or overlap, so this is also the interference check — e.g. a bracket against a dummy servo body. Returns inches and millimetres, plus the closest point on each body. |
| onshape_validate_part_studioA | Count parts and bodies, and fail when the counts do not match the expectations you pass. A cheap regression check after a run of feature edits. |
| onshape_add_featureA | Post a hand-written BTM feature payload to a Part Studio. The escape hatch for feature types this server has no dedicated tool for — read onshape_get_feature_specs first. |
| onshape_update_featureA | Replace an existing feature's payload, e.g. to change a dimension. Post the whole feature JSON. |
| onshape_delete_featureA | Remove one feature from the tree. Features added after it may fail to regenerate. |
| onshape_rollbackA | Set the rollback index so features after it are suppressed. Index 0 rolls back to before the first feature. |
| onshape_eval_featurescriptA | Run a FeatureScript function against the Part Studio and return its decoded value. The general-purpose way to inspect geometry: 'function(context is Context, queries) { ... }'. |
| onshape_sketch_rectangleB | Add a sketch holding one closed rectangle, ready to extrude. Corners are opposite, in inches. |
| onshape_sketch_circleC | Add a sketch holding one circle. |
| onshape_sketch_lineA | Add a sketch holding one line segment. A line alone encloses no region, so it cannot be extruded. |
| onshape_sketch_circle_axisB | Add a sketch with a circle profile and a construction line. onshape_revolve spins the profile around that construction line, which is how you get a torus or a ring. |
| onshape_create_sketchA | Add a sketch from a list of entities: lines, circles, rectangles and arcs. Use this when the single-shape sketch tools cannot express the profile. Close the profile if you intend to extrude it. |
| onshape_sketch_candy_cane_pathA | Add a sketch of a straight stem joined to a hooked arc, approximated by segments — a ready-made path for onshape_sweep. |
| onshape_extrudeA | Extrude the closed regions of a sketch into a solid. op=NEW makes a body, ADD merges into existing bodies, REMOVE cuts them, INTERSECT keeps the overlap. end_type picks blind, symmetric or through-all; opposite flips the direction. |
| onshape_holeA | Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body: end_type THROUGH_ALL needs no depth. A sketch on a body's face points out of the body, so pass opposite to cut into it. |
| onshape_thickenC | Give a sketch region a wall thickness instead of a solid depth. |
| onshape_revolveA | Revolve a sketch profile around an axis. With no axis given, the sketch's own construction line is used (see onshape_sketch_circle_axis); otherwise pass axis_ids or an axis query. |
| onshape_sweepA | Sweep the closed regions of one sketch along the edges of another. |
| onshape_filletC | Round the selected edges. Name the edges with one of: edges (ids), query (FeatureScript), feature (every edge that feature made), all, or circular. |
| onshape_chamferB | Bevel the selected edges. Selection works exactly as for onshape_fillet. |
| onshape_shellA | Hollow the body out to a wall thickness, removing the selected faces to open it. |
| onshape_draftA | Taper faces away from a neutral plane — the usual requirement for moulded or cast parts. |
| onshape_booleanB | Combine bodies: UNION, SUBTRACTION or INTERSECTION. Subtraction also needs the targets query. |
| onshape_boolean_unionA | Merge all modifiable solid bodies into one. The usual cleanup before exporting a single part. |
| onshape_mirrorB | Mirror parts, bodies or faces across a plane. |
| onshape_linear_patternB | Repeat geometry along a direction, at a fixed spacing. |
| onshape_circular_patternB | Repeat geometry around an axis. |
| onshape_offset_planeA | Add a construction plane offset from a default plane, a face, or another plane. |
| onshape_get_edgesA | Every edge of every solid body, with its deterministic id, owning body, type, and for circles and arcs the radius and centre (inches). |
| onshape_find_circular_edgesA | Circular edges (full circles and arcs), optionally only those matching a radius, with each one's centre in inches — the usual way to pick hole rims to fillet, or to check where the holes are. |
| onshape_find_edges_by_featureA | Deterministic ids of the edges a given feature created, evaluated by Onshape. |
| onshape_get_variablesB | The variable table of a Part Studio: names, expressions and descriptions. |
| onshape_set_variableA | Create or update a variable. Feature tools can then reference it by name (depth_variable, radius_variable, ...) so a dimension lives in one place. Uses the variable table where the account supports it and falls back to an assignVariable feature otherwise; result.route says which was used. On the feature route an existing variable of the same name is rewritten in place, so features built after it pick up the new value (result.action is updated or created). |
| onshape_get_configurationB | The configuration parameters an element exposes, with their ids and allowed values. |
| onshape_encode_configurationA | Turn configuration parameter values into the encoded string other tools accept as |
| onshape_export_stlA | Export the Part Studio as STL, for 3D printing. The file is in millimetres by default, which is what slicers assume; STL carries no unit, so only change |
| onshape_exportA | Export through Onshape's translation service: STEP, IGES, 3MF, PARASOLID, SOLIDWORKS and others. Slower than STL because the translation is queued server-side. |
| onshape_shaded_viewA | Render the element server-side and return the image. Unlike a thumbnail this is generated on demand, so it always shows the current geometry — use it to check a model visually before exporting. |
| onshape_get_thumbnailA | Save Onshape's stored thumbnail. Thumbnails are generated asynchronously and lag edits — prefer onshape_shaded_view to see the current state. |
| onshape_thumbnail_infoB | The thumbnail sizes Onshape has rendered for this element, with their hrefs. |
| onshape_create_assemblyB | Add an assembly tab to a workspace. |
| onshape_get_assemblyB | The assembly's instances, occurrences, mate features and mate connectors. |
| onshape_insert_instanceB | Insert a part, a whole Part Studio or another assembly into an assembly. Insert from a version when pulling from a different document. |
| onshape_delete_instanceA | Remove one instance from an assembly by its occurrence node id. |
| onshape_transform_instanceB | Apply a 4x4 row-major transform (16 numbers, metres) to the given occurrence paths. |
| onshape_get_assembly_featuresA | The mates, mate connectors, groups and relations defined in an assembly, with their feature ids, payloads and regeneration states. |
| onshape_assembly_mate_connectorA | Place an implicit mate connector on an instance by inference (CENTROID, TOP, ...). Its feature id is what onshape_assembly_mate then joins. |
| onshape_assembly_mateA | Join two mate connectors with a mate: FASTENED, REVOLUTE, SLIDER, CYLINDRICAL, PLANAR, and so on. Each connector is an assembly-level mate connector's feature id, or a Part Studio mate connector given as {path: [instance id], connector: feature id} from onshape_get_assembly. The mate's value measures the first connector against the second, so list the moving part first. |
| onshape_assembly_groupB | Lock several instances together without individual mates. |
| onshape_assembly_add_featureB | Post a hand-written assembly feature payload — the escape hatch for mate types with no tool here. |
| onshape_update_assembly_featureA | Replace an assembly feature's payload — a mate's type, connectors or limits, a relation's ratio. Post the whole feature JSON, e.g. as onshape_get_assembly_features returns it, inside a BTFeatureDefinitionCall-1406 envelope. |
| onshape_delete_assembly_featureA | Remove a mate, mate connector, group or relation. Relations on a deleted mate stop solving. |
| onshape_assembly_relationA | Couple mates so one drives the other: GEAR (two revolutes, ratio), RACK_AND_PINION (a revolute and a slider, distance per revolution), SCREW (one cylindrical mate, distance per revolution) or LINEAR (two sliders, ratio). Each mate's degree of freedom follows from its type; cylindrical mates contribute whichever the relation needs. Mates missing the parameter relations need (made by hand-written payloads) are completed first and listed in completedMates. Fails if the relation does not regenerate. |
| onshape_get_mate_valuesA | Where every mate currently sits: each degree of freedom's value, translations in inches and rotations in degrees, keyed by unit (translationZ_in, rotationZ_deg). |
| onshape_set_mate_valuesA | Drive top-level mates to new positions — turn a revolute, slide a slider — and read them back; relations move the coupled mates too. Values are inches and degrees. Fails when Onshape does not apply a value, which it does silently for mates with limits enabled and for positions the rest of the assembly cannot reach. |
| onshape_get_bomC | The assembly's BOM table. |
| onshape_assembly_mass_propertiesA | Mass, volume, centroid and inertia for a whole assembly. |
| onshape_create_drawingA | Create a drawing of a part, Part Studio or assembly. The source must be referenced by version — call onshape_create_version first and pass its id as src_version. |
| onshape_get_drawing_viewsB | The views placed on a drawing sheet. |
| onshape_export_drawingB | Export a drawing as PDF (or DWG/DXF) through the translation service. |
| onshape_create_feature_studioB | Add a Feature Studio tab for custom FeatureScript. |
| onshape_get_feature_studioB | The FeatureScript source of a Feature Studio. |
| onshape_set_feature_studioA | Replace the FeatureScript source of a Feature Studio. The whole file is overwritten. |
| onshape_get_feature_studio_specsA | The feature specifications a Feature Studio defines, for calling its custom features. |
| onshape_get_metadataA | Read the properties of an element, or of one part when part is given. |
| onshape_set_metadataA | Write properties such as part number, description or material. Only editable properties are accepted; read onshape_get_metadata first to find the property ids. |
| onshape_requestA | Make an authenticated request to an arbitrary Onshape REST endpoint, for anything the dedicated tools do not cover. Paths start with /api/ and are documented at https://cad.onshape.com/glassworks/explorer. Prefer a dedicated tool when one exists — they normalise the response and validate the result. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 93 tools
Most tools have clearly distinct resource/action targets, and descriptions do a good job separating close pairs like fillet/chamfer, boolean/boolean_union, and feature/add_feature. Some overlap remains between generic escape-hatch tools and dedicated tools, and between several edge/body inspection tools.
Names consistently use the onshape_ prefix and snake_case, generally following a verb_noun or clear domain-noun pattern. Minor noun-style names like onshape_draft or onshape_mass_properties still fit the predictable scheme.
Although Onshape is a broad CAD domain, 93 tools is far beyond a practical MCP surface and imposes heavy selection overhead. Many low-level variants and escape hatches could be consolidated or deferred.
The surface covers authentication, documents, workspaces, elements, Part Studios, assemblies, drawings, Feature Studios, exports, metadata, and measurement quite thoroughly. Some lifecycle gaps remain, such as workspace creation/management and broader drawing annotation operations.