add list of allowed headers to be passed to tool calls#1217
Merged
EItanya merged 13 commits intokagent-dev:mainfrom Feb 1, 2026
Merged
add list of allowed headers to be passed to tool calls#1217EItanya merged 13 commits intokagent-dev:mainfrom
EItanya merged 13 commits intokagent-dev:mainfrom
Conversation
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds support for propagating specific HTTP headers from A2A requests to MCP tool calls, allowing selective header forwarding based on a configured allowlist.
Changes:
- Added header propagation functionality to combine STS tokens with allowlisted headers from A2A requests
- Updated CRDs and Go types to support
allowedHeadersconfiguration on Agent MCP tools - Added new dependencies (filelock and urllib3) to support the implementation
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| python/uv.lock | Updated filelock (3.18.0 → 3.20.3) and urllib3 (2.5.0 → 2.6.3), added as new dependencies |
| python/packages/kagent-adk/tests/unittests/test_header_propagation.py | Comprehensive unit tests for header propagation including case-insensitivity, STS combination, and edge cases |
| python/packages/kagent-adk/src/kagent/adk/types.py | Core implementation of create_header_provider function and propagate_headers fields on MCP server configs |
| helm/kagent-crds/templates/kagent.dev_remotemcpservers.yaml | Added allowedHeaders field to RemoteMCPServer CRD schema |
| go/internal/controller/translator/agent/testdata/inputs/agent_with_allowed_headers.yaml | Test data demonstrating agent configuration with allowed headers |
| go/internal/controller/translator/agent/adk_api_translator.go | Updated translator to pass allowedHeaders from Agent spec to ADK config |
| go/internal/adk/types.go | Added PropagateHeaders field to HttpMcpServerConfig and SseMcpServerConfig structs |
| go/config/crd/bases/kagent.dev_agents.yaml | Added allowedHeaders field to McpServerTool in Agent CRD schema |
| go/api/v1alpha2/zz_generated.deepcopy.go | Generated deepcopy implementation for AllowedHeaders field |
| go/api/v1alpha2/agent_types.go | Added AllowedHeaders field to McpServerTool struct |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
go/internal/controller/translator/agent/testdata/inputs/agent_with_allowed_headers.yaml
Show resolved
Hide resolved
python/packages/kagent-adk/tests/unittests/test_header_propagation.py
Outdated
Show resolved
Hide resolved
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
… remove old ref from remote mcp servers Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
EItanya
reviewed
Jan 29, 2026
Contributor
EItanya
left a comment
There was a problem hiding this comment.
LGTM overall, just a nit and a couple questions
go/internal/controller/translator/agent/adk_translator_golden_test.go
Outdated
Show resolved
Hide resolved
…func to struct, add comments around sts and auth headers Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Signed-off-by: Kevin Shelaga <65769106+kevin-shelaga@users.noreply.github.com>
…helaga/kagent into propagate-headers-to-mcp
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Signed-off-by: kevin-shelaga <kevin.shelaga@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
Signed-off-by: Eitan Yarmush <eitan.yarmush@solo.io>
EItanya
approved these changes
Jan 30, 2026
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.
Add new allowedHeaders option on agent mcp server config. Its an array of string (case insensitive) of headers to be passed along to tool calls.
This is useful for things outside of jwt, like passing in tenant id and user email for cloud provider calls.