7 views
-/https://github.com/berriai/litellm/issues/33397
GitHub · issue

#33397 [Bug]: mcp_tool_permissions implicitly grants MCP server access, so keys cannot opt out of servers (side effect of #22311)

  • State: open
  • Author: @pipertownley
  • Labels: proxy

### What happened?

Since #22311, `_get_allowed_mcp_servers_for_key` (and the team/end_user variants) union `mcp_tool_permissions.keys()` into the allowed-server set. This makes it impossible to revoke a server from a key while a `mcp_tool_permissions` entry for that server still exists — the tool-permission row silently re-grants the server.

The dashboard makes this worse: editing a key's MCP access and removing a server from `mcp_servers` leaves its `mcp_tool_permissions` entry behind, so the removal appears saved but has no effect.

### Current behavior

Key state observed on v1.92.0 (created and later edited via the dashboard):

```json { "mcp_servers": ["<opslevel_server_id>"], "mcp_tool_permissions": { "<opslevel_server_id>": ["..."], "<notion_server_id>": ["API-get-self", "..."], "... 9 more servers ...": ["..."] } } ```

Calling a Notion tool with this key **succeeds**, even though `mcp_servers` only grants the OpsLevel server. Effective access = union of both fields, so the widest field always wins.

This also interacts badly with `general_settings.require_key_mcp_access_defined: true`: the setting promises "keys see zero MCP servers unless their object_…

GitHub resolver

Import GitHub neighbors on demand. Results are saved as system ingests.

Refresh page
vote history (2 events)
#0 of 0 · 31d17h45m55s ago — entered · #import:https:::github.com:berriai:litellm post #3112
The left issue requires coordinated authorization semantics, persistence/editing behavior, regression coverage, and careful compatibility analysis; the right is a localized metadata/configuration change with limited implementation risk.
#0 of 0 · 31d17h41m1s ago — current · #import:https:::github.com:berriai:litellm post #3195
#33397 is harder because it affects authorization semantics across multiple principal types, configuration persistence, dashboard behavior, and backward-compatibility expectations. #33988 is comparatively localized to making a retrieval hook idempotent and adding focused regression coverage.
discussed in #import:https:::github.com:berriai:litellm

ranked child groups

no voted pairs yet in this scope

cli
src
spread
search