github/github-mcp-server · error
failed to marshal starred repositories: %w
Error message
failed to marshal starred repositories: %w
What it means
Error "failed to marshal starred repositories: %w" thrown in github/github-mcp-server.
Source
Thrown at pkg/github/repositories.go:2196
Stars: repo.GetStargazersCount(),
Forks: repo.GetForksCount(),
OpenIssues: repo.GetOpenIssuesCount(),
Private: repo.GetPrivate(),
Fork: repo.GetFork(),
Archived: repo.GetArchived(),
DefaultBranch: repo.GetDefaultBranch(),
}
if repo.UpdatedAt != nil {
minimalRepo.UpdatedAt = repo.UpdatedAt.Format("2006-01-02T15:04:05Z")
}
minimalRepos = append(minimalRepos, minimalRepo)
}
r, err := json.Marshal(minimalRepos)
if err != nil {
return nil, nil, fmt.Errorf("failed to marshal starred repositories: %w", err)
}
result := utils.NewToolResultText(string(r))
// A starred-repository listing exposes repository data across many
// repos; reuse the multi-repo join shared with search_repositories
// (public-only results stay public-untrusted, mixed-visibility
// results become private-untrusted, all-private results become
// private-trusted). Visibility is read directly from the response,
// so no extra API call is needed.
visibilities := make([]bool, 0, len(minimalRepos))
for _, mr := range minimalRepos {
visibilities = append(visibilities, mr.Private)
}
result = attachJoinedIFCLabel(ctx, deps, result, visibilities, ifc.LabelSearchIssues)
return result, nil, nil
},
)
}View on GitHub (pinned to 0ea1f775a7)
When it happens
Trigger: Thrown at pkg/github/repositories.go:2196 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/243bf19a93dacda2.
Report an issue: GitHub.