{"slug": "mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on", "title": "MCP Gateway vs. Enterprise AI Ontology: Why Transport Proxies Still Hallucinate on Live ERP Data", "summary": "A developer argues that MCP gateways and LLM proxies such as LiteLLM, Kong AI Gateway, and Cloudflare AI Gateway only inspect JSON-RPC envelopes and tool names, leaving downstream SQL and OData servers executing raw queries against unmapped ERP tables under shared service accounts. The post contends that a separate enterprise AI ontology layer is needed to resolve cross-system joins, row- and column-level permissions, status-code semantics, and PII masking, and that the two layers are complementary rather than replacements.", "body_md": "*Originally published at [naditu.com/blog/mcp-gateway-vs-enterprise-ai-ontology-for-erp-data](https://naditu.com/blog/mcp-gateway-vs-enterprise-ai-ontology-for-erp-data).*\n\nPlatform and security teams rolling out Model Context Protocol (MCP) infrastructure routinely deploy LLM proxies and MCP gateways—such as LiteLLM, Kong AI Gateway, Cloudflare AI Gateway, or container-based MCP routers—expecting them to govern operational database access end to end.\n\nSix weeks later, the security review stalls. Why? Because an MCP gateway only sees **JSON-RPC envelopes and tool names**, while the downstream SQL or OData server still executes raw queries against unmapped ERP tables under a single shared technical service account.\n\nJust as Envoy or Kong never replaced your database schema or application domain model, an MCP gateway does not teach an AI agent how your ERP, CRM, and plant MES tables fit together.\n\n| Layer & Responsibility | MCP Gateway / LLM Proxy | Enterprise AI Ontology | \n|---|---|---|\n| **TLS, OAuth 2.1 / CIMD & SSRF edge checks** | Yes (terminates auth & rate-limits clients) | Receives verified caller identity from gateway or IdP | \n| **Token spend caps & model routing** | Yes (per-key budgets & provider failover) | Model-agnostic (serves Claude, ChatGPT, Cursor, custom agents) | \n| **Coarse tool-list filtering** | Hides/exposes whole MCP tools ( `search_orders` ) | Evaluates **row & column permissions** inside each query | \n| **Cross-system joins without foreign keys** | Blind to table schemas | Resolves confirmed joins across ERP, CRM, and MES ( `account.erp_code = CUST.CODE` ) | \n| **1:N chasm-trap & status-code semantics** | Blind to SQL semantics | Isolates header/line grain & maps local codes ( `ORD_HDR.STAT = 4` →*shipped, not invoiced* ) | \n| **Field-level cost & PII masking** | Cannot rewrite SQL join projections | Masks restricted fields ( `unit_cost: \"masked\"` ) per Okta / Entra ID group | \n| **Operational ERP write safety** | Sees a valid HTTP `POST` | Blocks raw SQL writes; routes approved mutations via official ERP APIs | \n\n`LG_001_01_ORFLINE`), header/status tables (` VBAK`/` VBUK`), variant matrices, and separate CRM or MES databases with zero declared foreign keys.`STAT = 4` means `CONTRACT` in IFS Cloud denotes a plant site rather than a customer contract.\nYou do not need to rip out LiteLLM, Kong, or a Kubernetes MCP gateway to adopt an ontology—the two layers are **complementary**:\n\n*(For a vendor-neutral 9-row capability matrix and reference topology, see the open CC BY 4.0 handbook guide at [ontoloji.org/en/guides/mcp-gateway-vs-enterprise-ai-ontology-architecture](https://ontoloji.org/en/guides/mcp-gateway-vs-enterprise-ai-ontology-architecture)—also queryable directly from Claude Code or Cursor via the public MCP endpoint `https://ontoloji.org/mcp`.)*", "url": "https://wpnews.pro/news/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on", "canonical_source": "https://dev.to/naditu/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on-live-erp-data-302f", "published_at": "2026-12-04 16:42:22+00:00", "updated_at": "2026-12-04 16:44:44.621367+00:00", "lang": "en", "topics": ["ai-agents", "agent-protocols", "ai-tools", "ai-safety", "mlops"], "entities": ["Model Context Protocol", "LiteLLM", "Kong AI Gateway", "Cloudflare AI Gateway", "Okta", "Microsoft Entra ID", "IFS Cloud", "Claude Code"], "also_reported_by": [], "takeaway": "An MCP gateway only filters tool names and JSON-RPC envelopes, so pair it with an ontology layer that enforces row/column permissions, resolves cross-system joins, and blocks raw SQL writes to ERP tables.", "recommendation": {"advice": "Keep your MCP gateway for auth, rate limits and token budgets, but add an ontology layer that evaluates row/column permissions and maps ERP status codes before agents query live tables.", "playbook": "agent-architecture", "playbook_url": "https://wpnews.pro/playbooks/agent-architecture"}, "alternates": {"html": "https://wpnews.pro/news/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on", "markdown": "https://wpnews.pro/news/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on.md", "text": "https://wpnews.pro/news/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on.txt", "jsonld": "https://wpnews.pro/news/mcp-gateway-vs-enterprise-ai-ontology-why-transport-proxies-still-hallucinate-on.jsonld"}}