[BUG] MCP header not added in ~/.claude.json

Resolved 💬 4 comments Opened Jan 9, 2026 by RobCharlet Closed Feb 23, 2026

Preflight Checklist

  • [x] I have searched existing issues and this hasn't been reported yet
  • [x] This is a single bug report (please file separate reports for different bugs)
  • [x] I am using the latest version of Claude Code

What's Wrong?

When i execute a command "claude mcp add --transport http github https://api.githubcopilot.com/mcp --header "Authorization: Bearer github_pat..." the header config is not added in the claude config:

"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp"
}

What Should Happen?

claude mcp add should create:

"github": {
"type": "http",
"url": "https://api.githubcopilot.com/mcp",
"headers": {
"Authorization": "Bearer ghp_..."
}
}

Error Messages/Logs

1 MCP server failed

Steps to Reproduce

  1. Create a Github Personal Access Token
  2. execute the command "claude mcp add --transport http github https://api.githubcopilot.com/mcp --header "Authorization: Bearer github_pat..."
  3. Check the ~/.claude.json config file in the current project

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.2

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

iTerm2

Additional Information

_No response_

View original on GitHub ↗

This issue has 4 comments on GitHub. Read the full discussion on GitHub ↗