Skip to main content
Glama
mastercam-mcp

mastercam-mcp

by Praket7

Mastercam MCP

Illustration of a CNC turning workflow

Watch the sample data walkthrough

View a sample NC review image

MCP means Model Context Protocol. It lets an AI assistant request information from other software through named tools. Mastercam MCP connects those tools to a local Mastercam session. It can inspect a job, show a proposed change to an operator, then check the result.

You can also run the portable tools without Mastercam. That mode uses sample data. Use it to learn the workflow. Use it to check the software. It does not prove that a real Mastercam job will behave the same way.

What it can do today

The local tools review job data that you provide. They compare tool lists. They check supported moves in an NC program, which is machine code. They estimate time from listed moves. They calculate thread guidance from confirmed dimensions. They create setup notes. They suggest tools from a catalog you provide. They draft an outside diameter turning plan.

When audit collection is enabled, a tool reads recent safety events and checks the retained log's integrity. It only covers events recorded by this MCP server.

The turning plan is a proposal. It does not create a Mastercam operation. It does not make machine code. Thread guidance needs a confirmed thread size. Confirmed dimensions work too. NC review reports unknown moves when it cannot understand a command. An unknown result gives no safety conclusion. Mastercam Verify remains necessary. Machine simulation remains necessary. A shop prove out remains necessary.

A setup sheet uses data supplied to that call. Use the job context tool first to gather the fields that the active backend can provide.

The default MCP catalog presents 24 tools for common workflows. One readiness report replaces several setup checks, and one job context report gathers part, geometry, machine, stock, coordinate, post, operation, and tool information while marking unavailable sections. Set MASTERCAM_MCP_TOOLSET=full to expose specialist workflows. The shorter catalog removes duplicate and vague choices without deleting those advanced tools.

On a licensed Windows workstation, the native add in has a limited read path. Mastercam 2027 has an optional operation snapshot. That snapshot remains under acceptance testing. The older adapter reports the environment only. The server labels each capability with its tested level.

Related MCP server: vred-mcp

Choose how to run it

Mode

What you need

What it proves

Sample mode

Node.js 22+

Tries the workflow with sample data

Local file review

Node.js 22+ plus exported job data

Reviews the data you supplied

Mastercam status

Windows, licensed Mastercam, matching integration files

Reports the installed Mastercam environment

Mastercam 2027 read candidate

The same items plus a supervised acceptance run

Reads a limited operation list on that workstation

A passing sample check does not prove live Mastercam access. The Mastercam 2027 read candidate does not prove that every job detail is available. Stock data remains outside verified coverage. Work offset settings remain outside verified coverage. Cutting paths remain outside verified coverage. Machine simulation remains outside verified coverage.

Try the fixture

Install Node.js 22+. Open this project in a terminal. Run the commands below.

pnpm install
pnpm run build
pnpm test
pnpm run smoke

Sample mode uses synthetic job data. It cannot modify a real Mastercam document.

Install status

Install the current npm release with the commands below. For development, clone the source instead.

npm install --global mastercam-mcp@latest
mastercam-mcp serve

Connect Mastercam on Windows

A live connection needs a licensed Windows copy of Mastercam. It needs matching local NET Hook files. Install the .NET SDK required by that release. The installer needs administrator approval to copy the add in into the protected Mastercam folder.

Set MASTERCAM_MCP_ENABLE_STAGE_B_READS to 1 in the shell that starts Mastercam. The add in reads this setting when the application starts.

Keep the server read only during initial checks. Run the live acceptance command from the same workstation. The report separates a working operation snapshot from complete live inspection. Only a licensed acceptance run can confirm the native connection.

Write protection

The server starts read only. A write profile alone does not allow a change. Set MASTERCAM_MCP_PROFILE to write. Set MASTERCAM_MCP_HARD_READ_ONLY to 0 to opt in. The MCP tool list reflects both settings. A tool blocked by either setting does not appear in the list.

Before a change, the server creates a preview tied to the operation plus document revision. The MCP client must show the exact before/after values to the operator. The server checks the document again before apply. If the connected client cannot show an approval request, the change is refused.

Posting is not available. Machine control is not available. Program transfer is not available. Cycle start is not available. Arbitrary code execution is not available.

What the analysis does not prove

The NC reader checks a limited set of common straight moves plus circular moves. Unsupported cycles remain unknown. Macros remain unknown. Coordinate transforms remain unknown. Rotary moves remain unknown. Controller behavior remains unknown. Missing offsets skip some travel checks. Unknown means the program needs another review.

