生产中的 MCP:通过 API 网关路由 LLM 工具调用
📄 中文摘要
模型上下文协议(MCP)为大型语言模型(LLM)提供了一种标准化的方式来发现和调用外部工具,如数据库、API 和文件系统。然而,随着多个 MCP 服务器、多个 LLM 客户端和真实用户的出现,简单的协议无法满足生产环境的需求。生产环境需要实现认证、授权、速率限制、负载均衡、故障转移和可观测性等基础设施功能。为此,开发了一个专门用于 MCP 的 API 网关,以确保 LLM 能够安全、有效地调用所需的工具。
📄 English Summary
MCP in Production: Routing LLM Tool Calls Through an API Gateway
The Model Context Protocol (MCP) provides a standardized way for large language models (LLMs) to discover and invoke external tools such as databases, APIs, and file systems. However, in a production environment with multiple MCP servers, LLM clients, and real users, the simplicity of the protocol is insufficient. Production requirements include authentication, authorization, rate limiting, load balancing, failover, and observability. To address these needs, an API gateway specifically designed for MCP has been developed, ensuring that LLMs can securely and effectively call the necessary tools.
Powered by Cloudflare Workers + Payload CMS + Claude 3.5
数据源: OpenAI, Google AI, DeepMind, AWS ML Blog, HuggingFace 等