feat: dynamic MCP proxy config with backend overrides (Host/Path/Auth)#2345
Open
pbonuboinasnow wants to merge 8 commits into
Open
feat: dynamic MCP proxy config with backend overrides (Host/Path/Auth)#2345pbonuboinasnow wants to merge 8 commits into
pbonuboinasnow wants to merge 8 commits into
Conversation
pbonuboinasnow
force-pushed
the
feature/dynamic-mcp-proxy-dfp
branch
3 times, most recently
from
July 10, 2026 12:44
75c0805 to
f4addab
Compare
Author
|
@mathetake @nacx what's your opinion on this? we need a way to support 1000s (yes) of MCP routes as we are a multi tenant deployment with dynamic rules. |
pbonuboinasnow
force-pushed
the
feature/dynamic-mcp-proxy-dfp
branch
from
July 13, 2026 04:45
f4addab to
4a117cf
Compare
pbonuboinasnow
marked this pull request as ready for review
July 13, 2026 04:46
pbonuboinasnow
force-pushed
the
feature/dynamic-mcp-proxy-dfp
branch
from
July 13, 2026 04:51
4a117cf to
59cfa1f
Compare
pbonuboinasnow
force-pushed
the
feature/dynamic-mcp-proxy-dfp
branch
from
July 13, 2026 07:05
5f75a41 to
4242e88
Compare
- Add dynamic route config via x-ai-eg-mcp-dynamic-route-config header (base64-encoded JSON MCPRoute overrides static filter-config.yaml) - Add Host, BackendPath, Auth fields to MCPBackend for DFP support - Apply backend overrides in all 3 request paths: invokeJSONRPCRequest, sendRequestPerBackend, session.Close() - Add unit tests for applyBackendOverrides and dynamic route config - Add DYNAMIC_MCP_CONFIG.md with usage examples Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
… shadow Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
…adow, remove sync script Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
…ion header Prevents a route/backend forwardHeaders config from clobbering a configured MCPBackend.Auth outbound credential when the client's request carries its own Authorization header of the same name. Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
Create examples/dynamic-mcp-config/ directory with: - README.md — Overview, architecture, header format, implementation details - filter-config.yaml — Static backend configuration example Provides clear documentation for per-request MCP backend configuration overrides via x-ai-eg-mcp-dynamic-route-config header. Signed-off-by: prasad.bonuboina <prasad.bonuboina@servicenow.com>
pbonuboinasnow
force-pushed
the
feature/dynamic-mcp-proxy-dfp
branch
from
July 13, 2026 13:24
4242e88 to
0547dfa
Compare
…namic MCP proxy example
…c MCP config JSON format
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds dynamic MCP route and backend configuration without relying solely on the static filter-config.yaml, enabling flexible multi-tenant MCP deployments.
Use Case: Multi-Tenant MCP Deployments
This feature supports multi-tenant deployments with thousands of MCP routes, where each tenant or deployment has different MCP backend configurations and rules. Instead of managing static routes for every tenant:
Technical Details
1. Dynamic Route Config via Header
The MCP proxy checks for the
x-ai-eg-mcp-dynamic-route-configheader on every incoming request. If present, its value is interpreted as a base64-encoded JSON representation of an MCPRoute object, which takes precedence over the statically loaded route. Falls back to static config if the header is missing or malformed. This header is expected to be set by a trusted upstream filter (e.g. an ext_proc filter in the Envoy filter chain) before reaching the MCP proxy, not by external clients directly.2. Backend Overrides (Host / Path / Auth)
Three new optional fields on MCPBackend:
All are optional. Overrides are applied in all 3 backend request paths: invokeJSONRPCRequest, sendRequestPerBackend, and session.Close().
Files changed:
Related Issues/PRs (if applicable)
Special notes for reviewers (if applicable)
This enables supporting 1000s of MCP routes in multi-tenant deployments where each tenant has dynamic configuration rules.