github/github-mcp-server · error
failed to get GitHub GraphQL client: %w
Error message
failed to get GitHub GraphQL client: %w
What it means
Error "failed to get GitHub GraphQL client: %w" thrown in github/github-mcp-server.
Source
Thrown at pkg/github/repositories.go:2579
}
if _, hasPerPage := args["perPage"]; hasPerPage {
perPage, err := OptionalIntParam(args, "perPage")
if err != nil {
return utils.NewToolResultError(err.Error()), nil, nil
}
if perPage < 1 || perPage > 100 {
return utils.NewToolResultError("perPage must be between 1 and 100 when provided"), nil, nil
}
pagination.PerPage = perPage
}
afterOffset, err := decodeBlameCursor(pagination.After)
if err != nil {
return utils.NewToolResultError(err.Error()), nil, nil
}
client, err := deps.GetGQLClient(ctx)
if err != nil {
return nil, nil, fmt.Errorf("failed to get GitHub GraphQL client: %w", err)
}
// Default to HEAD and fetch defaultBranchRef.name in the same query
// so the response can echo a readable ref.
refExpression := ref
if refExpression == "" {
refExpression = "HEAD"
}
var blameQuery struct {
Repository struct {
DefaultBranchRef struct {
Name githubv4.String
}
Object struct {
Typename githubv4.String `graphql:"__typename"`
Commit blameCommitFragment `graphql:"... on Commit"`
// Annotated tag targets are followed one level. Tag-of-tagView on GitHub (pinned to 0ea1f775a7)
When it happens
Trigger: Thrown at pkg/github/repositories.go:2579 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/6e5cc2409a4cbd45.
Report an issue: GitHub.