-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Feature: mcp to grpc proxy #40876
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: mcp to grpc proxy #40876
Conversation
Signed-off-by: 爵银 <[email protected]> # Conflicts: # envoy/http/BUILD
|
Hi @jue-yin, welcome and thank you for your contribution. We will try to review your Pull Request as quickly as possible. In the meantime, please take a look at the contribution guidelines if you have not done so already. |
|
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
|
Are you also planning for mcp-proxy to be developed further to serve as a transparent proxy for existing MCP servers, utilizing MCP context awareness for tasks such as authentication, routing, and rate limiting? |
|
@guydc Hello, I am on the same team as the author of this PR. My understanding is that Envoy natively supports direct proxy scenarios, but some additional capabilities such as observability for JSON RPC might be needed, right? |
In the current proposal, it seems that the mcp-proxy filter is focused on exposing existing REST/gRPC services as an MCP server:
I wonder if mcp-proxy can also be used as a standalone and transparent filter that emits mcp context when proxying an existing MCP server. For example, by emitting relevant metadata from the mcp-proxy filter, it might be possible to build support for:
|
Couldn't all these things be done by exposing the tool name in request metadata? |
|
How would that work with streamable http (especially the SSE and session-based part of it)? |
yes, I think this is a legit use case that we can support at first, storing to metadata will work. |
|
Wow, wow wow 👍 |
|
This pull request has been automatically marked as stale because it has not had activity in the last 30 days. It will be closed in 7 days if no further activity occurs. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
|
This pull request has been automatically closed because it has not had activity in the last 37 days. Please feel free to give a status update now, ping for review, or re-open when it's ready. Thank you for your contributions! |
Add MCP Proxy Filter and gRPC Transcoder Handler
Overview
This PR adds two new extensions to Envoy:
mcp_proxy) - Implements Model Context Protocol (MCP) server functionalitymcp_to_grpc) - Transforms MCP tool calls to gRPC requestsFeatures
MCP Proxy Filter
/tools/list)/tools/call)MCP to gRPC Handler
Technical Implementation
Core Components
McpFilter: HTTP filter implementing MCP protocol handlingMcpToGrpcMcpHandler: Transforms MCP requests to gRPC callsTranscoderInputStreamImpl: Custom input stream implementationConfiguration Example
Testing
need to add
Related Issues
#39174