A shop JSON file can supply the tool catalog. A supported manufacturer feed works too. The server does not open proprietary .TOOLDB files. Thread calculations use dimensions you provide. The server does not read thread features from CAD. A turning plan is a structured proposal. It is not an executable toolpath.

These limits protect the meaning of the output. A useful review can flag concerns. It cannot certify a program as safe to run.

Learn more

Local models explains how to select a smaller tool catalog for a client connected to a local model, including an 8 GB hardware evaluation checklist.

Installation steps explain setup on Windows, macOS, Linux.

Shop workflows explain setup notes, tool lists, NC comparisons, machine checks.

Capability status lists each feature with its current evidence level.

Full readiness review records release gaps, unverified features, remaining acceptance work.

Tool catalog guide explains the compact default and how to expose specialist workflows.

Security policy explains how to report a security issue.

Available Tools

59 tools
analyze_cycle_timeC
Read-onlyIdempotent

Decompose supplied motion/events into cutting and non-cutting time and identify reviewable air-time opportunities

Inputs: events (required), machineRapidRate (required), defaultToolChangeSeconds, opportunityThresholdSeconds. Returns: ok, data, live, tool, +4 more

analyze_nc_programB
Read-onlyIdempotent

Parse bounded linear and planar G-code arc motion; flag risky rapids, feed/spindle limits, unsupported motion, and reviewable cycle-time evidence

Inputs: units (required), machine (required), program (required), coordinateFrame (required), +14 more. Returns: ok, data, live, tool, +4 more

analyze_post_regressionA
Read-onlyIdempotent

Risk-rank semantic NC changes against an approved baseline for human review

Inputs: after (required), before (required), displayLimit. Returns: ok, data, live, tool, +4 more

analyze_regeneration_impactA
Read-onlyIdempotent

Trace direct and transitive operation dependencies affected by a programming change

Inputs: operations (required), changedOperationIds (required). Returns: ok, data, live, tool, +4 more

analyze_toolpath_riskB
Read-onlyIdempotent

Check supplied toolpath segments for travel, rapid, fixture-envelope, limit, and approach-angle risks

Inputs: machine (required), segments (required), safeZ, stock, +3 more. Returns: ok, data, live, tool, +4 more

apply_operation_parameter_previewA
Destructive

Apply a previewed change using its approval token; refuses stale state

Inputs: approvalToken (required), idempotencyKey. Returns: ok, data, live, tool, +4 more

assertC
Read-onlyIdempotent

Verify that a measured value matches an expected value

Inputs: operationId (required), path, equals. Returns: ok, data, live, tool, +4 more

calculate_thread_tapB
Read-onlyIdempotent

Calculate grounded metric or unified thread/tapping geometry, tap drill, RPM, and feed from supplied geometry

Inputs: system (required), geometry (required), rpm, tapType, +2 more. Returns: ok, data, live, tool, +4 more

capture_viewA
Read-onlyIdempotent

Capture a bounded view image of the Mastercam graphics window

Inputs: width, format, height. Returns: ok, data, live, tool, +4 more

client_setup_checkA
Read-onlyIdempotent

Validate client configuration readiness

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

compare_nc_filesB
Read-onlyIdempotent

Compare two NC files with sequence diffing and semantic summary

Inputs: after (required), before (required). Returns: ok, data, live, tool, +4 more

compare_tool_databasesC
Read-onlyIdempotent

Compare two tool database snapshots semantically

Inputs: left (required), right (required). Returns: ok, data, live, tool, +4 more

compare_toolpathsC
Read-onlyIdempotent

Compare two operations' toolpaths

Inputs: afterOperationId (required), beforeOperationId (required). Returns: ok, data, live, tool, +4 more

detect_collisionsB
Read-only

Run collision detection for selected operations

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

discover_capabilitiesA
Read-onlyIdempotent

Show available capabilities grouped by workflow stage

Inputs: category. Returns: ok, data, live, tool, +4 more

estimate_cycle_timeC
Read-onlyIdempotent

Estimate cycle time for selected operations

Inputs: operationIds. Returns: ok, data, live, tool, +4 more

explain_operationB
Read-onlyIdempotent

Explain an operation from its actual returned parameters

Inputs: operationId (required). Returns: ok, data, live, tool, +4 more

find_operationsB
Read-onlyIdempotent

Search operations by name, type, or tool number

Inputs: limit, query, toolNumber, operationType. Returns: ok, data, live, tool, +4 more

