Skip to content

me: header-auth Connect snippets when interactive login is unavailable - #15

Merged
selic merged 1 commit into
mainfrom
feat/me-connect-header
Jul 25, 2026
Merged

me: header-auth Connect snippets when interactive login is unavailable#15
selic merged 1 commit into
mainfrom
feat/me-connect-header

Conversation

@selic

@selic selic commented Jul 25, 2026

Copy link
Copy Markdown
Member

Summary

Follow-up to #14. On token-only deployments the Connect section showed the URL-alone claude mcp add command, which can't work there — without interactive login the OAuth facade (PRM + DCR) isn't mounted, so MCP clients must send the bearer token themselves.

When /health reports login: false, the Connect section now:

  • renders the CLI command with --header "Authorization: Bearer <your-bearer-token>" and the JSON config with a matching headers block;
  • explains why (bearer-token auth, no interactive sign-in) and warns that the CLI command lands in shell history, pointing at the JSON config instead;
  • offers an opt-in "Insert my token into the snippets" checkbox (off by default, disabled for cookie sessions) that swaps the placeholder for the signed-in user's own pasted token.

OAuth-enabled deployments are untouched — login: true keeps the zero-config snippets exactly as before.

Test plan

  • npm test — 211 passed (frontend-only change)
  • Manual (token-only dev server): snippet shows the --header placeholder variant; checkbox swaps in the real token and back; POST /mcp with that exact header returns 200; scope checkbox still refreshes both snippets

🤖 Generated with Claude Code

Without the OAuth facade (no PRM/DCR) the URL-alone `claude mcp add`
flow can't authenticate, but the Connect section showed it anyway. When
/health reports login: false the CLI and JSON snippets now include the
Authorization: Bearer header with a placeholder, plus an opt-in
checkbox that embeds the signed-in user's own token (off by default —
the CLI command lands in shell history, and the note says to prefer
the JSON config where that matters).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@selic
selic merged commit 746fe13 into main Jul 25, 2026
1 check passed
@selic
selic deleted the feat/me-connect-header branch July 25, 2026 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant