litellm/tests/test_litellm/proxy/_experimental/mcp_server
jay prajapati 0e738a5027
fix(mcp): forward static_headers to MCP servers (#19341) (#19366)
Forward static_headers from /mcp-rest/test/* routes into the MCP client so headers are present during session.initialize() and tool discovery.

Also add a shared merge_mcp_headers() helper to keep header precedence consistent and ensure OpenAPI-to-MCP generated tools include static_headers.

Tests:
- pytest tests/test_litellm/proxy/_experimental/mcp_server/test_rest_endpoints.py
- pytest tests/test_litellm/proxy/_experimental/mcp_server/test_mcp_server_manager.py -k register_openapi_tools_includes_static_headers

Fixes #19341

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
2026-01-21 19:30:55 -08:00
..
auth Fix CI: Revert security scan changes and add GitGuardian ignore rules (#18358) 2025-12-22 17:03:53 -08:00
guardrail_translation fix: move code from litellm/llms to the mcp_server dir 2026-01-05 12:05:16 +09:00
test_discoverable_endpoints.py fix: added RFC RECOMMENDED property(scopes_supported) to protected resource and authorization server metadata 2025-12-20 13:22:29 +08:00
test_mcp_cost_calculator.py [Feat] Add MCP Cost Tracking (#12385) 2025-07-07 21:08:10 -07:00
test_mcp_custom_fields.py feat: add UI support for configuring meta URLs 2026-01-02 15:07:37 +09:00
test_mcp_metadata_preservation.py Feat/mcp preserve tool metadata calltoolresult (#17561) 2025-12-05 16:15:22 -08:00
test_mcp_server_manager.py fix(mcp): forward static_headers to MCP servers (#19341) (#19366) 2026-01-21 19:30:55 -08:00
test_mcp_server.py test: add test 2026-01-21 14:51:56 +09:00
test_openapi_to_mcp_generator.py Revert "Stabilise mock tests" 2026-01-17 06:26:18 +09:00
test_rest_endpoints.py fix(mcp): forward static_headers to MCP servers (#19341) (#19366) 2026-01-21 19:30:55 -08:00
test_ui_session_utils.py fix: mcp deepcopy error 2025-12-16 07:02:07 +09:00