BerriAI/litellm · error · HTTPException

You do not have permission to view MCP servers for this team

Error message

You do not have permission to view MCP servers for this team.

What it means

Authorization check for GET /v1/mcp/server?team_id=: the caller is not a proxy admin and the team object fetched from the DB (check_db_only) shows the caller's user_id is not a member of the requested team, so listing that team's MCP servers is denied.

Source

Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:1119

            if not is_admin:
                from litellm.proxy.auth.auth_checks import get_team_object
                from litellm.proxy.proxy_server import (
                    prisma_client,
                    user_api_key_cache,
                )

                team_obj: Final = await get_team_object(
                    team_id=sanitized_team_id,
                    prisma_client=prisma_client,
                    user_api_key_cache=user_api_key_cache,
                    check_db_only=True,
                )
                user_in_team: Final = any(
                    m.user_id is not None and m.user_id == user_api_key_dict.user_id
                    for m in team_obj.members_with_roles
                )
                if not user_in_team:
                    raise HTTPException(
                        status_code=403,
                        detail="You do not have permission to view MCP servers for this team.",
                    )

            redacted_mcp_servers = await _get_team_scoped_mcp_server_list(sanitized_team_id)
        else:
            servers: Final = await _resolve_accessible_mcp_servers(user_api_key_dict)
            redacted_mcp_servers = _redact_mcp_credentials_list(servers)

        if connected_app_view is True and is_ui_session_credential(user_api_key_dict):
            reachable_ids: Final = await _connected_app_reachable_server_ids(user_api_key_dict)
            for server in redacted_mcp_servers:
                server.connected_app_reachable = server.server_id in reachable_ids

        # augment the mcp servers with public status
        if litellm.public_mcp_servers is not None:
            for server in redacted_mcp_servers:
                if server.server_id in litellm.public_mcp_servers:

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Use a key associated with the team that owns the MCP servers.
  2. Ask a team admin or proxy admin to grant you access.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:1119 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of BerriAI/litellm@77b7c6c40c (2026-08-18). Data as JSON: /api/errors/d4ed08ce3584d5ad. Report an issue: GitHub.