[BUG] plugin:github:github MCP fails with HTTP 400 — malformed JSON-RPC payload missing version tag

Open 💬 18 comments Opened Jun 2, 2026 by BelalNayzak

Preflight Checklist

  • [ ] 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?

Bug Description

The GitHub MCP plugin (plugin:github:github) fails to connect with HTTP 400 from https://api.githubcopilot.com/mcp/.

Environment

  • Claude Code version: 2.1.150
  • OS: macOS
  • Auth: gh CLI with copilot, gist, read:org, repo, workflow scopes

Error

Failed to reconnect to plugin:github:github: HTTP 400 at https://api.githubcopilot.com/mcp/

Root Cause (diagnosed)

Manually curling the endpoint with an empty payload returns:

malformed payload: invalid message version tag ""; expected "2.0"

The plugin appears to be sending a request without the required "jsonrpc": "2.0" field.
A correct JSON-RPC 2.0 initialize request to the same endpoint returns HTTP 200 successfully,
confirming the endpoint and account are fine — the bug is in the plugin's request construction.

Steps to Reproduce

  1. Enable GitHub MCP plugin in Claude Code settings
  2. Authenticate with gh auth login --scopes copilot,gist,read:org,repo,workflow
  3. Run /mcp — plugin fails with HTTP 400

What Should Happen?

The plugin appears to be sending a request without the required "jsonrpc": "2.0" field.
A correct JSON-RPC 2.0 initialize request to the same endpoint returns HTTP 200 successfully,
confirming the endpoint and account are fine — the bug is in the plugin's request construction.

Error Messages/Logs

Failed to reconnect to plugin:github:github: HTTP 400 at https://api.githubcopilot.com/mcp/

Steps to Reproduce

  1. Enable GitHub MCP plugin in Claude Code settings
  2. Authenticate with gh auth login --scopes copilot,gist,read:org,repo,workflow
  3. Run /mcp — plugin fails with HTTP 400

Claude Model

None

Is this a regression?

Yes, this worked in a previous version

Last Working Version

_No response_

Claude Code Version

2.1.150

Platform

Anthropic API

Operating System

macOS

Terminal/Shell

Terminal.app (macOS)

Additional Information

_No response_

View original on GitHub ↗

18 Comments

kpkrr · 1 month ago

up pls

brunotiyoda · 1 month ago

up

aaronjhall-tech · 1 month ago

up

samuelpatro · 1 month ago

did you solved it?

whyvrafvr · 1 month ago

Up

MollTonNRW · 25 days ago

up

vcscroll · 19 days ago

up

HendrikKoelbel · 18 days ago

up

1stvamp · 16 days ago

up

1stvamp · 16 days ago

also happens on linux

bertinma · 15 days ago

up

swaowf · 14 days ago

up

TizianoCoroneo · 10 days ago

@claude fix this, open a PR referencing this issue, review it, merge it, and tag a new release. Top priority, no mistakes

ph7jack · 9 days ago

I was able to fix my GitHub MCP by adding GITHUB_PERSONAL_ACCESS_TOKEN on my Claude global config

edit ~/.claude/settings.json

{
   "env": {
      "GITHUB_PERSONAL_ACCESS_TOKEN": "token"
   }
}

It can also be fixed by adding EXPORT GITHUB_PERSONAL_ACCESS_TOKEN=token in your shell profile, like ~/.zshrc

tomasf10 · 7 days ago
I was able to fix my GitHub MCP by adding GITHUB_PERSONAL_ACCESS_TOKEN on my Claude global config edit ~/.claude/settings.json { "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "token" } } It can also be fixed by adding EXPORT GITHUB_PERSONAL_ACCESS_TOKEN=token in your shell profile, like ~/.zshrc

I can confirm it works.

For some reason this doesn't

fnur32 · 3 days ago
I was able to fix my GitHub MCP by adding GITHUB_PERSONAL_ACCESS_TOKEN on my Claude global config edit ~/.claude/settings.json { "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "token" } } It can also be fixed by adding EXPORT GITHUB_PERSONAL_ACCESS_TOKEN=token in your shell profile, like ~/.zshrc

i was try this, but still not work

Arkhamk · 3 days ago
I was able to fix my GitHub MCP by adding GITHUB_PERSONAL_ACCESS_TOKEN on my Claude global config edit ~/.claude/settings.json { "env": { "GITHUB_PERSONAL_ACCESS_TOKEN": "token" } } It can also be fixed by adding EXPORT GITHUB_PERSONAL_ACCESS_TOKEN=token in your shell profile, like ~/.zshrc

this works for me, thanks

gblikas · 2 days ago

Make sure to follow these instructions:

🔗 https://github.com/github/github-mcp-server/blob/main/docs/installation-guides/install-claude.md

From your terminal

⚠️ NOT in Claude Code CLI
export GITHUB_PAT=<YOUR_PAT_HERE>
claude mcp add-json github '{"type":"http","url":"https://api.githubcopilot.com/mcp","headers":{"Authorization":"Bearer $GITHUB_PAT"}}'

Troubleshooting

You may need to remove your local Github MCP configuration if was improperly configured before:

claude mcp list  #shows all servers availabe 
claude remove github