Governs service calls within the MCP framework by dynamically adjusting prices based on current load and controlling client access through token budgets.
The mcp_gateway is a robust service governance engine designed for Model Context Protocol (MCP) tool invocation scenarios. It implements a dynamic pricing model where each MCP tool call has a fluctuating 'price' determined by server load, such as queuing delay or throughput. Clients carry a 'token' budget with their requests, and the server actively rejects requests (load shedding) when the client's tokens are insufficient to meet the current price, thus protecting the service from overload. Simultaneously, the framework empowers clients to implement rate limiting, preventing requests from being sent when their token budget is inadequate, ensuring a resilient and adaptive system for managing resource consumption.
