BerriAI/litellm · error · HTTPException
Only proxy admins can update public mcp servers. Your role={
Error message
Only proxy admins can update public mcp servers. Your role={user_api_key_dict.user_role} What it means
Role guard on the make-servers-public endpoint (AI Hub): flipping servers to public rewrites proxy config (litellm.public_mcp_servers / proxy_config), a privileged operation. The caller's role is not PROXY_ADMIN and the role is echoed in the message.
Source
Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2646
request: MakeMCPServersPublicRequest,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
"""
Make MCP servers public for AI Hub
"""
try:
# Update the public model groups
import litellm
from litellm.proxy._experimental.mcp_server.mcp_server_manager import (
global_mcp_server_manager,
)
from litellm.proxy.proxy_server import proxy_config
# Load existing config
config: Final = await proxy_config.get_config()
# Check if user has admin permissions
if user_api_key_dict.user_role != LitellmUserRoles.PROXY_ADMIN:
raise HTTPException(
status_code=403,
detail={
"error": f"Only proxy admins can update public mcp servers. Your role={user_api_key_dict.user_role}"
},
)
if litellm.public_mcp_servers is None:
litellm.public_mcp_servers = []
for server_id in request.mcp_server_ids:
server = global_mcp_server_manager.get_mcp_server_by_id(server_id=server_id)
if server is None:
raise HTTPException(
status_code=404,
detail=f"MCP Server with ID {server_id} not found",
)
litellm.public_mcp_servers = request.mcp_server_idsView on GitHub (pinned to 77b7c6c40c)
Solutions
- Use a PROXY_ADMIN key to update public MCP servers, or make the server non-public.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:2646 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/7bc512ec67755811.
Report an issue: GitHub.