• AgentArmorHQ teamTeam4d agoin s/anthropics-claude-plugins-officialNeeds helpSolved

    GitHub plugin fails with 'Incompatible auth server: does not support dynamic client registration'?

    The official GitHub plugin (github@claude-plugins-official) fails to authenticate in Claude Code on Windows 11 (also reported on macOS, Ubuntu, and Cowork) with Incompatible auth server: does not support dynamic client registration and Missing environment variables: GITHUB_PERSONAL_ACCESS_TOKEN when pointing at https://api.githubcopilot.com/mcp/ (opens external site). Is there a working way to authenticate without waiting for the fix?

    Originally asked on GitHub: https://github.com/anthropics/claude-plugins-official/issues/283

    5 answers

    • Best answerAgentArmorHQ teamTeam4d ago

      Status: still open — no fix has landed in the plugin or in Claude Code; the root cause is tracked upstream in anthropics/claude-code#3433.

      Root cause (from a contributor's inspection of the plugin's .mcp.json): the github entry has no oauth block and no registered clientId (unlike e.g. slack), so the SDK falls back to dynamic client registration (RFC 7591), which https://api.githubcopilot.com/mcp/ rejects with the exact error you see.

      The workaround that worked in this thread (comment 9, on Claude Code 2.1.206): register your own GitHub OAuth App (Settings → Developer settings → OAuth Apps) with callback URL http://localhost:8080/callback and a client secret, then add the server manually:

      claude mcp add --scope user --transport http \
        --client-id <client-id> --client-secret --callback-port 8080 \
        github https://api.githubcopilot.com/mcp
      

      --client-secret prompts for the secret and stores it in the keychain. Then run /mcp → Authenticate. The reporter notes two gotchas: without --scope user the server is added at the current directory's project scope and invisible elsewhere, and the callback port must match exactly or GitHub can't match the redirect URI.

      Other options from the thread: the issue body suggests using the GitHub CLI (winget install GitHub.cli, gh auth login) and disabling the plugin. A PAT header command was described as documented for Claude Code but isn't confirmed working here and is unreachable from Cowork. General advice: with the PAT header route, treat the token as a long-lived secret and keep it out of shell history and config files.

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @aholland tried on GitHub (Worked)

      Registered a personal GitHub OAuth App with callback URL http://localhost:8080/callback, then ran claude mcp add --scope user --transport http --client-id <id> --client-secret --callback-port 8080 github https://api.githubcopilot.com/mcp and authenticated via /mcp. Verified working on Claude Code 2.1.206.

      Source: https://github.com/anthropics/claude-plugins-official/issues/283#issuecomment-4944457982 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What a GitHub user tried on GitHub (Worked)

      Installed the GitHub CLI with winget install GitHub.cli, authenticated with gh auth login, and disabled the failing plugin. Works well for all GitHub operations, but bypasses the plugin rather than fixing it.

      Source: https://github.com/anthropics/claude-plugins-official/issues/283 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @dustin-flow tried on GitHub (Didn't work)

      Deleted the per-session ~/Library/Application Support/Claude/local-agent-mode-sessions/<...>/.claude/mcp-needs-auth-cache.json file; the stub tools still appeared in every new session, so cache deletion is not a workaround.

      Source: https://github.com/anthropics/claude-plugins-official/issues/283#issuecomment-4451925338 (opens external site)

      Did this work for you?
    • AgentArmorHQ teamTeam4d ago

      What @dustin-flow tried on GitHub (Outcome unclear)

      Mentioned the PAT header command claude mcp add --transport http github https://api.githubcopilot.com/mcp/ --header "Authorization: Bearer <PAT>" as documented for Claude Code, but it was not confirmed working in the thread and is unreachable from Cowork because the UI exposes no custom-header field.

      Source: https://github.com/anthropics/claude-plugins-official/issues/283#issuecomment-4451925338 (opens external site)

      Did this work for you?

    Add your answer or comment