From d6d0f395db764a716c45bcdf1e7fb38b57d77cbe Mon Sep 17 00:00:00 2001 From: BeLazy167 Date: Thu, 20 Aug 2026 21:30:51 -0500 Subject: [PATCH] Give 'claude mcp login' a real terminal under curl | bash MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Reported from a colleague's first install: MCP sign-in always failed with "stdin isn't a terminal, so authentication can't be completed here". Under `curl … | bash` this script's stdin IS the pipe, and the login subcommand inherits it. The prompts already read /dev/tty explicitly; the login call now does too. --- install.ps1 | 2 ++ install.sh | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/install.ps1 b/install.ps1 index 11fbab8..c3d073c 100644 --- a/install.ps1 +++ b/install.ps1 @@ -498,6 +498,8 @@ if ($LASTEXITCODE -eq 0) { # key above cannot authorize it. Do the browser sign-in now, while the user is # still here, rather than surprising them mid-session. if (Confirm-Step 'Sign in to the qBraid MCP now? (opens a browser)' 'y') { + # Unlike the piped bash path, `iex` keeps the console attached, so the + # OAuth prompt can read the redirect URL directly. claude mcp login $McpName if ($LASTEXITCODE -ne 0) { Warn "MCP sign-in did not complete. Run ``claude mcp login $McpName`` later." } } else { diff --git a/install.sh b/install.sh index ac13858..0b84a2f 100755 --- a/install.sh +++ b/install.sh @@ -716,7 +716,11 @@ fi # still here, rather than surprising them mid-session. if [ -n "$TTY" ]; then if confirm "Sign in to the qBraid MCP now? (opens a browser)" y; then - claude mcp login "$MCP_NAME" \ + # `claude mcp login` needs a real terminal to take the redirect URL. Under + # `curl … | bash` this script's stdin IS the pipe, so it must be handed the + # terminal explicitly — otherwise sign-in always fails with + # "stdin isn't a terminal". + claude mcp login "$MCP_NAME" < "$TTY" \ || warn "MCP sign-in did not complete. Run \`claude mcp login $MCP_NAME\` later." else warn "skipped. Run \`claude mcp login $MCP_NAME\` when you want the qBraid tools."