Ops Copilot MCP Server
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., "@Ops Copilot MCP ServerFind and escalate high-severity payment discrepancies"
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.
Ops Copilot MCP Server — AI-Native Commerce Operations
Remotely hosted TypeScript Model Context Protocol (MCP) server for automated e-commerce payment-fulfillment discrepancy detection, root-cause investigation, and durable human-review escalation.
Hosted MCP Endpoint: https://ops-copilot-mcp.vercel.app/mcp
Health Check Endpoint: https://ops-copilot-mcp.vercel.app/health
1. Problem Statement & Solution
The Challenge
Online commerce businesses frequently rely on engineering teams to manually investigate and resolve operational problems across fragmented systems (payment gateways, ERP/order management, warehouse WMS, shipping carriers). Operations analysts lack direct diagnostic tools to answer questions like:
Why was payment captured for an order that never shipped?
Why is a fully refunded package still moving through DHL transit?
Why did a customer receive an over-refund?
The Solution
Ops Copilot MCP makes operations teams independent by exposing 5 purpose-built, safe MCP tools to any AI client (Claude, Codex, Cursor, MCP Inspector). The server executes a complete operational workflow:
Detect: Automatically scan synthetic order data to surface payment-fulfillment anomalies (
ops_list_discrepancies).Retrieve: Fetch unified, cross-system timeline data for any order (
ops_get_order_details).Investigate: Run automated diagnostic reasoning to determine root cause (
ops_investigate_discrepancy).Escalate: File a durable, evidence-backed human-review ticket in external storage (
ops_create_escalation).Track: Query active escalation tickets and monitor resolution status (
ops_get_escalations).
Related MCP server: Commerce Ops MCP Server
2. Hosted Endpoint & Quick Start
2.1 Connecting via MCP Inspector (No Local Setup Required)
To inspect and test the live server directly:
npx @modelcontextprotocol/inspectorIn the Inspector browser UI:
Set Transport Type to
HTTP/Streamable HTTP.Set URL to
https://ops-copilot-mcp.vercel.app/mcp.Click Connect. All 5 registered tools will appear with full Zod schemas, descriptions, and annotations.
2.2 Local Development & Testing
# 1. Clone repository & install dependencies
npm install
# 2. Build TypeScript
npm run build
# 3. Run full Vitest test suite (34/34 passing)
npm run test
# 4. Start local development server (runs on http://localhost:3000/mcp)
npm run dev3. MCP Capabilities & Tool Inventory
All tools use strict Zod validation (.strict()), include standardized MCP annotations (readOnlyHint, idempotentHint), and return structured JSON (structuredContent) along with clean human-readable markdown summaries.
Tool Name | Type | Description | Key Inputs | Annotations |
| Read-only | Scan dataset and surface active payment-fulfillment anomalies |
|
|
| Read-only | Retrieve unified timeline joining orders, payments, & fulfillments |
|
|
| Read-only | Perform automated root-cause analysis on an operational anomaly |
|
|
| State-mutating | Create durable human-review escalation ticket in Redis |
|
|
| Read-only | Query durable escalation records from Upstash Redis storage |
|
|
4. Architecture & State Durability
┌─────────────────────────────────────────┐
│ AI Consumer (Claude / MCP Inspector) │
└────────────────────┬────────────────────┘
│ Streamable HTTP (JSON-RPC)
▼
┌─────────────────────────────────────────┐
│ Vercel Serverless Function │
│ (TypeScript + Express) │
└────────────────────┬────────────────────┘
│ Upstash REST API
▼
┌─────────────────────────────────────────┐
│ Upstash Redis (Durable KV Database) │
└─────────────────────────────────────────┘Stateless Compute: Express application using
@modelcontextprotocol/sdkwithStreamableHTTPServerTransporthosted on Vercel Serverless Functions.Decoupled Durability: Per client requirements, escalation tickets are persisted to Upstash Redis REST API (
@upstash/redis). This ensures created escalations survive serverless container cold starts and redeployments.Safety: Source commerce systems remain strictly read-only; mutations are restricted exclusively to escalation ticket creation.
5. Product Scoping, Assumptions & Tradeoffs
In Scope
5 core operational tools built on TypeScript SDK v1.6.1.
Synthetic dataset containing 8 orders (3 healthy + 5 distinct discrepancy types).
Rule-based diagnostic engine pinpointing root causes.
Upstash Redis REST persistence for durable escalations.
10-question evaluation benchmark suite (
docs/EVALUATION.xml).
Explicitly Out of Scope (Per Assignment Brief)
Frontend or design system (MCP Inspector used as standardized UI).
Authentication / user management (unauthenticated public demo endpoint per client Q&A answer #3).
Mutation of underlying order/payment/fulfillment source systems.
Production payment gateway or ERP webhooks.
6. Live Verification & Durability Retest Evidence
6.1 Automated Vitest Suite
✓ tests/services/discrepancy-detector.test.ts (3 tests)
✓ tests/services/investigation-engine.test.ts (6 tests)
✓ tests/services/escalation-store.test.ts (2 tests)
✓ tests/e2e/workflow.test.ts (1 test)
✓ tests/tools/tools.test.ts (4 tests)
✓ tests/e2e/evaluation.test.ts (10 tests)
✓ tests/tools/error-handling.test.ts (7 tests)
✓ tests/e2e/inspector-verification.test.ts (1 test)
Test Files 8 passed (8) | Tests 34 passed (34)6.2 Cold-Start Durability Proof
Created record
ESC-4001on live endpoint (https://ops-copilot-mcp.vercel.app/mcp).Triggered production deployment (
npx vercel deploy --prod -y --no-wait), terminating previous runtime containers.Fetched
ESC-4001after container replacement:
{
"jsonrpc": "2.0",
"id": 2,
"result": {
"structuredContent": {
"escalation": {
"escalation_id": "ESC-4001",
"order_id": "ORD-1004",
"discrepancy_type": "paid_not_shipped",
"severity": "high",
"diagnosis": "Paid but not shipped - verified via Upstash",
"evidence": { "payment_id": "PAY-9999" },
"status": "open",
"created_at": "2026-08-02T07:57:59.822Z"
}
}
}
}Result: PASS — 100% data preservation across serverless cold start.
6.3 Evaluation QA Benchmark (docs/EVALUATION.xml)
All 10 complex multi-step operational queries executed against the live endpoint matched expected outputs with 100% accuracy (10/10 passed).
7. Requirements Traceability Summary
Requirement Group | Status | Key Verification / Artifact |
TypeScript & SDK | PASS | TypeScript 5.7, |
Hosted Server | PASS | Live at |
Synthetic Data | PASS | 8 synthetic orders in |
Coherent Workflow | PASS | Detect → Investigate → Escalate → Retrieve |
State Durability | PASS | Upstash Redis REST persistence verified post-cold start |
Focused Testing | PASS | 34 automated Vitest tests passing |
8. AI Worklog & Engineering Journal
8.1 AI Tools & Models Used
Gemini 3.1 Pro: Initial requirements research, assignment analysis, and traceability matrix generation.
Claude Opus 4.6 (Thinking): PRD drafting, MCP tool schema design (
ops_*), annotations (readOnlyHint), and architecture design.Gemini 3.6 Flash: TypeScript code generation, Vitest test suite implementation, live deployment scripts, and empirical verification.
TinyFish Agent / CLI: Web research, MCP standard verification, and Upstash Redis REST specs verification.
8.2 Human–AI Division of Responsibilities
Product Decisions: AI proposed workflow candidates; Human selected payment-fulfillment discrepancy investigation.
MCP Tool Design: AI drafted tool schemas & annotations per
mcp-builderstandards; Human approved tool list.Architecture & State: Human audited hosting cold-start behavior; AI implemented Upstash Redis REST external persistence.
Code & Test Generation: AI generated implementation & 34 Vitest tests; Human reviewed every file and verified runtime behavior.
8.3 AI Suggestions Corrected (Key Engineering Pivot)
Initial AI Proposal: Switch hosting provider from Vercel to Railway to avoid cold-start memory loss.
Human Correction / Refinement: Research showed free-tier containers (including Railway idle sleep) can still cold-start. Instead of changing hosts, we externalized state persistence to Upstash Redis REST API (
@upstash/redis), keeping the stateless compute on Vercel while guaranteeing true durability.
8.4 Verification & Remaining Risks
Verification Result: 34/34 Vitest unit/integration tests passing. 10/10 evaluation benchmark QA pairs 100% matched against live server.
Remaining Risks: None for submitted scope. Local dev falls back seamlessly to in-memory store if Upstash env vars are unset.
This server cannot be deployed
Maintenance
Related MCP Connectors
Unified dispute resolution: crypto, payments, SLA violations. 95% AI automation.
Run storefronts, listings, orders, content, fulfillment, and analytics through AI.
Agentic commerce gateway: discovery, search, checkout across Shopify/Woo/Odoo/PrestaShop.
Commerce intelligence for AI agents. Diagnose drop-offs, fix checkouts, optimize pricing.
Related MCP Servers
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to investigate and resolve operational exceptions across orders, payments, inventory, and fulfillment through a multi-system truth and guarded actions.-
- FlicenseNot gradedqualityBmaintenanceEnables 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.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to investigate why paid orders have not reached shipment creation and create persistent human-review escalations.2 npm-
- FlicenseNot gradedqualityCmaintenanceEnables 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.-