mastercam-mcp
This MCP server lets an AI assistant inspect and analyze Mastercam job data, operations, tools, NC programs, and toolpath risks, with controlled write workflows only when explicitly enabled.
Check server/Mastercam health: connection status, capabilities, help, tool categories, compatibility, doctor, version report, client setup, fixture info, and audit history.
Inspect job data: active part, geometry summary, selections, machine groups/context, stock, WCS, post processor, and programming context.
Work with operations and tools: list/find/get/explain operations and parameters, check risks and dirty/toolpath status, retrieve referenced tools, and compare toolpaths.
Analyze and estimate: cycle time, NC program semantics, post regressions, regeneration impact, toolpath risk, machine-profile validity, and manufacturing preflight.
Generate planning artifacts: setup sheets, operation packets, thread/tap calculations, OD rough/finish turning plans, and tooling recommendations.
Verify and review: inspect/measure/assert/verify expected values, capture bounded view images, and run simulation or collision checks.
Controlled writes if enabled: preview/apply/rollback feed or spindle parameter changes using approval tokens and stale-state checks.
Safety defaults: read-only by default; write tools are blocked/hidden unless profile and hard-read-only settings allow them, and posting, machine control, transfer, cycle start, and arbitrary code execution are unavailable.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@mastercam-mcp list the toolpaths in the current Mastercam part"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Mastercam MCP

