BerriAI/litellm · error · HTTPException
MCP server '{server_id}' not found.
Error message
MCP server '{server_id}' not found. What it means
Lookup guard in the approve flow: get_mcp_server returned no DB row for the given server_id, so there is nothing to approve. Usually means the id is wrong, the submission was deleted, or the caller is pointing at a config-defined server that never gets a DB row.
Source
Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:1349
@management_endpoint_wrapper
async def approve_mcp_server_submission(
server_id: str,
user_api_key_dict: UserAPIKeyAuth = Depends(user_api_key_auth),
):
"""
Admin approves a pending or previously-rejected MCP server — sets approval_status=active and loads it into the runtime registry.
"""
if LitellmUserRoles.PROXY_ADMIN != user_api_key_dict.user_role:
raise HTTPException(
status_code=status.HTTP_403_FORBIDDEN,
detail={"error": "Admin access required to approve MCP server submissions."},
)
prisma_client: Final = get_prisma_client_or_throw("Database not connected. Connect a database to your proxy")
existing: Final = await get_mcp_server(prisma_client, server_id)
if existing is None:
raise HTTPException(
status_code=status.HTTP_404_NOT_FOUND,
detail={"error": f"MCP server '{server_id}' not found."},
)
if existing.approval_status == MCPApprovalStatus.active:
raise HTTPException(
status_code=status.HTTP_400_BAD_REQUEST,
detail={"error": "MCP server is already active."},
)
approved: Final = await approve_mcp_server(
prisma_client,
server_id,
touched_by=user_api_key_dict.user_id or LITELLM_PROXY_ADMIN_NAME,
)
await global_mcp_server_manager.invalidate_byom_submitted_servers_cache(approved.submitted_by)
await global_mcp_server_manager.reload_servers_from_database()
return _redact_mcp_credentials(approved)View on GitHub (pinned to 77b7c6c40c)
Solutions
- Verify the server_id exists by listing MCP server submissions first.
- Check for typos in the server_id value.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/management_endpoints/mcp_management_endpoints.py:1349 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/055487128ab97551.
Report an issue: GitHub.