Skip to content

MCP Server Reference

The MCP server gives an AI agent the same production capabilities as the app. It runs next to a self-hosted Eryxon Flow with the Supabase service-role key, so keep it on trusted infrastructure. Every write uses the database functions the app uses (transition_operation, time_entry_action, transition_batch, add_batch_operations), so production rules, sequential release and webhook events behave exactly as in the terminal.

Setup and deployment: MCP Server Setup. Walk-through: MCP Demo Guide.

  • Protocol revision 2026-07-28 only, on @modelcontextprotocol/server 2.0. Transports: stdio, or stateless Streamable HTTP at /mcp (fresh server per request, no session id, bearer authentication). Clients negotiate with server/discover; a 2025-era initialize is answered -32022. The standard headers MCP-Protocol-Version, Mcp-Method and Mcp-Name are validated against the body on every request (-32020 on mismatch), and every result carries _meta["io.modelcontextprotocol/serverInfo"].
  • Every tool declares title, a JSON-Schema inputSchema and outputSchema (generated from zod), and annotations: readOnlyHint, destructiveHint, idempotentHint, openWorldHint (always false; the server only talks to your database). Results return structuredContent and a JSON text block. tools/list, prompts/list and resources/list advertise a one-hour shared cache hint; tools are listed in a stable, name-sorted order.
  • Deletes are multi-round-trip requests: the first call returns input_required with a confirmation elicitation and a sealed requestState; the client answers confirm: true and retries, and only then is the row deleted. Tampered or expired state is refused before the handler runs.
  • A refused production transition (database SQLSTATE 22023) is returned as a tool result with isError: true and {"error":{"code":"INVALID_STATE_TRANSITION","message":"<rule text>"}}, for example Stop active work before starting another operation or Previous operation must be completed first when sequential release is on. Other codes: NOT_FOUND, DUPLICATE_ENTRY, INVALID_REFERENCE, FORBIDDEN, VALIDATION_ERROR, DATABASE_ERROR, INTERNAL_ERROR. Invalid arguments are rejected by the SDK before the handler runs.
  • Job and part status and the current cell are derived from the operations; no tool sets them directly.
  • Writes the database attributes to a person (created_by on issues, assigned_by on assignments, recorded_by on production reports) take the id from the call or from MCP_ACTOR_ID.
ResourceContentCache
eryxon://jobsOpen jobs, earliest due first30 s, private
eryxon://jobs/{jobId}One job with parts and routingnone
eryxon://cellsCells in routing order with WIP limits1 h, shared
eryxon://cells/{cellId}/wipOpen operations at a cellnone
eryxon://timersRunning timers: who is clocked on whatnone

Prompts: release-plan-for-job (argument job_number) proposes what to release next respecting sequence and WIP limits; shift-handover summarises running work, Yellow Cards and overdue parts.

