Update Claude Code installation command for v2.1.1+ add-json format #1766
+26
−6
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Updates Claude Code installation docs to use the
add-jsoncommand format required in v2.1.1+, replacing the deprecated--transport httpsyntax.Why
The documented
claude mcp add --transport httpcommand no longer sets headers correctly in Claude Code v2.1.1+. The newadd-jsonformat is required.What changed
claude mcp add-jsonwith JSON config object--scopeflag documentation (local/project/user) with legacy name mappingslocalscope (flag omitted) with guidance on using other scopesExample of new command format:
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}'MCP impact
Prompts tested (tool changes only)
N/A
Security / limits
Tool renaming
Lint & tests
./script/lint./script/testDocs
docs/installation-guides/install-claude.mdOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.