-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: MCP authorization parameter implementation #4052
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
Merged
ashwinb
merged 103 commits into
llamastack:main
from
omaryashraf5:add-mcp-authentication-param
Nov 14, 2025
Merged
Changes from all commits
Commits
Show all changes
103 commits
Select commit
Hold shift + click to select a range
d0a8878
MCP authentication parameter implementation
57eb575
Added minor changes
c49fef8
precommit
1143db0
added a fix
376f0fc
minor fix
9dbeeac
Removed the MCPAuthorization class relying on bearer token
d2103eb
precommit
0487496
precommit
fec6f20
reverted some formatting changes
abc717e
reverted some formatting changes
1db14ca
removed _convert_authorization_to_headers
59793ac
minor linting change
a23ee35
reverting some formatting changes
6bd0d64
reverting some formatting
c911e9a
minor formatting change
5c5f6f7
updated the test script
8632c70
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 09ef0b3
Updated the authentication field to take just the token
b8c2419
precommit
dcb3dc4
raising an error when the authentication field is present in the auth…
a605cc2
formatting
76fdff4
created a single helper function and updated list_mcp_tools and invok…
7db4ed7
fix: update MCP tool runtime provider to use new function signatures
411b18a
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 18aff1a
rejecting headers that include Authorization in the header and pointi…
d58da03
fix: update test to use authorization parameter instead of headers
dbe41d9
Updated a single test case to not include authorization field in the …
e8cb526
Updated get_headers_from_request
ac9442e
fix: update test_mcp to use authorization parameter instead of headers
5ce48d2
precommit
d08c529
formatting issues
dd9c7b3
removed a small comment
267c895
precommit
1c27c1b
feat: add response sanitization and validation for MCP authorization
8ce30b7
test: update error message match for authorization validation
50040f3
refactor: move Authorization validation from API model to handler layer
2b0423c
refactor: move Authorization validation to correct handler file
a842c90
security: enforce Authorization rejection in remote MCP provider
445135b
feat: implement dedicated mcp_authorization field for remote provider
ccb870c
precommit
a2098ee
docs: add comprehensive docstring for MCPProviderDataValidator
c563d8a
formatting
2295a1a
formatting changes
9e972cf
docs: clarify security mechanism comments in get_headers_from_request
1a7ba68
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 7358312
fix: update tests to use new mcp_authorization field
0f0aa6a
fix: correct import path for LlamaStackAsLibraryClient in test
c353873
precommit run
6716e12
security: exclude mcp_authorization from serialization and logs
114ab69
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 5c6f713
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 30a544f
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 945a288
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 893e186
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 84baa5c
feat: unify MCP authentication across Responses and Tool Runtime APIs
d0ec3b0
fix: add authorization parameter to all ToolRuntime provider implemen…
d804e37
chore: trigger CI rebuild with fresh Python cache
7a823bc
fix: remove syntax errors from test files caused by sed
607e3cc
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 bf28c21
chore: trigger CI - all provider signatures fixed
778b7de
fix: add authorization parameter to ToolRuntimeRouter and routing table
025c301
Fix CI: Force reinstall llama-stack from source
1ea57b0
Fix CI: Clear Python bytecode cache before reinstall
6aaf4ad
fix(ci): Remove uv.lock before sync to ensure fresh dependency resolu…
8b6588d
fix(ci): Clear UV cache directory instead of lock file
6dc2d92
fix(ci): Clear cached .venv directory to ensure fresh install
0754d59
fix(ci): Add final bytecode cache clear after installations
844a159
fix(ci): Install ci-tests distribution dependencies to fix test failures
761a2a0
fix(ci): Use 'uv run' to execute llama command in virtual environment
166c37b
fix(ci): Prevent Python from caching old code during uv sync
bae5b14
debug: Add detailed logging for signature mismatch errors
d156451
fix(ci): Add authorization parameter to api_recorder tool runtime pat…
4a1fa13
revert(ci): Remove unnecessary CI workarounds from action.yml
c0295a2
revert(debug): Remove temporary debug logging from resolver
18f1977
fix(tool-runtime): Remove authorization from list_runtime_tools()
e6ebbd8
fix(tool-runtime): Remove authorization from list_runtime_tools in al…
66ca51a
feat(tool-runtime): Add authorization parameter to list_runtime_tools
1a6cb70
precommit
fa2b361
Merge branch 'main' into add-mcp-authentication-param
ashwinb 8783255
feat(tool-runtime): Add authorization parameter with backward compati…
c1b6320
Updated the test cases to support the headers for now
9c484d1
Updated some unit tests
4b6bfba
Added comments and updated model_context_protocol.py
d913756
updated test_tools_with_schemas
e6c6c36
Merge remote-tracking branch 'upstream/main' into add-mcp-authenticat…
68b8f74
updated a comment in mcp.py
b090ed2
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 949756e
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 a9bcc0a
Merge branch 'main' into add-mcp-authentication-param
omaryashraf5 c2bf725
Merge remote-tracking branch 'upstream/main' into add-mcp-authenticat…
b5395fa
fix: Update import path after API reorganization
42d5547
test: Mark test_mcp_tools_in_inference as xfail due to deprecated reg…
fa8d3f9
test: Remove xfail marker from test_mcp_tools_in_inference
eddd29a
test: Skip MCP test when SDK lacks register_tool_group method
50cae44
fix: Update MCP test to use register() instead of register_tool_group()
8d30c40
test: Add timeout to test_conversation_error_handling to prevent CI hang
0391aaa
test: Remove skip marker from MCP authentication tests
a8c8cd8
test: Use responses_client and remove library client skips
f60d726
test: Fix error handling test to accept BadRequestError
e13014b
test: Add skip marker for MCP auth tests in replay mode
3d02349
test: Keep skip marker for MCP auth tests (recordings needed)
0b575f7
Add MCP authorization parameter support with test recordings
eb4b6fa
precommit
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.