Case Study • Agent Engineering • Agent · MCP · Graph · RAG

ERP MCP Agent Platform

Ko&Clo • Enterprise • Private Repository

Executive Summary

Key Metrics

96
MCP Tools Exposed
13
Domain Agent Nodes
14
Scoped Endpoints
28
Guarded Write Tools

Request Flow

One-Way Pipeline
user ─► ERP agent tab
          │  POST /api/agent/<domain>/submit
          ▼
      agent_jobs queue        # 2 workers · SKIP LOCKED
          │  {model, messages:[system prompt, …], mode:<domain>}
          ▼
      Hermes gateway         # api_server · loopback
          │  tools/list ◄── /mcp/<domain>/   # scoped tool schemas
          ▼
      Codex · LLM            # reads prompt + schemas → picks tool + args
          │  tools/call <domain>__<tool>(args)  ·  Bearer
          ▼
      /mcp/<domain>/         # ERP MCP server
          │  catalog.dispatch → registry.dispatch
          ▼
      ERP services ─► PostgreSQL ─► JSON (≤ 24k)
          └──► back into the LLM context ─► loop until the answer is ready

LLM Tool Selection
tools/list → schemas name · description · JSON Schema

tool-use loop max 60 turns · failure guardrails

mode · channels ERP tab · Telegram · Mattermost

Streamable HTTP stateless · JSON Bearer auth host-local loopback

MCP Server

LAYER 1 · REGISTRY
registries/<domain>.py

LAYER 2 · CATALOG
catalog.EXPOSED

LAYER 3 · TRANSPORT
mcp_server/server.py

LAYER 4 · MOUNT
/mcp/<domain>/ · /mcp/

Tool Catalog
backend/app/
├── mcp_server/
│   ├── catalog.py    # EXPOSED · 96 tools · 28 mutating
│   └── server.py     # Streamable HTTP · Bearer · lifespan
└── services/agent/
    ├── hermes_bridge.py        # mode · model routing
    └── registries/  13      # TOOL_DEFINITIONS + dispatch

# MCP name = <domain>__<tool>
retail_reorder__…   14   post_process__…   14
wholesale_reorder__… 12   sample_return__…   9
vmd__…               9   color_trend__…     8
batch_admin__…       6   store_dashboard__… 6
payrate__…           5   best_products__…   4
db_admin__…          4   score_ranking__…   3
mcp_admin__…         2

Domain Agent Graph

Omni Hub 1

Domain Nodes 13

Write Tools 28

Job Pipelines 2

Nodes — 13 ERP Domains · tools per node
14
14
12
9
9
8
6
6
5
4
4
3
2

MCP Monitor

mcp_tool_status
Tool Registry

codex_usage_snapshot
Codex Usage

mcp_missing_tool_requests
Missing-Tool Intake

mcp_gateway_restart_requests
Gateway Restart Queue

Platform Signals latency p95/p99 traffic errors saturation agent queue stats

Technology Stack

Agent Runtime
Hermes Agent Codex (gpt-5.6) MCP Python SDK
Tool Provider
FastAPI Streamable HTTP PostgreSQL · asyncpg
Isolation
Domain Scoping Bearer Token Docker host network
Observability
MCP Admin Tab Golden Signals Job Queue

Impact

Efficiency

Safety

Extensibility

Observability