This article details how Uber built the MCP Gateway to standardize how AI agents discover and interact with a multitude of internal services and tools. It explores the architecture, including the MCP Registry (control plane) and Proxy Gateway (data plane), and discusses automated tool discovery, permission management, and request handling across various communication protocols. The system design addresses the challenges of integrating diverse APIs into a unified platform for AI applications.
Read original on ByteByteGoAs AI agents become more sophisticated, their ability to perform specific tasks often relies on interacting with specialized external tools or internal APIs. In an enterprise environment like Uber, the number of such tools can be vast and heterogeneous, using different communication protocols (HTTP, gRPC, TChannel) and data formats (JSON, Protobuf). The core system design challenge is to provide a standardized, scalable, and secure way for AI agents to discover, understand, and utilize these tools without requiring bespoke integrations for every new tool or agent. Uber tackled this with the Model Context Protocol (MCP) Gateway.
The Uber MCP Gateway is architected into two primary components, adhering to a common design pattern of separating management from runtime operations:
A crucial aspect for scalability is automating the process of identifying and cataloging tools. Uber's AutoCrawler, a distributed workflow system powered by Cadence, handles this. AutoCrawler periodically scans for new services, APIs, and schema changes through two main pathways:
Design Decision: Disabled by Default
Newly discovered tools and services are initially registered in a disabled state. This important design choice ensures that service owners must explicitly review and enable a tool, confirming its description and readiness before it becomes available to AI agents. This balances automation with human oversight for quality and security.
The Proxy Gateway maintains an in-memory state of tool configurations, refreshed periodically. When an AI agent makes an MCP request to a virtual server endpoint (e.g., `/logging/mcp`), the gateway performs the following steps: