Stalled Fulfillment Recovery 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., "@Stalled Fulfillment Recovery MCP ServerFind all stalled orders and show me their details."
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.
Stalled Fulfillment Recovery — MCP Server
An MCP server that lets ops (via an AI assistant) diagnose and recover orders stuck in "processing" due to missing or failed fulfillment tasks.
Safety by construction: the only write tools are retry_fulfillment (resets a fulfillment task) and escalate_order (writes an audit entry). There are no payment mutation tools — the domain boundary is the safety boundary.
Product Decisions & Assumptions
Problem: Operations teams can't independently diagnose or fix stalled fulfillment issues — they lack cross-system visibility and safe write access, so even routine cases get escalated to engineers.
Scope: Single-order investigation of stalled fulfillment. We handle three known stall patterns (no fulfillment task, failed task, silently stalled task). Genuinely novel or ambiguous failures escalate to humans via escalate_order.
Assumptions:
User interacts via an MCP-connected AI client (e.g. Claude Desktop) — no custom frontend
Writes are simulated (no real warehouse/carrier API) but safety boundaries (dry-run, rate-limit, escalation) are real
Single-order investigation, not batch operations
Exclusions: Authentication, multi-tenant access control, payment mutations, real carrier integrations, batch operations, frontend.
Related MCP server: inventory-ops-mcp
Database Setup (PostgreSQL)
This server uses PostgreSQL for persistent data storage. Tables are auto-created on startup.
# Environment Variable (optional, defaults to postgres://localhost:5432/fulfillment_mcp)
export DATABASE_URL="postgres://username:password@localhost:5432/fulfillment_mcp"Quick Start
npm install
npm run build && npm start # production on :3000
# or
npm run dev # dev server on :3000Health check:
curl http://localhost:3000/healthMCP Inspector:
npx @modelcontextprotocol/inspector --url http://localhost:3000/mcpMCP Capabilities
Tools
Tool | Type | Description |
| Read | Fetches an order + its fulfillment task in one call |
| Read | Fetches a fulfillment task by ID with full failure detail |
| Read | Surfaces all orders stuck in processing (3 stall types) via optimized SQL JOIN |
| Write | Resets a stalled fulfillment to |
| Write (audit only) | Flags an order for human review without mutating state |
| Read | Returns the full action history for an order |
Resources
Resource URI | Description |
| Direct JSON access to an order and its fulfillment task |
| Direct JSON access to a fulfillment task by order ID |
Prompts
Prompt | Description |
| Guided workflow that instructs the AI to discover stalled orders, inspect each, decide retry vs escalate, and summarize actions. Accepts optional |
Stall Detection
list_stalled_orders detects three types of stall for any paid/processing order older than threshold_hours (default: 24h), using a single optimized SQL LEFT JOIN query:
| Condition |
| No FulfillmentTask row was ever created |
| FulfillmentTask.status === |
| Task is |
Example Workflow
Ops: "Show me all stuck orders"
AI: → list_stalled_orders(threshold_hours: 24)
← 3 stalled orders found
AI: → get_order("ORD-1042")
← Order: processing, Fulfillment: failed (warehouse_api_timeout, 2 attempts)
AI: → retry_fulfillment("ORD-1042", confirm=false)
← dry_run: will reset FUL-1042 to pending (attempt 3)
Ops: "Looks good, go ahead."
AI: → retry_fulfillment("ORD-1042", confirm=true)
← success: fulfillment reset, audit entry created
AI: → get_audit_log("ORD-1042")
← [fulfillment_retry @ 2026-08-01T04:15:00Z]Safety Details
Dry-run required:
retry_fulfillmentreturns a preview whenconfirm=falsewithout mutating anything. Show this to the operator before confirming.Rate-limit: A second retry on the same order within 10 minutes is rejected with
double_retry_prevented. This is a rate-limit (time window), not true idempotency — a second retry after the cooldown is permitted, because the first may itself have failed.Escalation path: When an order doesn't match the standard stall pattern, use
escalate_orderto write a permanent audit entry recording why the AI declined to act automatically.No payment tools: There is no refund or payment write tool in this MCP. The scope boundary enforces the safety boundary.
Development & Testing
npm run build # TypeScript compile
npm run test # Vitest safety tests against live PostgreSQL
npm run test:watch # Watch modeTests run against live PostgreSQL and create their own data at runtime — no hardcoded fixtures or seed data dependencies.
Live Hosted Deployment
The MCP server is live and hosted on Render:
Base URL:
https://mcp-ecom.onrender.comMCP Endpoint:
https://mcp-ecom.onrender.com/mcpHealth Check:
https://mcp-ecom.onrender.com/health
Connecting in Cursor (~/.cursor/mcp.json)
{
"mcpServers": {
"stalled-fulfillment-recovery": {
"url": "https://mcp-ecom.onrender.com/mcp"
}
}
}Deployment
The server listens on process.env.PORT (default: 3000). Deploy anywhere that runs Node.js and has PostgreSQL access:
Railway / Render / Fly.io / Heroku: push the repo, set
DATABASE_URLandPORTDocker:
node dist/index.jsThe MCP endpoint is
POST /mcp(stateless HTTP, no sessions)
After deploying:
curl https://mcp-ecom.onrender.com/health
npx @modelcontextprotocol/inspector --url https://mcp-ecom.onrender.com/mcpTech Stack
Database: PostgreSQL (
pgdriver)MCP SDK:
@modelcontextprotocol/sdk^1.12 (stable)Transport:
StreamableHTTPServerTransport(stateless, HTTP)Framework: Express 5
Validation: Zod 3
Tests: Vitest — focused safety verification against live PostgreSQL
Language: TypeScript (ESM, strict)
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-qualityCmaintenanceA production-grade MCP server for order management, featuring tools for looking up and refunding orders with safety measures like confirmation tokens, rate limiting, and error handling.Last updated
- Flicense-qualityCmaintenanceA remotely hosted MCP server that lets ops personnel investigate and resolve inventory oversells without engineer involvement.Last updated
- Flicense-qualityBmaintenanceAn AI Operations Investigation MCP server that enables LLMs to investigate order fulfillment incidents by correlating data across independent services using predefined scenarios.Last updated
- Flicense-qualityBmaintenanceAn MCP server that enables non-technical operations users to resolve common commerce-ops tickets, such as orders charged but failed, through an investigate, recommend, approve, and execute workflow with read-only and write tools.Last updated
Related MCP Connectors
Remote MCP for A2A failure replay MCP, structured receipts, audit logs, and reviewer-ready evidence.
MCP server for AI agents to plan, verify, and deploy Cloudflare-native apps.
A paid remote MCP for CLI tool MCP, built to return verdicts, receipts, usage logs, and audit-ready
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/geektan123/MCP-Ecom'
If you have feedback or need assistance with the MCP directory API, please join our Discord server