Skip to content

[Proposal] Support for MCP protocol #589

@yanavlasov

Description

@yanavlasov

The Model Context Protocol (MCP) is an open, stateless/stateful protocol that allows GenAI applications to retrieve and exchange context (e.g. source code, files, documents) with LLMs, using JSON-RPC semantics. For more context see envoyproxy/envoy#39174

Adding MCP support to ai-gateway would provide a more comprehensive "package" for serving GenAI requests.

At a minimum ai-gateway could provide the following functionality:

  1. Routing policy to backends with retries.
  2. Authentication of requests
  3. Authorization per RPC method
  4. Access logging of RPCs
  5. Ratelimiting per RPC
  6. Transcoding JSON-RPC messages to existing API surfaces, for example gRPC and OpenAPI.

Going forward it could:

  1. Provide external callouts to inspect MCP requests and responses, for example to provide additional filtering or custom policy.
  2. Multiplexing/demultiplexing of batches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions