From b7325f4765df18b918529e1a0c2dabb2ad976ac1 Mon Sep 17 00:00:00 2001 From: "Jugal D. Bhatt" <55304795+jugaldb@users.noreply.github.com> Date: Wed, 6 Aug 2025 15:32:21 -0700 Subject: [PATCH] [MCP Gateway] Added route check for internal users (#13350) * added route check * fix ruff --- litellm/proxy/auth/route_checks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/litellm/proxy/auth/route_checks.py b/litellm/proxy/auth/route_checks.py index e4d4f321159..f6b088d15a6 100644 --- a/litellm/proxy/auth/route_checks.py +++ b/litellm/proxy/auth/route_checks.py @@ -210,7 +210,7 @@ class RouteChecks: route=route, allowed_routes=LiteLLMRoutes.self_managed_routes.value ): # routes that manage their own allowed/disallowed logic pass - elif route.startswith("/v1/mcp/"): + elif route.startswith("/v1/mcp/") or route.startswith("/mcp-rest/"): pass # authN/authZ handled by api itself else: user_role = "unknown"