Remote GitHub MCP server fails in Claude: 'error connecting to GitHub server'
Why does connecting the remote GitHub MCP server at https://api.githubcopilot.com/mcp/ (opens external site) from the Claude integrations page fail with "There was an error connecting to GitHub server. Please check your server URL and make sure your server handles auth correctly."? Claude also strips the trailing slash from the URL I enter. The same failure occurs in Claude Code, so what is the supported way to connect the remote GitHub MCP server?
Originally asked on GitHub: https://github.com/github/github-mcp-server/issues/549
5 answers
The thread explains the root cause rather than a patch: the remote GitHub MCP server at https://api.githubcopilot.com/mcp/ (opens external site) does not implement OAuth 2.0 Dynamic Client Registration (RFC 7591), which Claude's MCP clients rely on during the OAuth handshake. A commenter added the same server to Claude Code and got a clearer error ("Dynamic client registration failing"), and the gemini-cli maintainers independently reached the same conclusion. A contributor also stated that Claude Web (chat.claude.ai) does not support connecting to MCP servers at all yet, so the settings-page integration cannot succeed regardless of the auth flow.
Per the GitHub MCP server host-integration docs cited in the thread, the supported way to use the remote server with Claude Code today is a personal access token (PAT) instead of OAuth; OAuth works only on MCP hosts that do not require dynamic client registration. The thread does not include a confirmed success report of the PAT flow.
What does not help: entering the URL with a trailing slash (Claude normalizes it away) or appending a placeholder query string such as https://api.githubcopilot.com/mcp/?placeholder= (opens external site) — the connection still fails.
General advice: if you operate a remote MCP server and want Claude Code or Claude Desktop to connect via OAuth, implement dynamic client registration; the MCP authorization spec lists it as a SHOULD rather than a MUST. When using a PAT with Claude Code, scope it to the repositories you need and avoid putting it in shared config files or logs.
Did this work for you?What @mculp tried on GitHub (Outcome unclear)
A commenter cited the GitHub MCP server host-integration docs, which state that dynamic client registration is not supported at the moment, and recommended using a personal access token (PAT) with Claude Code instead. The thread does not report a follow-up confirming that this succeeded.
Source: https://github.com/github/github-mcp-server/issues/549#issuecomment-3013969822 (opens external site)
Did this work for you?What @kamal tried on GitHub (Didn't work)
A commenter added the remote server to Claude Code and received a clearer error saying dynamic client registration was failing. The connection still did not work.
Source: https://github.com/github/github-mcp-server/issues/549#issuecomment-2985753205 (opens external site)
Did this work for you?What a GitHub user tried on GitHub (Didn't work)
Added a GitHub integration in Claude Web with the URL https://api.githubcopilot.com/mcp/ (opens external site) including the trailing slash. Claude normalized it to https://api.githubcopilot.com/mcp (opens external site), and clicking Connect returned "There was an error connecting to GitHub server...".
Source: https://github.com/github/github-mcp-server/issues/549 (opens external site)
Did this work for you?What @gfreitash tried on GitHub (Didn't work)
Tried https://api.githubcopilot.com/mcp/?placeholder= (opens external site) so Claude could not remove the trailing slash. The connection still failed.
Source: https://github.com/github/github-mcp-server/issues/549#issuecomment-2996351923 (opens external site)
Did this work for you?
Related questions
- Is there a remote GitHub MCP server I can use without Docker or a local build?
- Does github-mcp-server support GitHub Actions workflows and logs?
- How can the GitHub MCP server access a repository's wiki?
- GitHub remote MCP server fails with PAT: HTTP 404 or 400 in Claude Code and Cursor?
- Private org repos fail with 404 or Bad credentials in GitHub MCP Server even with PAT: how to fix?