Watch the sample data walkthrough
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 smokeSample 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 serveConnect 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 toolsanalyze_cycle_timeCRead-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_programBRead-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_regressionARead-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_impactARead-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_riskBRead-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_previewADestructive
Apply a previewed change using its approval token; refuses stale state
Inputs: approvalToken (required), idempotencyKey. Returns: ok, data, live, tool, +4 more
assertCRead-onlyIdempotent
Verify that a measured value matches an expected value
Inputs: operationId (required), path, equals. Returns: ok, data, live, tool, +4 more
calculate_thread_tapBRead-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_viewARead-onlyIdempotent
Capture a bounded view image of the Mastercam graphics window
Inputs: width, format, height. Returns: ok, data, live, tool, +4 more
client_setup_checkARead-onlyIdempotent
Validate client configuration readiness
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
compare_nc_filesBRead-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_databasesCRead-onlyIdempotent
Compare two tool database snapshots semantically
Inputs: left (required), right (required). Returns: ok, data, live, tool, +4 more
compare_toolpathsCRead-onlyIdempotent
Compare two operations' toolpaths
Inputs: afterOperationId (required), beforeOperationId (required). Returns: ok, data, live, tool, +4 more
detect_collisionsBRead-only
Run collision detection for selected operations
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
discover_capabilitiesARead-onlyIdempotent
Show available capabilities grouped by workflow stage
Inputs: category. Returns: ok, data, live, tool, +4 more
estimate_cycle_timeCRead-onlyIdempotent
Estimate cycle time for selected operations
Inputs: operationIds. Returns: ok, data, live, tool, +4 more
explain_operationBRead-onlyIdempotent
Explain an operation from its actual returned parameters
Inputs: operationId (required). Returns: ok, data, live, tool, +4 more
find_operationsBRead-onlyIdempotent
Search operations by name, type, or tool number
Inputs: limit, query, toolNumber, operationType. Returns: ok, data, live, tool, +4 more
generate_operation_packetCRead-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_sheetBRead-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_partARead-onlyIdempotent
Inspect the active Mastercam part document
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_audit_historyBRead-onlyIdempotent
Describe the append-only audit log and current document revision
Inputs: limit. Returns: ok, data, live, tool, +4 more
get_compatibility_matrixBRead-onlyIdempotent
Show supported Mastercam releases and verification status
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_dirty_toolpathsCRead-onlyIdempotent
List operations whose mapped dirty state requires regeneration and preserve unknown state
Inputs: operationIds. Returns: ok, data, live, tool, +4 more
get_fixture_infoARead-onlyIdempotent
Describe the active fixture backend and its limitations
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_geometry_summaryARead-onlyIdempotent
Summarize geometry counts and bounding box without dumping entities
Inputs: operationId. Returns: ok, data, live, tool, +4 more
get_machine_contextARead-onlyIdempotent
Return machine, stock, workholding, and coordinate context
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_machine_groupsARead-onlyIdempotent
List machine groups (alias of list_machine_groups)
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_operationARead-onlyIdempotent
Retrieve one operation by exact id; no fallback targeting
Inputs: operationId (required). Returns: ok, data, live, tool, +4 more
get_operation_parametersBRead-onlyIdempotent
Retrieve one operation's proven parameters by exact id
Inputs: operationId (required). Returns: ok, data, live, tool, +4 more
get_operation_risksCRead-onlyIdempotent
Report verification scope and concrete risks for an operation
Inputs: operationId (required). Returns: ok, data, live, tool, +4 more
get_post_processorARead-onlyIdempotent
Report the assigned post processor metadata
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_programming_contextBRead-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_entitiesARead-onlyIdempotent
Report selected entities grouped by type
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_selectionARead-onlyIdempotent
Report currently selected operations
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_stockARead-onlyIdempotent
Report stock definition and units
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_toolBRead-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_statusBRead-onlyIdempotent
Report mapped toolpath dirty/current/unknown state for an operation
Inputs: operationId (required). Returns: ok, data, live, tool, +4 more
get_version_reportCRead-onlyIdempotent
Report detected Mastercam and NET-Hook compatibility
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
get_wcsARead-onlyIdempotent
Report the active work coordinate system
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
inspectCRead-onlyIdempotent
Inspect a target and return its current values
Inputs: operationId (required), path. Returns: ok, data, live, tool, +4 more
list_machine_groupsARead-onlyIdempotent
List machine groups in the document
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
list_operationsCRead-onlyIdempotent
List operations with explicit quantities and pagination
Inputs: limit, offset, operationType. Returns: ok, data, live, tool, +4 more
list_tool_categoriesARead-onlyIdempotent
List tools by read, preview, write, advanced, and forbidden category
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
list_toolsARead-onlyIdempotent
List tools referenced by active operations; does not claim complete library coverage
Inputs: limit. Returns: ok, data, live, tool, +4 more
manufacturing_preflightBRead-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_capabilitiesBRead-onlyIdempotent
Report which capabilities the active backend genuinely supports
Inputs: refresh. Returns: ok, data, live, tool, +4 more
mastercam_doctorARead-onlyIdempotent
Check local prerequisites, configuration, and bridge readiness
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
mastercam_helpARead-onlyIdempotent
Explain the available Mastercam MCP tools and safety levels
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
mastercam_planBRead-onlyIdempotent
Create a safe inspect, preview, approve, apply, verify plan
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
mastercam_statusARead-onlyIdempotent
Report live Mastercam connection status and adapter identity
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
measureCRead-onlyIdempotent
Measure one named value on a Mastercam target
Inputs: operationId (required), path. Returns: ok, data, live, tool, +4 more
plan_od_rough_finishBRead-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_parametersARead-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_toolingCRead-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_changeADestructive
Roll back an applied transaction using its server-held receipt
Inputs: transactionId (required), idempotencyKey. Returns: ok, data, live, tool, +4 more
run_simulationARead-only
Run Mastercam simulation and return provenance-tagged evidence
Inputs: no named parameters. Returns: ok, data, live, tool, +4 more
validate_machine_profileCRead-onlyIdempotent
Validate an operation against a declared machine profile
Inputs: profile (required), operation (required). Returns: ok, data, live, tool, +4 more
verify_changeBRead-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
Scored across 59 tools
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.
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.
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.
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
Related MCP Connectors
Read-only MCP for DualSoft AAS 3.0 / AASX specs, DS2 PLC control docs, and 3D line examples.
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Ovanek MCP: Model Context Protocol server for Ovanek platform tools; writes are dry-run by default.
Headless CAD engine & MCP server for 2D/3D drafting, solids, DXF/SVG export, and automation.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceMCP 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.11MIT
- AlicenseNot gradedqualityDmaintenanceA 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
- AlicenseCqualityCmaintenanceEnables 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.27MIT
- AlicenseBqualityBmaintenanceEnables 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.231MIT