Skip to content

fix: end --header flags with -- in the printed claude mcp add command (PROJ-978) - #394

Merged
TAJD merged 1 commit into
mainfrom
fix/proj-978-mcp-add-double-dash
Oct 4, 2026
Merged

TAJD merged 1 commit into
mainfrom
fix/proj-978-mcp-add-double-dash

Conversation

@TAJD

@TAJD TAJD commented Oct 4, 2026

Copy link
Copy Markdown
Owner

Summary

-H, --header <header...> is variadic on current Claude Code, so --header … projektor "<url>" made it swallow the name and URL (error: missing required argument 'name', shell exit still 0). Both builders in packages/types/src/mcp-command.ts now emit … --header "…" -- projektor "<url>". That covers the /bootstrap mcpAddCommand, mcp-info's mcpAddCommandTemplate, and the token dialog. Pinned tests (workspaces.test.ts, TokenManager.test.tsx) updated; mcp-connection.md no longer says the printed command is broken.

Fixes PROJ-978.

Verified

  • Claude Code 2.1.289 against wrangler dev: ran the /bootstrap-printed command (with --scope local and a scratch name scratch978 in a temp dir), then claude mcp list → ✔ Connected. Entry removed afterwards (claude mcp remove scratch978 -s local, confirmed gone); the user-scope config was never modified.
  • Also saw the shell return exit 0 when claude mcp add fails, hence the explicit list check.
  • api workspaces.test.ts (45) and web TokenManager.test.tsx (8) pass; biome clean.

Assumed

  • That -- also works on older Claude Code is taken from the ticket ("works whichever order an older CLI expects"); I only tested 2.1.289.

🤖 Generated with Claude Code

https://claude.ai/code/session_014JyYB2AfPyH695ScaeCofW

… (PROJ-978)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014JyYB2AfPyH695ScaeCofW
@TAJD
TAJD merged commit f0e31a3 into main Oct 4, 2026
1 check passed
@TAJD
TAJD deleted the fix/proj-978-mcp-add-double-dash branch October 4, 2026 14:23
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