commerce-ops-harness
Click on "Install 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., "@commerce-ops-harnessinvestigate order ord_5001"
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.
Commerce Ops Harness MCP
A remotely hosted Model Context Protocol server (TypeScript + PostgreSQL) that lets a commerce ops person handle the most engineer-dependent exception in the queue — a stuck or delayed order with a carrier exception — through to the refund decision: an automatic refund executed under policy, or a manager escalation that carries the full diagnosis.
The MCP is the product. There is no frontend; any MCP client (Claude, Cursor, MCP Inspector) is the operator console.
MCP endpoint |
|
Health |
|
Source |
|
Demo video |
System design with diagrams: ARCHITECTURE.md. Product decisions, assumptions, and exclusions: PRODUCT_DECISIONS.md. AI usage: AI_WORKLOG.md.
How it works
The AI client does the language; the server owns truth and money. Ops asks in plain English, the client drives the tools, and every dollar-moving decision is computed and enforced server-side in a single transaction — the model can request a refund, but it cannot talk its way past the policy.
A refund executes automatically only when every check passes; otherwise the server files a pending manager escalation with the diagnosis and the exact checks that failed, so the manager decides from evidence instead of re-investigating.
Check | Rule |
| Requested amount > $0 |
| Requested amount ≤ $150.00 |
| Requested amount ≤ refundable balance (paid − already refunded) |
| Order placed no more than 30 days ago |
| Customer risk score < 70 (exactly 70 fails) |
| A lost / damaged / stuck exception derived from the carrier event stream — never a pre-set flag — and not superseded by a later delivery |
Duplicate protection covers the same eligible amount and action: repeating decide_refund for an amount already refunded returns the original refund; repeating it for an amount with a pending escalation returns that escalation. Both are backed by unique indexes, and the decision runs with the order row locked — concurrent requests cannot double-refund. Partial refunds are first-class: ops picks the amount (default: full paid amount) and it passes through the same checks.
Related MCP server: e-commerce MCP Server
MCP tools
Tool | What it does |
| Seeded orders, one per way the workflow can go — start here |
| Full case: customer + risk score, payments, shipments, carrier events, refunds, escalations |
| Unified chronological timeline across all systems |
| Derives carrier-exception verification from events, classifies root cause with evidence, previews what |
| The single state-changing tool: auto-refund or manager escalation, per the policy above |
| Manager view: pending escalations with failed checks + full diagnosis |
| Audit trail of every decision |
| Reset the synthetic database to its seeds |
Try it (no local setup)
Connect any MCP client to the hosted /mcp URL above, then:
list_scenariosopen_case→get_timeline→diagnosewithord_1001decide_refundwithord_1001→ automatic $89.99 refunddecide_refundagain → the same refund returned, not a second onedecide_refundwithord_1004→ manager escalation (risk score exactly 70)get_escalations→ the escalation with failed checks and diagnosis attached
Seeded scenarios
Order | Scenario | Expected outcome |
| Lost package, all checks pass | Auto-refund $89.99 |
| Damaged, but paid $210 (> cap) | Full refund escalates; partial ≤ $150 auto-executes |
| Lost, order 45 days old | Escalation (age) |
| Stuck, risk score exactly 70 | Escalation (risk) |
| Slow but no exception events | Escalation (exception not verified) |
| Refund already executed | Idempotent — original refund returned |
| Stuck event, later delivered | Escalation (exception superseded by delivery) |
The database is shared — concurrent testers see each other's refunds and escalations. reset_demo_data(confirm=true) restores a clean slate.
Run locally
docker run -d --name commerce-ops-pg -e POSTGRES_PASSWORD=devpass \
-e POSTGRES_DB=commerce_ops -p 5433:5432 postgres:16-alpine
npm install
npm run dev # schema + seeds apply automatically on boot
npm test # 28 tests: policy boundaries, event derivation, idempotency, E2E over MCPDATABASE_URL defaults to the docker container above; point it anywhere else to override.
Deploy (Render)
render.yaml provisions the web service plus a managed PostgreSQL instance and wires DATABASE_URL; schema and seeds apply on first boot. See HOSTING.md.
Design notes
Money is integer cents in storage and policy; the tool boundary accepts dollars and rejects sub-cent amounts. The $150.00 cap is exact, not floating-point-adjacent.
Diagnosis is a deterministic evidence assembler and the policy engine is a pure function — so the boundaries that matter are unit-tested exactly: $150.00 vs $150.01, day 30 vs 31, score 69 vs 70.
Verification is derived, not declared.
shipments.statusexists as carrier metadata but is never consulted for eligibility — onlycarrier_eventsare.One state-changing tool. Everything else is read-only, which keeps the safety review surface small and the audit trail complete.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityBmaintenanceEnables AI agents to investigate and resolve e-commerce order exceptions like damages, lost shipments, refunds, and replacements through a unified interface with built-in guardrails.
- Flicense-qualityBmaintenanceEnables handling of e-commerce exceptions like stuck packages, missing items, and refund escalations through MCP tools, with safety guardrails and PostgreSQL persistence.
- Flicense-qualityCmaintenanceEnables 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.
- Flicense-qualityBmaintenanceCommerceOps MCP Server is an AI-native Model Context Protocol server for e-commerce operations, enabling AI agents to autonomously diagnose and resolve operational exceptions such as stuck orders, missed payment webhooks, warehouse delays, and oversold inventory, with built-in safety guardrails and audit logging.
Related MCP Connectors
Build, validate, and deploy multi-agent AI solutions from any AI environment.
AI agent run monitoring with incident replay and SLA receipts.
Policy review and purchase discovery for AI-agent commerce actions.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/VasuBansal7576/commerce-ops-harness'
If you have feedback or need assistance with the MCP directory API, please join our Discord server