MCP vs. API Gateways: They’re Not Interchangeable 🔗 **Source:** [MCP vs. API Gateways: They’re Not Interchangeable](https://thenewstack.io/mcp-vs-api-gateways-theyre-not-interchangeable/) > [!note]+ Document Notes > tags: [MCP, API Gateways, Security] > author: Christian Posta > source: [MISSING] > reference: [https://share.google/RHMwTURlCxtCltoUC] > date created: 2025-10-25 00:00 > > # 🏷️ Title: MCP vs. API Gateways: They’re Not Interchangeable > <!-- deep-read:sections start --> ## 🧭 Table of Contents - [📝 Summary](#-summary) - [📖 Main Content](#-main-content) - [🗒️ Notes](#️-notes) - [📚 References](#-references) - [🗣️ Paraphrase](#️-paraphrase) - [📰 Newsletter](#-newsletter) - [✅ Action Items](#-action-items) - [🧪 Hypotheses](#-hypotheses) - [📊 Methodology](#-methodology) - [❓ Questions](#-questions) - [🔮 Future Research](#-future-research) - [💡 Implications](#-implications) - [🧠 Learning Styles Assessment](#-learning-styles-assessment) - [📊 Accessibility Assessment](#-accessibility-assessment) - [🌍 DEIB Assessment](#-deib-assessment) - [✅ Logical Validity](#-logical-validity) - [🛡️ DARVO Analysis](#-darvo-analysis) - [🎯 Conclusion](#-conclusion) ### 🔗 References - Model Context Protocol (MCP) overview (https://github.com/modelcontextprotocol) - JSON-RPC 2.0 Specification (https://www.jsonrpc.org/specification) - Server-Sent Events on MDN (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) - Agentgateway (Linux Foundation) (https://github.com/agentgateway/agentgateway) - CNCF Gateway API (kgateway) (https://gateway-api.sigs.k8s.io/) - OAuth 2.0 (https://oauth.net/2/) ## 📝 Summary - What happened: The author explains why traditional API gateways don’t cleanly fit MCP’s stateful, sessioned, streaming model and argues for purpose-built MCP gateways. - Why it matters: Misapplying API gateways risks brittle policy, poor observability, and broken session semantics for AI agent traffic. - Key stakeholders: Platform/SRE, security, architects, AI/agent teams, vendors. - Risks and tradeoffs: Retrofitting gateways is brittle and costly; purpose-built adds new infra but improves correctness, safety, and operability. - Bottom line: Use a native MCP gateway (e.g., agentgateway) for session-aware security, routing, and multiplexing across MCP servers. ## 📖 Main Content - Core arguments: - “APIs Are Stateless, MCP Is Stateful.” API gateways rely on HTTP methods/paths/headers; MCP concentrates semantics in JSON-RPC bodies with negotiated sessions and SSE. - Gateway patterns progress from passthrough → partial protocol parsing → brokering → multiplexing; complexity grows quickly and exceeds typical API gateway design. - Purpose-built MCP gateways natively handle JSON-RPC, sessions, bidirectional streams, and multiplexing. - Context/definitions: - MCP: a protocol to connect tools/data to AI agents with negotiated capabilities, sessions, and streaming. - JSON-RPC: lightweight RPC over JSON; method/params in body. - SSE: server-to-client event streams enabling progress updates. - Uncertainties/contested claims: - Some API gateways could add native MCP features; maturity and performance claims will vary by vendor and implementation. ### 🗒️ Notes - “The short answer is ‘maybe,’ but the real question is should you? API gateways were not built for the MCP use cases.” - MCP sessions maintain capabilities, prior tool call context, async state, and server-initiated messages via SSE. - Passthrough: OK for TLS, auth, basic rate limits, logging; weak for per-event policy and observability. - Partial protocol support: possible via scripts (e.g., JS/Lua) but brittle, slower, and high-maintenance. - Brokering: version shielding, request filtering, response sanitization, context injection—needs session-aware, JSON-RPC-native engine. - Multiplexing: virtual MCP aggregates multiple backends; requires fan-out, routing by tool, stream merge, state coordination, fault isolation. - Agentgateway: Rust, session-aware, JSON-RPC-native, supports multiplexing, fine-grained auth, stdio and HTTP transports; integrates with kgateway for K8s-native control. ## 📚 References - Model Context Protocol (GitHub org) (https://github.com/modelcontextprotocol) - JSON-RPC 2.0 (https://www.jsonrpc.org/specification) - Server-Sent Events (MDN) (https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events) - Agentgateway (Linux Foundation) (https://github.com/agentgateway/agentgateway) - CNCF Gateway API (https://gateway-api.sigs.k8s.io/) ## 🗣️ Paraphrase - Paragraph A: API gateways excel at stateless HTTP semantics in headers/paths, but MCP embeds meaning in JSON-RPC bodies and needs session context. - Paragraph B: You can push API gateways to parse MCP and even broker versions, but the approach becomes brittle and fails at true multiplexing. ## 📰 Newsletter MCP is reshaping how AI agents reach enterprise data and tools. This week, we dive into why stateless API gateways don’t map well to MCP’s negotiated sessions and streaming. If you’re building agent integrations, prioritize gateways that understand JSON-RPC, SSE, and session semantics. Resources: MCP spec, JSON-RPC, and the Linux Foundation’s agentgateway. Keep your DX strong with clean auth, fine-grained tool permissions, and observability per event and session. ## ✅ Action Items #### DevRel - Publish MCP gateway best practices; demo multiplexing and brokering; produce JSON-RPC/SSE examples and quickstarts; capture policy recipes. #### OSPO - Define MCP policy patterns; review licenses; security intake for tool plugins; signing/attestations for tool registries; SBOM for agent stacks. #### Community - Run roadmap clinics on MCP multiplexing; first-issue rotations for agentgateway; transparent budgets for MCP infra. #### WordPress - Core/Meta: evaluate MCP-based tooling integrations; docs and SDK examples; Privacy/Sec review for agent tool permissions; performance budgets for streaming. #### The WPOCC - Fund maintainers for protocol adapters; governance clinics for tool marketplaces; milestone-based grants for observability. ### FAIR - Require signed tool manifests; transparent funding and sunset clauses; publish operator agreements and scorecards. ## 🧪 Hypotheses - Purpose-built MCP gateways reduce policy errors vs. scripted API gateways by >50%. - Session-aware observability detects streaming failures >2x faster than HTTP-only metrics. - Virtual MCP (multiplexing) cuts client integration endpoints by ≥70%. - Version brokering reduces client breakages during MCP upgrades by ≥60%. ### 📊 Methodology - A/B compare scripted API gateway vs. MCP-native gateway across fault-injection scenarios; measure policy correctness, latency, error detection MTTR, and maintenance effort over 3 months. ### ❓ Questions - Which minimum features define an “MCP-capable” gateway? - How should tool-level RBAC be expressed and audited across sessions/streams? - What SLOs fit SSE-based agent operations? ### 🔮 Future Research - Standardized schemas for tool discovery and permissions. - Cross-vendor conformance tests for MCP gateways. - Stream-aware policy languages and debuggability. ### 💡 Implications - Practice: adopt MCP-native gateways for agents. - Policy: enforce signed tools and per-tool RBAC. - Security: midstream authorization and event-level audit. - Education: train teams on JSON-RPC/SSE and session design. ### 🧠 Learning Styles Assessment - Reading level: ~11–12th grade (Flesch-Kincaid ≈ 11.5). #### 👀 Visual learners - Present: pattern taxonomy; could add architecture diagrams and stream timelines. #### 🔊 Aural learners - Improve: short audio explainer with failure modes. #### 🗣️ Verbal learners - Present: clear contrasts (stateless vs stateful); add glossary. #### 🧩 Kinesthetic learners - Improve: hands-on labs: build passthrough → brokering → multiplexing. #### 🧠 Logical learners - Present: stepwise patterns; add decision trees and error budgets. #### 🧑‍🤝‍🧑 Social learners - Improve: design reviews and moderated Q&A. #### 🧘‍♀️ Solitary learners - Improve: self-check quizzes on scenarios. #### 🌿 Naturalistic learners - Improve: lifecycle and sustainability angles of infra choices. ### 📊 Accessibility Assessment - Screen reader semantics: ensure headings and landmarks. - Keyboard: ensure no traps; logical order. - Contrast: maintain ≥4.5:1. - Reflow: support 200% zoom and reduced motion. - Media: provide captions/transcripts; avoid autoplay. - Forms: labels, inline validation, generous target sizes. - Standards: map to WCAG 2.2 AA. ### 🌍 DEIB Assessment - Use plain language summaries and define jargon. - Provide multilingual resources and global examples. - Include inclusive imagery and balanced quoting. - Establish community guidelines and moderated channels. ### ✅ Logical Validity - Strong reasoning: causal claim that stateful, streaming sessions require different control planes than stateless HTTP—supported by concrete pattern limits (SSE policy, multiplexing). - Potential fallacy: vendor advantage bias; mitigate with benchmarks and open tests. - Tone: pragmatic, advisory, with caution about brittleness. ### 🛡️ DARVO Analysis - No denial/attack patterns; critique targets technical fit, not actors. Emphasis on operational risks over blame. ## 🎯 Conclusion - Bottom line: MCP’s sessioned, streaming, JSON-RPC model doesn’t map cleanly to traditional API gateways. Use an MCP-native gateway for security, routing, observability, and multiplexing. - Next steps: pilot an MCP gateway, define per-tool RBAC, add session/stream observability, and plan for version brokering. ## 🧱 Refactor Appendix (append after 🎯 Conclusion) ### 📚 Literature Split Pad - Purpose: Stage Konik CEE units that become per-source Literature notes. - Split level: H3. - Include verbatim quotes under 25 words and a [view highlight] link. ### [H1] MCP sessions require protocol-aware gateways > [!quote] [MCP vs. API Gateways](https://share.google/RHMwTURlCxtCltoUC) by [[Christian Posta]] via an unnamed author. Published 2025-10-20. Accessed 2025-10-25. > “APIs Are Stateless, MCP Is Stateful.” Two lines: Session negotiation and SSE drive needs beyond HTTP headers. [view highlight](https://share.google/RHMwTURlCxtCltoUC#H1) #xref #articleseed ID:rw_[MISSING] ### [H2] Multiplexing exceeds traditional API gateways > [!quote] [MCP vs. API Gateways](https://share.google/RHMwTURlCxtCltoUC) > “This is where traditional API gateways hit a wall.” Two lines: virtual MCP needs fan-out, routing-by-tool, stream merge, fault isolation. [view highlight](https://share.google/RHMwTURlCxtCltoUC#H2) #xref ID:rw_[MISSING] --- ### 🔖 Atomic Split Pad (Zettel Candidates) #### [Z1] MCP multiplexing requires session fan-out - When aggregating tools across backends. - Pointer: Multiplexing section. - Links: [[MCP]] [[Gateway-Design]] #### [Z2] Stream-aware policy must operate mid-SSE - For per-event auth/filters. - Pointer: SSE limitations section. - Links: [[Policy-Engines]] [[Observability]] --- ### ✏️ Fleeting Queue (Extract by Selection) - [F1] Draft decision tree: passthrough vs brokering vs multiplexing — context/https://share.google/RHMwTURlCxtCltoUC #fleeting #inbox - [F2] Define per-tool RBAC schema for MCP — context/https://share.google/RHMwTURlCxtCltoUC #fleeting #inbox - [F3] Instrument per-event metrics for SSE streams — context/https://share.google/RHMwTURlCxtCltoUC #fleeting #inbox --- <!-- deep-read:sections end -->