commerce-ops-mcp
Enables AI agents to investigate why paid orders have not reached shipment creation and create persistent human-review escalations.
README
AI-First Commerce Operations Investigator
This repository implements a bounded operations workflow that explains why a paid order has not reached shipment creation and can create a persistent human-review escalation.
Current state
Phases 0 through 10 are complete. Phase 10 provides a standard remote MCP server on /mcp with five approved tools, strict Zod contracts, Streamable HTTP transport, Host-header protection, safe error mapping, and a passing direct MCP-client evaluation across all nine approved scenarios.
The deterministic workflow remains authoritative for evidence readiness, diagnosis, escalation policy, persistence, and audit behavior. The MCP layer only validates and adapts approved workflow capabilities. Actual LLM/AI-host integration and model-backed evaluations remain Phase 11 work.
Local prerequisites are Bun 1.3.2 and Node.js 20.9.0 or newer.
Plan and working instructions
- Final plan
- Workflow contract
- Package graph
- Approved PostgreSQL schema
- Schema acceptance summary
- Approved synthetic scenarios
- Coding-agent instructions
Implementation status
| Phase | Status | Main output | Evaluation |
|---|---|---|---|
| 0 | Complete | Workflow contract and repository rules | Report |
| 1 | Complete | Approved PostgreSQL schema | Report |
| 2 | Complete | Bun and Turborepo foundation | Report |
| 3 | Complete | Approved scenarios, validation, PostgreSQL seed/reset | Report |
| 4 | Complete | Roles, grants, immutable records, cross-table invariants | Report |
| 5 | Complete | Repositories and read-only commerce boundary | Report |
| 6 | Complete | Evidence collection and normalization | Report |
| 7 | Complete | Evidence readiness and conflict gate | Report |
| 8 | Complete | Deterministic diagnosis and suggested action | Report |
| 9 | Complete | Persistent investigation and escalation workflow | Report |
| 10 | Complete | Remote MCP server and direct tool evaluations | Report |
| 11 | Not started | Actual AI-host integration and model evaluations | Not created |
| 12 | Not started | Trace APIs and minimal Tailwind viewer | Not created |
| 13 | Not started | Hardening, deployment, and submission evidence | Not created |
Phase 10 commands
Run the non-destructive checks first:
bun install --frozen-lockfile
bun run --filter @repo/mcp test
bun run --filter @repo/api test
bun run --filter @repo/evaluations test
bun run build
bun run typecheck
The direct evaluation is intentionally explicit and serial because it uses the configured PostgreSQL roles and owner-only workflow cleanup:
bun run eval:mcp:direct
bun run db:verify-demo
The evaluator builds and starts the real Express API, connects with the official MCP client over Streamable HTTP, executes all nine scenarios, verifies escalation and idempotency behavior, checks forbidden tools and invalid inputs, proves commerce remains unchanged, and clears operations demo rows in finally.
No model provider, model name, or LLM API key is required until Phase 11.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。