Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 8, 2026

Summary

Updates Claude Code installation docs to use the add-json command format required in v2.1.1+, replacing the deprecated --transport http syntax.

Why

The documented claude mcp add --transport http command no longer sets headers correctly in Claude Code v2.1.1+. The new add-json format is required.

What changed

  • Updated Remote Server Setup to use claude mcp add-json with JSON config object
  • Added --scope flag documentation (local/project/user) with legacy name mappings
  • Examples use default local scope (flag omitted) with guidance on using other scopes
  • Created "For Older Versions" section with legacy command format for v2.1.0 and earlier
  • Moved scope configuration details from Important Notes to inline documentation

Example 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

  • No tool or API changes — Documentation only

Prompts tested (tool changes only)

N/A

Security / limits

  • No security or limits impact

Tool renaming

  • I am not renaming tools as part of this PR

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Updated (README / docs / examples) — Updated docs/installation-guides/install-claude.md
Original prompt

This section details on the original issue you should resolve

<issue_title>Claude Code Github MCP installation command</issue_title>
<issue_description>### Describe the bug

In the documentation, the Claude Code installation command is written as:

claude mcp add --transport http github https://api.githubcopilot.com/mcp -H "Authorization: Bearer YOUR_GITHUB_PAT"

... but it does not set the headers correctly. In Claude Code > 2.1.1, it should be written as:

claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer YOUR_GITHUB_PAT"}}' --scope user

... where --scope user is optional.</issue_description>

<agent_instructions>Update the docs as requested in issue, with a version note which we can remove at a later date. The latest version should be the main version, and the old version should be mentioned at end of document with a link to the section in the markdown, for older versions or something, and should the --scope arg should be documented too Use the --scope flag to specify where the configuration is stored: local (default): Available only to you in the current project (was called project in older versions) project: Shared with everyone in the project via .mcp.json file user: Available to you across all projects (was called global in older versions)
</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

….1.1+

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
Copilot AI changed the title [WIP] Update Claude Code installation command documentation Update Claude Code installation command for v2.1.1+ add-json format Jan 8, 2026
Copilot AI requested a review from SamMorrowDrums January 8, 2026 14:32
@SamMorrowDrums SamMorrowDrums marked this pull request as ready for review January 8, 2026 21:21
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner January 8, 2026 21:21
Copilot AI review requested due to automatic review settings January 8, 2026 21:21
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Claude Code installation documentation to use the new add-json command format required in Claude Code v2.1.1+, replacing the deprecated --transport http syntax that no longer sets headers correctly.

Key changes:

  • Updated Remote Server Setup commands to use claude mcp add-json with JSON configuration objects
  • Added inline --scope flag documentation explaining local/project/user options and legacy name mappings
  • Created a "For Older Versions" section preserving the legacy command format for v2.1.0 and earlier

Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
@SamMorrowDrums SamMorrowDrums merged commit c061804 into main Jan 8, 2026
15 checks passed
@SamMorrowDrums SamMorrowDrums deleted the copilot/update-claude-code-installation-command branch January 8, 2026 21:34
@jm809 jm809 mentioned this pull request Jan 8, 2026
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.

Claude Code Github MCP installation command

2 participants