diff --git a/ui/litellm-dashboard/src/hooks/useTestMCPConnection.tsx b/ui/litellm-dashboard/src/hooks/useTestMCPConnection.tsx index 0a771dcf24f..8ecbb63dcd1 100644 --- a/ui/litellm-dashboard/src/hooks/useTestMCPConnection.tsx +++ b/ui/litellm-dashboard/src/hooks/useTestMCPConnection.tsx @@ -82,7 +82,10 @@ export const useTestMCPConnection = ({ const credentialsKey = JSON.stringify(formValues.credentials ?? {}); const fetchTools = async () => { - if (!accessToken || !hasRequiredAuthValue || (!formValues.url && !formValues.spec_path)) { + if (!hasRequiredAuthValue) { + return; + } + if (!accessToken || (!formValues.url && !formValues.spec_path)) { return; }