litellm/tests/test_litellm/proxy/_experimental/mcp_server
ryan-crabbe-berri 9b10543427
feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029)
* feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel

A key under a team that has MCP servers had no way to opt out of them;
an empty list has always meant "inherit the team". This adds a
no-mcp-servers sentinel (mirroring no-default-models for models) so a key
can declare an explicit zero that overrides team inheritance, additive
grants, and allow_all_keys servers, surfaced as an exclusive "No MCP
Servers" option in the key create/edit UI.

* refactor(ui): centralize no-mcp-servers sentinel in a shared constant

The sentinel string was defined under two different local names and
inlined in two more files; a single exported constant removes the drift
risk flagged in review.

* fix(mcp): enforce no-mcp-servers sentinel on toolset-scoped routes

Toolset scoping replaced a key's mcp_servers with the toolset's servers,
dropping the no-mcp-servers sentinel, so a key opted out of all MCP could
still execute a granted toolset's tools via /toolset/{name}/mcp. Deny
toolset access when the key carries the sentinel, checked before the admin
branch to match get_allowed_mcp_servers.

(cherry picked from commit 19a29e0579)
2026-06-23 20:00:04 -07:00
..
auth feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-23 20:00:04 -07:00
guardrail_translation fix(tests): Add missing mocks for MCP IP filtering and updated APIs (#20652) 2026-02-07 11:30:49 -08:00
test_byok_oauth_endpoints.py feat(mcp): allow native MCP OAuth support for cursor (#28327) 2026-05-20 15:28:44 -07:00
test_callback_oauth_error_responses.py Litellm oss staging 250526 (#28770) 2026-05-26 11:57:39 -07:00
test_db_credentials.py fix(ui): persist Tools-tab MCP OAuth token to DB (#29809) 2026-06-05 22:29:56 -07:00
test_discoverable_endpoints.py changing expires_in default to use actual slack return details (#29951) 2026-06-15 18:21:22 -07:00
test_is_tool_name_prefixed.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_jwt_mcp_enforcement.py fix(mcp): resolve team.access_group_ids → MCP servers (#28997) 2026-05-27 12:36:50 -07:00
test_jwt_mcp_simple.py fix(mcp): resolve team.access_group_ids → MCP servers (#28997) 2026-05-27 12:36:50 -07:00
test_mcp_cost_calculator.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_custom_fields.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_debug.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_discovery.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_elicitation_handler.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_env_vars.py fix(mcp): drop orphaned per-user credential rows when an MCP server is deleted (#30141) 2026-06-15 18:21:45 -07:00
test_mcp_header_alias_utils.py feat(mcp): Add tool call and tool list support via UI for Oauth mcps (#28454) 2026-05-22 09:04:04 -07:00
test_mcp_hook_extra_headers.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_metadata_preservation.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_mcp_oauth_passthrough.py [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
test_mcp_oauth_passthrough_cold_start.py [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
test_mcp_oauth_passthrough_tools.py [internal copy of #28008] Support MCP OAuth passthrough and issuer-scoped JWT auth (#28356) 2026-06-02 12:22:04 -07:00
test_mcp_partial_update.py fix(mcp): clear allowed_tools and tool overrides on MCP server edit (#29411) 2026-06-01 21:28:29 -07:00
test_mcp_sampling_completion_flow.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_model_access.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_model_resolution.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_priority_selection.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_request_builder.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_response_conversion.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_sampling_tool_conversion.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_server.py feat(mcp): per-server env vars with global + per-user scopes (#28917) 2026-06-05 20:15:11 -07:00
test_mcp_server_manager.py feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-23 20:00:04 -07:00
test_mcp_session_logging.py Add MCP semantic conventions to otelv2 (#29468) 2026-06-02 11:45:36 -07:00
test_mcp_sigv4_auth.py feat(mcp): per-server env vars with global + per-user scopes (#28917) 2026-06-05 20:15:11 -07:00
test_mcp_stale_session.py Litellm oss staging 040626 (#29671) 2026-06-04 11:07:20 -07:00
test_mcp_toolset_scope.py feat(mcp): scope a key to zero MCP servers with no-mcp-servers sentinel (#31029) 2026-06-23 20:00:04 -07:00
test_oauth2_token_cache.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00
test_openapi_to_mcp_generator.py fix(mcp): forward extra_headers for OpenAPI MCP tools (#27383) 2026-05-09 15:10:54 -04:00
test_openapi_tool_auth.py fix(mcp): use canonical proxy_logging_obj, deny when MCP server is unresolvable 2026-05-01 22:28:46 +00:00
test_rest_endpoints.py fix(mcp): load MCP tool configuration tools via the OBO/passthrough-aware GET path (#29960) 2026-06-15 18:21:29 -07:00
test_semantic_tool_filter.py fix(mcp_semantic_tool_filter): match tools with client-side namespace prefix (#26078) (#26117) 2026-04-22 19:06:34 -07:00
test_short_mcp_tool_prefix.py fix(mcp): address greptile review on short tool prefix 2026-04-29 03:59:40 +00:00
test_ui_session_utils.py style: run black formatter on files from main merge 2026-04-17 13:02:59 -07:00