diff --git a/ui/app/config/views/mcpClientForm.tsx b/ui/app/config/views/mcpClientForm.tsx index bc1208c5d..90ff2b3e8 100644 --- a/ui/app/config/views/mcpClientForm.tsx +++ b/ui/app/config/views/mcpClientForm.tsx @@ -113,7 +113,7 @@ const ClientForm: React.FC = ({ client, open, onClose, onSaved Validator.required(form.connection_string?.trim(), "Connection URL is required"), Validator.pattern( form.connection_string || "", - /^(http:\/\/|https:\/\/|env\.[A-Z_]+$)/, + /^(?:https?:\/\/.+|env\.[A-Z_]+)$/, "Connection URL must start with http://, https://, or be an environment variable (env.VAR_NAME)", ), ]