Is github mcp serve with oauth supposed to be working? #3635

Open
opened 2026-02-16 17:40:57 -05:00 by yindo · 2 comments
Owner

Originally created by @sheldonhull on GitHub (Dec 17, 2025).

Originally assigned to: @rekram1-node on GitHub.

Question

I have tried to get it to work but no luck with it showing up as a oauth based mcp server.

Tried this:

    "github": {
      "type": "remote",
      "url": "https://api.githubcopilot.com/mcp/",
      "headers": {
        "X-MCP-Toolsets": "repos,issues",
        "X-MCP-Readonly": "true"
      },
      "timeout": 15000
    }

Am I doing something wrong here?

$ opencode mcp list

●  ✗ github failed
│      Dynamic client registration failed: HTTP 422
│      https://api.githubcopilot.com/mcp/

$ opencode mcp auth github
▲  No OAuth-enabled MCP servers configured
Originally created by @sheldonhull on GitHub (Dec 17, 2025). Originally assigned to: @rekram1-node on GitHub. ### Question I have tried to get it to work but no luck with it showing up as a oauth based mcp server. Tried this: ```json "github": { "type": "remote", "url": "https://api.githubcopilot.com/mcp/", "headers": { "X-MCP-Toolsets": "repos,issues", "X-MCP-Readonly": "true" }, "timeout": 15000 } ``` Am I doing something wrong here? ```console $ opencode mcp list ● ✗ github failed │ Dynamic client registration failed: HTTP 422 │ https://api.githubcopilot.com/mcp/ $ opencode mcp auth github ▲ No OAuth-enabled MCP servers configured ```
Author
Owner

@github-actions[bot] commented on GitHub (Dec 17, 2025):

This issue might be a duplicate of existing issues. Please check:

  • #5444: MCP with oauth doesn't work - User experiencing similar issue where OAuth-enabled MCP servers are not being recognized, with the same "No OAuth-enabled MCP servers configured" error message when trying to authenticate.

Feel free to ignore if none of these address your specific case.

@github-actions[bot] commented on GitHub (Dec 17, 2025): This issue might be a duplicate of existing issues. Please check: - #5444: MCP with oauth doesn't work - User experiencing similar issue where OAuth-enabled MCP servers are not being recognized, with the same "No OAuth-enabled MCP servers configured" error message when trying to authenticate. Feel free to ignore if none of these address your specific case.
Author
Owner

@christso commented on GitHub (Dec 27, 2025):

You're just missing the Authorization header. Add a Personal Access Token (fine-grained or classic):

"github": {
  "type": "remote",
  "url": "https://api.githubcopilot.com/mcp/",
  "headers": {
    "Authorization": "Bearer ghp_your_token_here",
    "X-MCP-Toolsets": "repos,issues",
    "X-MCP-Readonly": "true"
  }
}

The HTTP 422 error is because GitHub doesn't support Dynamic Client Registration. Once PR #5940 is merged, you'll be able to use OAuth by configuring your own clientId/clientSecret - which is the recommended approach.

@christso commented on GitHub (Dec 27, 2025): You're just missing the `Authorization` header. Add a Personal Access Token ([fine-grained](https://github.com/settings/personal-access-tokens) or [classic](https://github.com/settings/tokens)): ```json "github": { "type": "remote", "url": "https://api.githubcopilot.com/mcp/", "headers": { "Authorization": "Bearer ghp_your_token_here", "X-MCP-Toolsets": "repos,issues", "X-MCP-Readonly": "true" } } ``` The HTTP 422 error is because GitHub doesn't support Dynamic Client Registration. Once PR #5940 is merged, you'll be able to use OAuth by configuring your own `clientId`/`clientSecret` - which is the recommended approach.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#3635