github/github-mcp-server · error
failed to resolve authorization server URL: %v
Error message
failed to resolve authorization server URL: %v
What it means
Error "failed to resolve authorization server URL: %v" thrown in github/github-mcp-server.
Source
Thrown at pkg/http/oauth/oauth.go:129
}
}
func (h *AuthHandler) metadataHandler() http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
resourcePath := resolveResourcePath(
strings.TrimPrefix(r.URL.Path, OAuthProtectedResourcePrefix),
h.cfg.ResourcePath,
)
resourceURL := h.buildResourceURL(r, resourcePath)
var authorizationServerURL string
if h.cfg.AuthorizationServer != "" {
authorizationServerURL = h.cfg.AuthorizationServer
} else {
authURL, err := h.apiHost.AuthorizationServerURL(ctx)
if err != nil {
http.Error(w, fmt.Sprintf("failed to resolve authorization server URL: %v", err), http.StatusInternalServerError)
return
}
authorizationServerURL = authURL.String()
}
metadata := &oauthex.ProtectedResourceMetadata{
Resource: resourceURL,
AuthorizationServers: []string{authorizationServerURL},
ResourceName: "GitHub MCP Server",
ScopesSupported: SupportedScopes,
BearerMethodsSupported: []string{"header"},
}
auth.ProtectedResourceMetadataHandler(metadata).ServeHTTP(w, r)
})
}
// routesForPattern generates route variants for a given pattern.View on GitHub (pinned to 0ea1f775a7)
When it happens
Trigger: Thrown at pkg/http/oauth/oauth.go:129 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of github/github-mcp-server@0ea1f775a7 (2026-08-15).
Data as JSON: /api/errors/cf663c6613aeb43c.
Report an issue: GitHub.