OrderOps MCP

OrderOps MCP

Enables AI assistants to investigate and safely resolve commerce order exceptions, such as expired inventory reservations, by providing a workflow across synthetic order, payment, inventory, and fulfillment systems.

Category
Visit Server

README

OrderOps MCP

OrderOps is a small, AI-native operations service for investigating and safely resolving commerce order exceptions. It gives an MCP-capable assistant a coherent workflow across synthetic order, payment, inventory, and fulfillment systems without requiring an operator to ask an engineer for every trace.

Source repository: https://github.com/Flamki/order-ops-mcp

The deliberately narrow automated path is an expired inventory reservation: when payment is captured, stock is available, and fulfillment is blocked on the missing reservation, an operator can review a state-bound proposal and approve a re-reservation. Payment changes, customer data, refunds, cancellations, and customer contact are never automated.

Hosted endpoint

  • MCP: https://order-ops-mcp.shared-trapezoid.workers.dev/mcp
  • Health: https://order-ops-mcp.shared-trapezoid.workers.dev/health

The Cloudflare deployment has been claimed by its owner and the deployed Streamable HTTP endpoint has been verified with the included MCP client. Proposal, execution, and idempotency state is coordinated in one SQLite-backed Durable Object.

Product workflow

  1. orders_list_exceptions discovers the three synthetic exception cases.
  2. orders_investigate joins evidence from the OMS, payment processor, inventory service, and fulfillment provider.
  3. orders_propose_resolution rechecks policy and creates a 10-minute proposal bound to the current order-state fingerprint.
  4. The assistant presents the evidence, exact changes, and approval phrase to a human and stops.
  5. orders_execute_resolution validates exact approval, expiry, unchanged state, policy preconditions, and an idempotency key before mutating the synthetic order.
  6. The operator receives a structured before/after receipt. An exact retry returns the original receipt and does not mutate twice.

The MCP is the product boundary, not a wrapper around a separate UI. Tool descriptions tell the model when to call each capability, Zod schemas advertise and validate inputs and structured outputs, annotations identify read and write behavior, and the server exposes the governing runbook as an MCP resource. A prompt provides a client-independent triage workflow.

MCP surface

Capability Role Side effect
orders_list_exceptions Discover synthetic cases None
orders_investigate Explain cross-system root cause and evidence None
orders_propose_resolution Create a short-lived, state-bound proposal No order mutation
orders_execute_resolution Apply the single permitted resolution and return a receipt Mutates synthetic state
demo_reset_synthetic_state Let another evaluator replay the synthetic workflow Clears all demo state
ops://runbooks/order-exceptions/v1 Machine-readable automation policy None
triage-order-exception Prompt that enforces investigate → propose → wait None

Demo cases

Order Diagnosis Automated?
ORD-1001 Captured payment, expired reservation, fulfillment blocked, stock available Yes, with explicit approval
ORD-1002 Payment failed No
ORD-1003 Invalid shipping address No
ORD-1004 Healthy control order No action needed

All records are synthetic and contain no customer PII or production credentials.

Test with an MCP client

Use the MCP Inspector and connect to http://localhost:8787/mcp:

npx @modelcontextprotocol/inspector@latest

Or use the included real Streamable HTTP client:

npm install
npm run dev

In a second terminal:

npm run demo

The default demo stops before mutation. Only after reviewing the proposal:

npm run demo -- --execute-approved

If another evaluator has already resolved the shared synthetic order:

npm run demo -- --reset-first --execute-approved

To target a deployed server:

$env:MCP_URL = "https://your-worker.workers.dev/mcp"
npm run demo

Verify and deploy

Requirements: Node.js 22+ and npm.

npm install
npm run verify
npx wrangler deploy --dry-run
npm run deploy

npm run verify performs strict TypeScript checking and 14 focused tests. The tests cover diagnosis, out-of-policy cases, exact approval, proposal expiry, stale state, mutation receipts, idempotent replay, and idempotency conflicts. npm audit currently reports zero known vulnerabilities.

Cloudflare Workers is used because it directly supports remote Streamable HTTP MCP via the TypeScript MCP SDK and provides a small deployment surface. The server follows the current stateless handler pattern rather than the deprecated sessionful McpAgent path.

Architecture and boundaries

MCP client
    |
Streamable HTTP /mcp
    |
tool schemas + policy gates
    |
investigation / proposal / execution domain
    |
synthetic OMS + payments + inventory + fulfillment adapter

For the bounded demo, a named Durable Object serializes operations and persists the synthetic adapter, proposals, receipts, and idempotency ledger in SQLite. A production version would replace the synthetic order adapter with internal OMS/WMS APIs, add OAuth and role scopes, retain immutable audit events, rate-limit writes, and define operational reset/recovery procedures. The domain rules and tests remain reusable.

Human approval is a semantic client boundary, not proof of human presence: an untrusted client can copy an approval phrase. Production execution therefore also needs authenticated operator identity and an approval UI or MCP elicitation flow.

See product decisions, AI worklog, demo script, and client communication drafts.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured