BerriAI/litellm · error · HTTPException
Tool '{tool_name}' is not allowed for your key/team on serve
Error message
Tool '{tool_name}' is not allowed for your key/team on server '{server.name}'. Contact proxy admin for access. What it means
Authorization check before an MCP tool call: MCPRequestHandler.is_tool_allowed_for_server returned False, meaning the virtual key/team's allowed_routes or mcp_tools scope does not include this tool on this server.
Source
Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4532
Raises:
HTTPException: If tool is not allowed for this key/team
"""
from litellm.proxy._experimental.mcp_server.auth.user_api_key_auth_mcp import (
MCPRequestHandler,
)
if not user_api_key_auth:
return
# Check if tool is allowed
is_allowed: Final = await MCPRequestHandler.is_tool_allowed_for_server(
tool_name=tool_name,
server_id=server.server_id,
user_api_key_auth=user_api_key_auth,
)
if not is_allowed:
raise HTTPException(
status_code=403,
detail={
"error": f"Tool '{tool_name}' is not allowed for your key/team on server '{server.name}'. Contact proxy admin for access."
},
)
async def _call_openapi_tool_handler(
self,
server: MCPServer,
tool_name: str,
arguments: _ToolArguments,
) -> CallToolResult:
"""
Call an OpenAPI tool handler directly.
For OpenAPI servers, instead of using MCP protocol, we call the tool handler
that was registered during OpenAPI spec parsing. This handler makes direct
HTTP requests to the API.View on GitHub (pinned to 77b7c6c40c)
Solutions
- Ask the proxy admin to grant your key/team access to this tool.
Example fix
Contact admin to add the tool to your key's allowed list.
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at litellm/proxy/_experimental/mcp_server/mcp_server_manager.py:4532 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/0864635503d6c49d.
Report an issue: GitHub.