You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MCP gatekeeper: connect servers that don't support dynamic client registration (e.g. GitHub's hosted MCP server)
#882
I'd like to be able to connect arbitrary remote MCP servers through gatekeeper-mcp, but any server whose authorization server doesn't support dynamic client registration (DCR) can't be connected. I hit this with GitHub's hosted MCP server (api.githubcopilot.com/mcp). I'm aware there is a native GitHub gatekeeper. GitHub was just the server I happened to try, and the question is about MCP servers in general.
Is supporting pre-registered clients (or another non-DCR path) on the roadmap, and what shape would you prefer? I searched the issues, PRs and discussions and didn't find anything covering it.
What happens
Connecting the server fails with:
Incompatible auth server: does not support dynamic client registration
The log shows component: 'gatekeeper.mcp', event: 'connect.failed', and the connect POST returns 502.
Why, as far as I can tell
The error comes from the MCP client SDK's registerClient() (@modelcontextprotocol/client 2.2.0), which throws when the authorization server metadata has no registration_endpoint.
GitHub's authorization server metadata (https://github.com/.well-known/oauth-authorization-server/login/oauth) has no registration_endpoint and no client_id_metadata_document_supported, so a client can't register itself. It does offer authorization code with PKCE (S256), refresh tokens and the device flow.
On the Cloudflare OS side, the OAuth provider in packages/mcp-shared/src/account.ts registers dynamically as a public client (token_endpoint_auth_method: "none"), and clientInformation() only returns what an earlier registration saved. There is no way to supply a client ID and secret. The connect-flow section of the gatekeeper-mcp README says the options are to connect a server that supports registration, or to reach it through a portal with a preissued token.
The SDK resolves client information in this order: provider.clientInformation(), then a Client ID Metadata Document (clientMetadataUrl, when the server advertises support), then DCR. It also marks DCR as deprecated in favour of Client ID Metadata Documents. So the hooks for avoiding DCR already exist in the SDK; the connector just doesn't use them.
Other widely used servers look to be in the same position. Google's Drive MCP setup guide has you create a pre-registered OAuth client (ID and secret) and doesn't mention DCR, and Microsoft's Work IQ MCP uses Entra ID app registration with admin consent. Both are from their docs; I haven't connected either.
Possible directions
Admin-configured client credentials, keyed by authorization server issuer (or by MCP endpoint) and supplied through deployment config like the other gatekeepers' OAuth credentials, returned from clientInformation().
Client ID Metadata Documents: serve a metadata document from the Workshop's public URL and set clientMetadataUrl, for servers that advertise client_id_metadata_document_supported.
A per-user static token or header for servers that accept a bearer token (for example a personal access token) but don't offer OAuth to third-party clients.
Questions
Is this on the roadmap, or intentionally out of scope?
Which direction, if any, would you accept? I'm happy to prototype one, but the README asks for discussion before anything larger than a small change.
Are there constraints I should know about, for example where client secrets should live for the owner-only MCP accounts?
Environment: Cloudflare OS main at 835de9e8 (2026-10-23), run locally with pnpm run-local.
Related, but a different problem: #877 and #878 add a central OAuth broker for the native Google, GitHub, GitLab and Slack gatekeepers, and #48 discusses a Microsoft 365 gatekeeper.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
I'd like to be able to connect arbitrary remote MCP servers through
gatekeeper-mcp, but any server whose authorization server doesn't support dynamic client registration (DCR) can't be connected. I hit this with GitHub's hosted MCP server (api.githubcopilot.com/mcp). I'm aware there is a native GitHub gatekeeper. GitHub was just the server I happened to try, and the question is about MCP servers in general.Is supporting pre-registered clients (or another non-DCR path) on the roadmap, and what shape would you prefer? I searched the issues, PRs and discussions and didn't find anything covering it.
What happens
Connecting the server fails with:
The log shows
component: 'gatekeeper.mcp', event: 'connect.failed', and the connectPOSTreturns502.Why, as far as I can tell
registerClient()(@modelcontextprotocol/client2.2.0), which throws when the authorization server metadata has noregistration_endpoint.https://github.com/.well-known/oauth-authorization-server/login/oauth) has noregistration_endpointand noclient_id_metadata_document_supported, so a client can't register itself. It does offer authorization code with PKCE (S256), refresh tokens and the device flow.packages/mcp-shared/src/account.tsregisters dynamically as a public client (token_endpoint_auth_method: "none"), andclientInformation()only returns what an earlier registration saved. There is no way to supply a client ID and secret. The connect-flow section of the gatekeeper-mcp README says the options are to connect a server that supports registration, or to reach it through a portal with a preissued token.provider.clientInformation(), then a Client ID Metadata Document (clientMetadataUrl, when the server advertises support), then DCR. It also marks DCR as deprecated in favour of Client ID Metadata Documents. So the hooks for avoiding DCR already exist in the SDK; the connector just doesn't use them.Other widely used servers look to be in the same position. Google's Drive MCP setup guide has you create a pre-registered OAuth client (ID and secret) and doesn't mention DCR, and Microsoft's Work IQ MCP uses Entra ID app registration with admin consent. Both are from their docs; I haven't connected either.
Possible directions
clientInformation().clientMetadataUrl, for servers that advertiseclient_id_metadata_document_supported.Questions
Environment: Cloudflare OS
mainat835de9e8(2026-10-23), run locally withpnpm run-local.Related, but a different problem: #877 and #878 add a central OAuth broker for the native Google, GitHub, GitLab and Slack gatekeepers, and #48 discusses a Microsoft 365 gatekeeper.
All reactions