generate_operation_packetC
Read-onlyIdempotent

Generate setup and operation notes from the supplied operation tree and tool records

Inputs: wcs, part, notes, stock, +5 more. Returns: ok, data, live, tool, +4 more

generate_setup_sheetB
Read-onlyIdempotent

Create a revision-ready setup sheet from inspection data

Inputs: wcs, part, notes, stock, +3 more. Returns: ok, data, live, tool, +4 more

get_active_partA
Read-onlyIdempotent

Inspect the active Mastercam part document

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_audit_historyB
Read-onlyIdempotent

Describe the append-only audit log and current document revision

Inputs: limit. Returns: ok, data, live, tool, +4 more

get_compatibility_matrixB
Read-onlyIdempotent

Show supported Mastercam releases and verification status

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_dirty_toolpathsC
Read-onlyIdempotent

List operations whose mapped dirty state requires regeneration and preserve unknown state

Inputs: operationIds. Returns: ok, data, live, tool, +4 more

get_fixture_infoA
Read-onlyIdempotent

Describe the active fixture backend and its limitations

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_geometry_summaryA
Read-onlyIdempotent

Summarize geometry counts and bounding box without dumping entities

Inputs: operationId. Returns: ok, data, live, tool, +4 more

get_machine_contextA
Read-onlyIdempotent

Return machine, stock, workholding, and coordinate context

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_machine_groupsA
Read-onlyIdempotent

List machine groups (alias of list_machine_groups)

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_operationA
Read-onlyIdempotent

Retrieve one operation by exact id; no fallback targeting

Inputs: operationId (required). Returns: ok, data, live, tool, +4 more

get_operation_parametersB
Read-onlyIdempotent

Retrieve one operation's proven parameters by exact id

Inputs: operationId (required). Returns: ok, data, live, tool, +4 more

get_operation_risksC
Read-onlyIdempotent

Report verification scope and concrete risks for an operation

Inputs: operationId (required). Returns: ok, data, live, tool, +4 more

get_post_processorA
Read-onlyIdempotent

Report the assigned post processor metadata

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_programming_contextB
Read-onlyIdempotent

Bounded live/fixture context bundle with operations, referenced tools, revision, coverage, and explicit unknowns

Inputs: includeGeometry. Returns: ok, data, live, tool, +4 more

get_selected_entitiesA
Read-onlyIdempotent

Report selected entities grouped by type

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_selectionA
Read-onlyIdempotent

Report currently selected operations

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_stockA
Read-onlyIdempotent

Report stock definition and units

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_toolB
Read-onlyIdempotent

Retrieve one referenced active-operation tool by id, number, or exact name

Inputs: toolId (required). Returns: ok, data, live, tool, +4 more

get_toolpath_statusB
Read-onlyIdempotent

Report mapped toolpath dirty/current/unknown state for an operation

Inputs: operationId (required). Returns: ok, data, live, tool, +4 more

get_version_reportC
Read-onlyIdempotent

Report detected Mastercam and NET-Hook compatibility

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

get_wcsA
Read-onlyIdempotent

Report the active work coordinate system

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

inspectC
Read-onlyIdempotent

Inspect a target and return its current values

Inputs: operationId (required), path. Returns: ok, data, live, tool, +4 more

list_machine_groupsA
Read-onlyIdempotent

List machine groups in the document

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

list_operationsC
Read-onlyIdempotent

List operations with explicit quantities and pagination

Inputs: limit, offset, operationType. Returns: ok, data, live, tool, +4 more

list_tool_categoriesA
Read-onlyIdempotent

List tools by read, preview, write, advanced, and forbidden category

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

list_toolsA
Read-onlyIdempotent

List tools referenced by active operations; does not claim complete library coverage

Inputs: limit. Returns: ok, data, live, tool, +4 more

manufacturing_preflightB
Read-onlyIdempotent

Run deterministic programming preflight and return blockers, warnings, unknowns, and evidence without claiming machine safety

Inputs: wcs, part, post, stock, +5 more. Returns: ok, data, live, tool, +4 more

mastercam_capabilitiesB
Read-onlyIdempotent

Report which capabilities the active backend genuinely supports

Inputs: refresh. Returns: ok, data, live, tool, +4 more

mastercam_doctorA
Read-onlyIdempotent

Check local prerequisites, configuration, and bridge readiness

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

mastercam_helpA
Read-onlyIdempotent

Explain the available Mastercam MCP tools and safety levels

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

mastercam_planB
Read-onlyIdempotent

