BerriAI/litellm · error · HTTPException

Call not allowed to update MCP server. User is not a proxy a

Error message

Call not allowed to update MCP server. User is not a proxy admin. route={}

What it means

Role guard in the MCP server update flow (PUT /v1/mcp/server): the caller is not a proxy admin, so mutating a server configuration is denied. The route is interpolated into the message for logging/debuggability.

Source

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

        Parameters:
        - payload: UpdateMCPServerRequest - Required. The updated mcp server data.
        ```
        curl -X "PUT" --location 'http://localhost:4000/v1/mcp/server' \
        --header 'Authorization: Bearer your_api_key_here'
        ```
        """
        prisma_client: Final = get_prisma_client_or_throw(
            "Database not connected. Connect a database to your proxy - https://docs.litellm.ai/docs/simple_proxy#managing-auth---virtual-keys"
        )

        payload_fields_set: Final = set(payload.fields_set())

        # Validate and normalize payload fields
        validate_and_normalize_mcp_server_payload(payload)

        # Authz - restrict only admins to delete mcp servers
        if LitellmUserRoles.PROXY_ADMIN != user_api_key_dict.user_role:
            raise HTTPException(
                status_code=status.HTTP_403_FORBIDDEN,
                detail={
                    "error": "Call not allowed to update MCP server. User is not a proxy admin. route={}".format(
                        "PUT /v1/mcp/server"
                    )
                },
            )

        # Snapshot the pre-update identity so we can detect a mint-relevant change below. The read is
        # advisory (it only feeds the stale-token purge decision), so a failure skips the purge with a
        # warning instead of failing the edit, whose primary job is the update itself.
        try:
            old_server_record = await get_mcp_server(prisma_client, payload.server_id)
            old_server_record_read_failed = False
        except Exception as exc:  # noqa: BLE001 - advisory read; invalidation is best-effort end-to-end
            verbose_logger.warning(
                "MCP server %s: could not snapshot the pre-update record; skipping the stale-token check: %s",
                payload.server_id,

View on GitHub (pinned to 77b7c6c40c)

Solutions

  1. Retry the request with a PROXY_ADMIN API key.
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2529 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/df3121ee1cdebf91. Report an issue: GitHub.