Commerce Ops MCP Server
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 MCP ServerCheck damaged order ORD-1001 and process refund"
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 MCP Server
An AI-native, remotely hosted MCP server written in TypeScript that empowers operations teams and AI agents to investigate and resolve e-commerce order exceptions โ damaged items, lost shipments, refunds, and replacement dispatches โ safely and autonomously.
๐ฏ Problem & User
User: An operations agent (human or AI) handling post-delivery exceptions in an online commerce business.
Problem: When an order is damaged or lost, the ops agent must:
Investigate the order and understand what happened
Check if a replacement item is available in inventory
Process a partial or full refund safely (without overpaying or duplicating)
Create a replacement shipment if appropriate
Today this requires jumping between systems. This MCP server gives a single, safe interface for the full workflow.
Related MCP server: AgentPay MCP Server
๐ End-to-End Workflow
AI Agent receives: "Customer Alex's order ORD-1001 arrived damaged"
โ
โผ
[get_order_details] โโโ Order: DAMAGED, $120 total, 0 refunded
โ
โผ
[check_inventory] โโโ SKU-AUDIO-01: 13 units available
โ
โผ
[process_refund] โโโ $50 partial refund applied
โโ Guardrail โ : Rejects if amount > remaining balance
โโ Guardrail โก: Rejects duplicate idempotency key
โ
โผ
[create_shipment] โโโ Replacement shipment PENDING
โโ Guardrail โข: Only allowed for DAMAGED or LOST orders๐ ๏ธ MCP Tools
Tool | Description | Inputs | Guardrails |
| Fetch order status, items, tracking, refund history |
| Returns error if not found |
| Check available stock for a SKU |
| Returns error if SKU not found |
| Apply a partial or full refund |
| โ Amount cap (โค remaining balance) โก Idempotency (rejects duplicate keys) |
| Dispatch a replacement item |
| โข Status check (DAMAGED or LOST orders only) |
๐ Live Hosted URL
MCP SSE Endpoint:
https://diligence-mcp-ops.onrender.com/sseHealth Check:
https://diligence-mcp-ops.onrender.com/health
Note: The Render free tier spins down after 15 min of inactivity. Hit the health check URL first to warm it up.
๐๏ธ Architecture
src/
โโโ index.ts # Express server โ SSE + health endpoints
โโโ server.ts # MCP server factory โ reads tool registry, dispatches
โโโ types/
โ โโโ index.ts # Shared domain interfaces
โโโ db/
โ โโโ mockData.ts # Synthetic in-memory data (orders, inventory, refunds)
โโโ tools/
โโโ index.ts # Tool registry barrel (toolRegistry[], toolHandlerMap)
โโโ getOrder.ts # get_order_details tool
โโโ checkStock.ts # check_inventory tool
โโโ processRefund.ts # process_refund tool
โโโ createShipment.ts # create_shipment toolEach tool exports a definition (JSON schema for ListTools) and a handler (async function for CallTool). Adding a new tool requires touching only one file (tools/index.ts).
๐งช Local Setup & Verification
# Install dependencies
npm install
# Run automated runtime verification (7 tests)
npm run test
# Start local dev server
npm run dev
# Build for production
npm run buildExpected test output:
๐งช Running MCP Tool Verification Tests...
1. Testing get_order_details (Valid Order)... โ
2. Testing check_inventory... โ
3. Testing process_refund (Valid Amount)... โ
4. Testing process_refund (Guardrail: Exceed Max Limit)... โ
5. Testing process_refund (Guardrail: Duplicate Key)... โ
6. Testing create_shipment (Valid: DAMAGED order)... โ
7. Testing create_shipment (Guardrail: DELIVERED order)... โ
โ
All runtime verification tests executed successfully!๐ Product Decisions & Scope
What's in scope
Order investigation and status lookup
Inventory availability checks for replacements
Safe refund processing with two guardrails
Replacement shipment creation with eligibility enforcement
End-to-end verification via in-memory MCP transport
What's intentionally out of scope
Authentication / user management โ not required for the assignment; a production version would use API keys or OAuth
Persistent storage โ in-memory state is sufficient for demo purposes; production would use a database
Frontend / UI โ the MCP is consumed by AI agents (Claude, Cursor) directly
Real payment gateway / inventory system โ synthetic data used throughout
CI/CD pipeline โ single-step Render deploy is sufficient
๐ Assumptions
All data is synthetic โ no real customer data or production credentials
State is in-memory and resets on server restart (by design for demo)
The
idempotencyKeyis provided by the calling agent; no server-side key generationA single active SSE connection is assumed (transport is not multiplexed)
โ ๏ธ Known Limitations & Next Steps
Limitation | Next Step |
In-memory state โ resets on restart | Add a lightweight DB (SQLite / Postgres) |
No auth on SSE endpoint | Add API key middleware |
Single SSE transport instance | Use session-keyed transport map |
Render free tier cold starts (~30s) | Upgrade to paid or use Railway |
No pagination on order history | Add cursor-based pagination to |
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.
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/Akash5908/diligence-mcp-ops'
If you have feedback or need assistance with the MCP directory API, please join our Discord server