Skip to main content
Glama
gpambrozio

onshape-mcp

by gpambrozio

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
ONSHAPE_WSNoDefault target workspace; this argument becomes optional when set
ONSHAPE_DOCNoDefault target document; this argument becomes optional when set
ONSHAPE_ELEMNoDefault target element; this argument becomes optional when set
ONSHAPE_BASE_URLNoOnshape API hosthttps://cad.onshape.com
ONSHAPE_ACCESS_KEYNoOnshape API access key. Use this key pair instead of signing in.
ONSHAPE_MCP_CONFIGNoCredential file path~/.onshape-mcp/credentials.json
ONSHAPE_SECRET_KEYNoOnshape API secret key. Use this key pair instead of signing in.
ONSHAPE_TIMEOUT_MSNoPer-request timeout120000
ONSHAPE_MCP_AUTO_LOGINNoSet to 0 to stop tool calls from starting a browser sign-in
ONSHAPE_MCP_NO_BROWSERNoSet to 1 to never launch a browser; the URL is reported instead
ONSHAPE_MCP_OUTPUT_DIRNoWhere relative export paths landworking directory
ONSHAPE_OAUTH_CLIENT_IDNoOAuth app client ID to sign in with, instead of an API key
ONSHAPE_MCP_SIGNIN_WAIT_MSNoHow long a call waits for sign-in120000
ONSHAPE_OAUTH_CLIENT_SECRETNoOAuth app client secret to sign in with, instead of an API key
ONSHAPE_MCP_MAX_RESPONSE_BYTESNoResponse size before spilling to a file200000

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

CapabilityDetails
tools
{
  "listChanged": true
}

Tools

Functions exposed to the LLM to take actions

NameDescription
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_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.

onshape_holeA

Extrude a sketch as a cut (op=REMOVE). Sketch a circle first, then cut it through the body.

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_edgesB

Every edge of every solid body, with its deterministic id, owning body, type and radius (inches).

onshape_find_circular_edgesB

Circular edges, optionally only those matching a radius — the usual way to pick hole rims to fillet.

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.

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 configuration.

onshape_export_stlA

Export the Part Studio as STL, for 3D printing. Measure the model before exporting it.

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_instanceA

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_featuresB

The mates, mate connectors and groups defined in an assembly, with their feature ids.

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_mateB

Join two or more mate connectors with a mate: FASTENED, REVOLUTE, SLIDER, PLANAR, and so on.

onshape_assembly_groupA

Lock several instances together without individual mates.

onshape_assembly_add_featureA

Post a hand-written assembly feature payload — the escape hatch for mate types with no tool here.

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

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

B3.4/5.0

Scored across 87 tools

Disambiguation4/5

Almost every tool names a distinct resource plus action, and the onshape_ prefix with object nouns keeps categories like document, feature, assembly and drawing separate. A few pairs are easy to confuse—get_feature_specs vs get_feature_studio_specs, extrude vs hole, boolean vs boolean_union—but the descriptions clarify them well enough.

Naming Consistency4/5

All 87 tools use the onshape_ prefix and snake_case, and the dominant get/create/update/delete/list vocabulary is predictable. Deviations like hole, thicken, shell, boolean_union, mass_properties and thumbnail_info keep it from being perfectly uniform.

Tool Count1/5

87 tools far exceeds the 50+ threshold for an extreme count mismatch, making the tool surface hard for an agent to survey. Many specialized helpers like sketch_rectangle, sketch_line and sketch_candy_cane_path duplicate what create_sketch or onshape_request could already express, so the set feels driven by endpoint coverage rather than curation.

Completeness4/5

The set covers document and element lifecycle, feature-tree CRUD, sketching, common modeling operations, assemblies, drawings, export and metadata very broadly for a CAD platform. Obvious gaps like workspace creation/deletion and element rename/copy remain, though onshape_request provides a workable escape hatch.

Maintenance

ActivityMaintained
ResponsivenessNo issues