Create a safe inspect, preview, approve, apply, verify plan

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

mastercam_statusA
Read-onlyIdempotent

Report live Mastercam connection status and adapter identity

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

measureC
Read-onlyIdempotent

Measure one named value on a Mastercam target

Inputs: operationId (required), path. Returns: ok, data, live, tool, +4 more

plan_od_rough_finishB
Read-only

Create a non-executable rough-plus-finish OD turning plan using supplied or configured catalog and active-job tools

Inputs: units (required), intent (required), profile (required), material (required), +6 more. Returns: ok, data, live, tool, +4 more

preview_operation_parametersA
Read-only

Preview a feed/spindle change and receive a single-use approval token

Inputs: changes (required), operationId (required), idempotencyKey. Returns: ok, data, live, tool, +4 more

recommend_job_toolingC
Read-onlyIdempotent

Rank supplied shop or ISO 13399 catalog tool records against grounded job features and material

Inputs: features (required), material (required), topK, tools, +2 more. Returns: ok, data, live, tool, +4 more

rollback_changeA
Destructive

Roll back an applied transaction using its server-held receipt

Inputs: transactionId (required), idempotencyKey. Returns: ok, data, live, tool, +4 more

run_simulationA
Read-only

Run Mastercam simulation and return provenance-tagged evidence

Inputs: no named parameters. Returns: ok, data, live, tool, +4 more

validate_machine_profileC
Read-onlyIdempotent

Validate an operation against a declared machine profile

Inputs: profile (required), operation (required). Returns: ok, data, live, tool, +4 more

verify_changeB
Read-onlyIdempotent

Reread an operation and verify expected feed/spindle values

Inputs: expected (required), operationId (required), transactionId, documentRevision. Returns: ok, data, live, tool, +4 more

Tool Schema Changelog

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

Loading tool schema changelog…

    TDQS

    C2.9/5.0

    Scored across 59 tools

    Disambiguation2/5

    Multiple tools have unclear boundaries: get_machine_groups is an explicit alias of list_machine_groups, and get_machine_context, get_programming_context, get_stock, get_wcs, and get_active_part all return overlapping document context. Diagnostics are heavily duplicated across mastercam_status, mastercam_capabilities, discover_capabilities, mastercam_doctor, client_setup_check, get_version_report, get_compatibility_matrix, and list_tool_categories. Bare-verb tools like inspect, measure, and assert are near-indistinguishable without reading full schemas.

    Naming Consistency3/5

    Most tools follow a snake_case verb_noun pattern, but there are notable deviations: the mastercam_-prefixed noun-first family (mastercam_status, mastercam_doctor, mastercam_capabilities), bare imperatives (inspect, measure, assert), and noun-first queries (capture_view, estimate_cycle_time). The get_machine_groups/list_machine_groups pair also shows inconsistent verb choice for the same operation.

    Tool Count2/5

    Fifty-nine tools is far too many for a coherent surface, and a meaningful fraction are near-duplicates (aliases, redundant capability/diagnostic reporters, overlapping cycle-time and comparison analyzers). The domain is broad, but the same coverage could be delivered with far fewer, better-differentiated tools.

    Completeness4/5

    Coverage is genuinely deep: inspection, context gathering, preview/approve/apply with tokens, verification, rollback, audit history, simulation, and comparison workflows are all present. Gaps are minor rather than structural (e.g., no clear tool for creating or editing operations themselves), and the safety lifecycle is fully closed.

    Maintenance

    ActivityMaintained
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      B
      maintenance
      MCP server for controlling a live SOLIDWORKS session through the Windows COM API, enabling native CAD operations like sketches, features, bodies, views, and exports, plus transactional plans and vectorization.
      11
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      A local MCP server that enables MCP-compatible AI clients to inspect and control the currently open scene in a running Autodesk VRED Professional 2027 instance via a secure bridge, supporting read-only inspection and gated mutations like selection, visibility, transforms, and screenshots.
      MIT
    • A
      license
      C
      quality
      C
      maintenance
      Enables MCP-capable AI clients to connect to local ANSYS Mechanical and Workbench for read-only inspection and bounded model, material, load, mesh, solve, result, and save operations via PyMechanical/gRPC.
      27
      MIT
    • A
      license
      B
      quality
      B
      maintenance
      Enables compatible MCP clients to inspect drawings, read units, layers, and entities, and create, edit, transform, or delete CAD objects through a local named-pipe bridge to AutoCAD 2025.
      23
      1
      MIT