ToolTitleKindDescription
create_jobCreate jobwriteCreate a job. Add parts with create_part (optionally with their operations) afterwards.
delete_jobDelete jobwrite, destructiveSoft-delete a job (deleted_at). Asks for confirmation before deleting.
fetch_jobsFetch jobsread, idempotentList jobs; status and current cell follow their operations.
update_jobUpdate jobwrite, idempotentUpdate job details. Status cannot be set; it follows the operations.
ToolTitleKindDescription
attach_part_fileAttach part filewriteRegister an uploaded file path on a part so the terminal shows it (PDF → drawing, STEP/STP → 3D model).
create_partCreate partwriteCreate a part on a job, optionally with its routing (operations in sequence). Same contract as POST api-parts.
delete_partDelete partwrite, destructiveSoft-delete a part. Asks for confirmation before deleting.
fetch_partsFetch partsread, idempotentList parts with job number and customer.
get_part_routingPart routingread, idempotentThe operations of a part in sequence with cell, status and hours (get_part_routing).
request_part_file_uploadPart file upload URLwriteSigned upload URL (15 min) for a drawing/CAD file in the parts-cad bucket. PUT the file there, then call attach_part_file.
update_partUpdate partwrite, idempotentUpdate part details. Status and current cell follow the part’s operations.
ToolTitleKindDescription
complete_operationComplete operationwrite, idempotentComplete a started operation: closes running timers, stores actual time and refreshes part and job status.
complete_operationsComplete operations in bulkwriteComplete every open operation of a job, part or cell (or explicit ids) through the production lifecycle, in sequence order. Each transition is its own transaction; on failure the result says how far it got.
create_operationCreate operationwriteAdd an operation to a part’s routing at a cell. Sequence orders the routing; sequential release uses it.
delete_operationDelete operationwrite, destructiveSoft-delete an operation from the routing. Asks for confirmation before deleting.
fetch_active_time_entriesActive timersread, idempotentAll running timers (end_time is null) with operation and part.
fetch_operationsFetch operationsread, idempotentList operations with part and job numbers.
fetch_time_entriesFetch time entriesread, idempotentTime entries per operation or operator; active ones have no end_time.
pause_operationPause operationwrite, idempotentPause an in-progress operation and close its running timers.
pause_time_entryPause time entrywrite, idempotentPause time entry (time_entry_action). Pausing keeps the operation in progress; stopping closes the timer and stores its duration.
reschedule_operationsReschedule operationswriteSet or shift planned dates for operations selected by job, part, cell, customer or explicit ids.
resume_operationResume operationwrite, idempotentResume a paused operation.
resume_time_entryResume time entrywrite, idempotentResume time entry (time_entry_action). Pausing keeps the operation in progress; stopping closes the timer and stores its duration.
start_operationStart operationwrite, idempotentStart an operation (transition_operation). With operator_id a timer opens for that operator. Rule violations (already clocked elsewhere, standstill, sequential release) return INVALID_STATE_TRANSITION with the rule text.
stop_operationStop operator timerwrite, idempotentStop the given operator’s timer on an operation without completing it.
stop_time_entryStop time entrywrite, idempotentStop time entry (time_entry_action). Pausing keeps the operation in progress; stopping closes the timer and stores its duration.
update_operationUpdate operationwrite, idempotentUpdate routing (cell, sequence), times, planning dates or notes. Use the lifecycle tools to change status.
ToolTitleKindDescription
add_batch_operationsAdd operations to batchwrite, idempotentAppend operations to a batch (add_batch_operations); already-member operations are ignored.
create_batchCreate batchwriteCreate a batch at a cell and optionally add operations to it (same rules as POST api-batches: automated mode only for laser_nesting).
delete_batchDelete batchwrite, destructiveDelete a batch and its memberships. Asks for confirmation before deleting.
fetch_batchesFetch batchesread, idempotentOperation batches (nestings, tube/saw/finishing batches) with their cell.
start_batchStart batchwrite, idempotentStart batch (transition_batch): starts every member operation and opens the operator’s batch timer.
stop_batchStop batchwrite, idempotentStop batch (transition_batch): stops the batch timer and pauses its operations.
update_batchUpdate batchwrite, idempotentUpdate batch details or mark it ready/cancelled. Membership changes go through add_batch_operations.
ToolTitleKindDescription
add_substepAdd substepwriteAdd a substep to an operation; sequence defaults to the next free number.
apply_substep_templateApply substep templatewriteCopy a template’s items onto an operation as substeps, after its existing ones.
complete_substepComplete substepwrite, idempotentMark a substep completed.
delete_substepDelete substepwrite, destructiveDelete a substep permanently.
fetch_substep_templatesFetch substep templatesread, idempotentReusable substep checklists per operation type.
fetch_substepsFetch substepsread, idempotentList the substeps of an operation in sequence order.
update_substepUpdate substepwrite, idempotentRename, reorder or annotate a substep.
ToolTitleKindDescription
create_scrap_reasonCreate scrap reasonwriteAdd a scrap reason code.
delete_production_reportDelete production reportwrite, destructiveRemove a quantity report. Asks for confirmation before deleting.
fetch_operation_quantitiesFetch production reportsread, idempotentReported good/scrap/rework quantities per operation.
fetch_scrap_reasonsFetch scrap reasonsread, idempotentConfigured scrap reason codes.
get_quality_scoreQuality scoreread, idempotentA 0-100 quality score from yield (50%), weighted issues (30%) and issue resolution speed (20%).
get_scrap_analyticsScrap analyticsread, idempotentScrap totals over a period grouped by reason, cell, operation or material.
get_scrap_paretoScrap Paretoread, idempotentTop scrap reasons with share and cumulative share of total scrap.
get_scrap_trendsScrap trendsread, idempotentScrap, good and produced quantities per day or week.
get_yield_metricsYield metricsread, idempotentFirst-pass yield, scrap rate and rework rate overall and per cell.
report_productionReport productionwriteRecord output on an operation the way the terminal does: good, scrap and rework quantities with optional scrap reasons and material traceability.
seed_default_scrap_reasonsSeed default scrap reasonswrite, idempotentInsert the standard scrap reason set for the workshop (seed_default_scrap_reasons).
update_scrap_reasonUpdate scrap reasonwrite, idempotentEdit or deactivate a scrap reason.
ToolTitleKindDescription
create_issueReport issuewriteReport an issue on an operation like the terminal’s Report Issue. causes_standstill=true parks the operation under a Yellow Card until the issue is resolved. issue_type ‘ncr’ makes it a non-conformance report.
delete_issueDelete issuewrite, destructiveDelete an issue permanently. Asks for confirmation before deleting.
fetch_issuesFetch issuesread, idempotentIssues and NCRs with operation, part and job context.
get_issue_analyticsIssue analyticsread, idempotentIssue counts over a period grouped by severity, status, NCR category, cell or operation, with average resolution time.
get_issue_trendsIssue trendsread, idempotentIssues per day or week over a period, split by severity.
get_root_cause_analysisRoot cause analysisread, idempotentRecurring root causes over a period with affected cells and sample corrective actions.
resolve_issueResolve issuewrite, idempotentSet an issue to approved, rejected or closed with resolution notes. Resolving a standstill issue lifts the Yellow Card from its operation.
update_issueUpdate issuewrite, idempotentEdit severity, NCR fields or notes. Use resolve_issue to close it.
ToolTitleKindDescription
create_assignmentAssign workwriteAssign a job or part to an operator (profile) or shop-floor operator.
create_cellCreate cellwriteAdd a production cell/stage.
create_materialCreate materialwriteAdd a material to the catalogue.
create_operatorCreate operatorwriteCreate a shop-floor operator with a PIN (create_operator_with_pin).
create_resourceCreate resourcewriteAdd a machine, tool or fixture.
create_webhookCreate webhookwriteSubscribe an HTTPS URL to events. Every delivery is signed with the secret (X-Eryxon-Signature: t=,v1=).
delete_assignmentRemove assignmentwrite, destructiveRemove an operator assignment. Asks for confirmation before deleting.
delete_calendar_dayDelete calendar daywrite, destructiveRemove a calendar exception. Asks for confirmation before deleting.
delete_cellDelete cellwrite, destructiveSoft-delete a cell; operations routed through it keep their history. Asks for confirmation before deleting.
delete_materialDelete materialwrite, destructiveRemove a material from the catalogue. Asks for confirmation before deleting.
delete_resourceDelete resourcewrite, destructiveSoft-delete a resource. Asks for confirmation before deleting.
delete_webhookDelete webhookwrite, destructiveRemove a webhook subscription. Asks for confirmation before deleting.
fetch_assignmentsFetch assignmentsread, idempotentOperator assignments to jobs or parts.
fetch_cellsFetch cellsread, idempotentProduction cells (stages) in routing order with WIP limits.
fetch_factory_calendarFetch factory calendarread, idempotentCalendar exceptions: holidays, closures, half days and special working days.
fetch_materialsFetch materialsread, idempotentMaterial catalogue.
fetch_resourcesFetch resourcesread, idempotentMachines, tools and fixtures.
fetch_webhook_deliveriesFetch webhook deliveriesread, idempotentDelivery records per webhook: event, outcome, status code, attempts, latency and error.
fetch_webhooksFetch webhooksread, idempotentOutbound webhook subscriptions.
get_workshop_settingsWorkshop settingsread, idempotentFeature flags (sequentialRelease, operatorTerminalWorkModes, …), factory hours, timezone and location tracking of the workshop.
list_operatorsList operatorsread, idempotentShop-floor operators (PIN accounts) with lock state (list_operators).
redeliver_webhookRedeliver webhook eventwrite, idempotentDeliver a failed or past delivery again (webhook_redeliver).
reset_operator_pinReset operator PINwrite, idempotentSet a new PIN for an operator (reset_operator_pin).
send_test_webhookSend test webhookwriteDeliver a signed test event to a webhook (webhook_send_test); the result shows up in fetch_webhook_deliveries.
set_calendar_daySet calendar daywrite, idempotentCreate or replace the calendar entry for a date (holiday, closure, half day or working day with custom hours).
unassign_resourceUnassign resourcewrite, destructiveRemove a resource assignment from an operation.
unlock_operatorUnlock operatorwrite, idempotentClear a PIN lockout (unlock_operator).
update_cellUpdate cellwrite, idempotentRename, reorder or change WIP limits of a cell.
update_materialUpdate materialwrite, idempotentEdit a material.
update_operatorUpdate operatorwrite, idempotentRename or deactivate an operator.
update_resourceUpdate resourcewrite, idempotentChange a resource’s status, location or details.
update_webhookUpdate webhookwrite, idempotentChange name, URL, events, secret or activation.
update_workshop_settingsUpdate workshop settingswrite, idempotentMerge feature flags (e.g. {“sequentialRelease”: true} to block starting an operation before its predecessor is completed) and change factory hours or location tracking.
ToolTitleKindDescription
create_notificationCreate notificationwritePost an in-app notification to a user (create_notification).
fetch_activity_logFetch activity logread, idempotentAudit trail of actions with actor and entity.
fetch_notificationsFetch notificationsread, idempotentIn-app notifications.
fetch_storage_locationsFetch storage locationsread, idempotentPhysical locations (racks, carts, shelves) used for part placement.
get_cell_wipCell WIP metricsread, idempotentQRM metrics for one cell: current WIP against its limit and the next-cell capacity signal the terminal shows (get_cell_qrm_metrics, check_next_cell_capacity).
mark_notification_readMark notification readwrite, idempotentMark one notification as read (mark_notification_read).
place_partPlace partwriteRecord where a part physically is (part_placements). Closes any open placement of that part first.
remove_part_placementRemove part placementwrite, idempotentClose the open placement of a part (it left the location).
ToolTitleKindDescription
get_cell_capacityCell capacityread, idempotentWIP against limits per cell: running and queued operations, queued hours and capacity warnings.
get_dashboard_statsDashboard statsread, idempotentCounts of jobs, parts, operations and issues by status.
get_production_metricsProduction metricsread, idempotentCompleted jobs and operations plus good/scrap quantities and yield for a period (default last 30 days).
ToolTitleKindDescription
assign_resource_to_operationsAssign resourcewrite, idempotentAssign a resource (by id or name) to explicit operations or to all open operations of a job, part or cell.
check_resource_availabilityResource availabilityread, idempotentActive resources (machines, tools, fixtures) with their current operation assignments.
fetch_parts_by_customerParts by customerread, idempotentOpen parts for a customer (case-insensitive match), grouped by job with operation progress.
get_job_overviewJob overviewread, idempotentA job with its parts, operations, progress and issue counts.
get_parts_due_soonParts due soonread, idempotentOpen parts whose job is due within N days, with progress and the next operation that blocks completion.
prioritize_jobPrioritize jobwrite, idempotentRush a job: sets the QRM bullet card on all its open parts and optionally appends a priority note.
suggest_rescheduleSuggest rescheduleread, idempotentCapacity bottlenecks, consolidation options with the same customer and target-date feasibility for a job.
update_partsUpdate parts in bulkwrite, idempotentSet the bullet-card flag or notes on all open parts of a job, or on explicit part ids.

The server’s src/coverage.ts maps every app and REST capability to these tools and its test suite fails when the map has a gap.