github-fetcher
v0.7.1Read-only GitHub MCP server for AI agents, built for unreliable networks (especially mainland China): 44 tools, token reuse, proxy fallback, ETag cache…
These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.
github_rate_limit GitHub rate limit
Report the authenticated or anonymous GitHub API quota and reset times. Set resource to project a single bucket such as core or search. Call this first when a request is refused with 403 or 429. Returns {auth, resources keyed by bucket with {limit, remaining, reset, used}}; defaults to core and search; pass all: true for every bucket; adds authenticated_as and scopes when the identity opt-in is on.
| Parameter | Type | Description |
|---|---|---|
all | boolean | Return every quota bucket; the default projects core and search only |
resource | string | Limit the projection to one resource bucket, e.g. core or search |
github_repo GitHub repository
Read repository metadata: description, visibility, default branch, stars, forks, open issues, language, license, topics, and timestamps. open_issues includes pull requests. Returns {full_name, description, private, visibility, html_url, default_branch, stars, forks, open_issues, language, license, topics, has_issues, has_discussions, archived, pushed_at, created_at}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
github_tree GitHub tree
List files and directories in a repository at a ref, using the git trees API. Use recursive=true only when the full tree is needed; a glob containing / or ** implies recursion unless recursive is explicitly false. path_prefix filters entry paths by literal prefix and is applied with glob before max_entries. max_bytes (default 2 MiB, max 16 MiB) clips the raw response locally; local clipping, the entry cap, and GitHub truncation all set truncated while api_truncated stays upstream-only, and a clipped response's hint names max_bytes. summary_only drops entries and returned_entries and answers wi…
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
glob | string | Filter returned entries by glob pattern, e.g. **/dev-overlay/** or src/*.ts; filters the entry list only — use github_file_grep to search file contents |
max_bytes | integer | Maximum raw response bytes to keep, default 2 MiB, max 16 MiB; local clipping sets truncated with a max_bytes hint |
max_entries | integer | Maximum entries returned, 1-10000, default 1000 |
path | string | Subdirectory path inside the ref |
path_prefix | string | Filter returned entries by a literal path prefix, e.g. docs/ |
recursive | boolean | Return the complete tree recursively |
ref | string | Branch, tag, or commit; defaults to the repository default branch |
summary_only | boolean | Omit entries and return total_bytes plus top_dirs for the full tree instead; max_entries, path_prefix, and glob are ignored; use with recursive: true |
github_file GitHub file
Read one file at a ref. Returns UTF-8 text when possible, never binary bytes, and reports sha, size, and truncation. Returns {repo, path, ref, sha, size, encoding, content, binary, truncated, start_line, end_line, total_lines}.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path inside the repository |
repo * | string | Repository in owner/name form |
end_line | integer | Last line to return, inclusive; defaults to the file end |
fresh | boolean | Bypass the local cache |
max_bytes | integer | Per-call byte budget for the returned text; defaults to GITHUB_MCP_MAX_FILE_BYTES |
ref | string | Branch, tag, or commit; defaults to the repository default branch |
start_line | integer | First line to return, 1-based; defaults to 1 |
github_file_grep GitHub file grep
Search a single file's text with a regular expression and get line numbers with context. Cache-first: a warm cache costs zero upstream calls; a miss costs 1 core call. Use github_search_code for repo-wide or cross-repo search (30 requests/minute, GitHub index lag). Matching runs in a worker thread with a 2000 ms (default; GITHUB_MCP_GREP_TIMEOUT_MS) time budget; overruns degrade to matches_truncated instead of blocking the session. Returns {repo, path, ref, pattern, total_lines, matches, matches_truncated, meta}; an overrun returns no matches and carries hint instead.
| Parameter | Type | Description |
|---|---|---|
path * | string | File path inside the repository |
pattern * | string | Regular expression (JavaScript syntax) matched globally over the file text; matches report 1-based line and column |
repo * | string | Repository in owner/name form |
context_lines | integer | Context lines before and after each match; defaults to 2 |
fresh | boolean | Bypass the local cache |
max_matches | integer | Maximum number of matches to return; defaults to 50; matches_truncated reports more remained |
ref | string | Branch, tag, or commit; defaults to the repository default branch |
github_files GitHub file batch
Batch file read: fetches up to 10 paths per call from one repository concurrently, one core call per uncached path, zero for cache hits, and reports per-item success and failure so one missing or malformed path never rejects the call. Optional max_bytes (default: server maxFileBytes) clips each decoded text row and drives its truncated flag; binary rows stay untouched and total_lines counts the whole file before clipping. Returns {results[{path, ok, data{path, sha, size, encoding, content, binary, truncated, total_lines}} or {path, ok, error{code, message}}], elapsed_ms, meta}.
| Parameter | Type | Description |
|---|---|---|
paths * | array | File paths inside the repository; up to 10 per call |
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
max_bytes | integer | Per-call byte budget for decoded text; defaults to the server maxFileBytes and leaves binary rows untouched |
ref | string | Branch, tag, or commit; defaults to the repository default branch |
github_readme GitHub repository readme
Fetch a repository's README through GitHub's readme endpoint, which resolves the default naming variant (README.md, README.zh-CN.md, and friends); use github_file for a specific path. Costs 1 core call. Returns {repo, path, sha, size, encoding, content, binary, truncated}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
github_commits GitHub commits
List commits on a ref, optionally filtered by path, author, or date range. Returns short sha, message, author, and date; max_message_chars truncates each message. Returns {items[{sha, short_sha, message, author{name, email, login}, date, url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
author | string | GitHub login or email to filter by |
first | boolean | Serve the oldest page of the history instead of the newest; combine with path to hunt creation commits |
fresh | boolean | Bypass the local cache |
max_message_chars | integer | Truncate each commit message to this many UTF-8 bytes |
page | integer | Page number, starting at 1 |
path | string | Only commits touching this path |
per_page | integer | Items per page, 1-100, default 20 |
ref | string | Branch, tag, or commit; defaults to the repository default branch |
since | string | ISO 8601 lower bound |
until | string | ISO 8601 upper bound |
github_commit GitHub commit
Read one commit: message, author, additions/deletions, and the changed files with bounded patches. github_commits lists commits; this reads one in full. Costs 1 core call. Returns {repo, sha, author, date, message, additions, deletions, files, files_truncated, meta}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
ref | string | Commit sha, branch, or tag; defaults to the pinned ref when one exists, otherwise the repository default branch |
github_branches GitHub branches
List branches with their head sha and protection state. Returns {items[{name, sha, protected}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_labels GitHub labels
List repository labels with their name, color, and description. GitHub's labels endpoint does not supply issue counts, so open_issues_count and closed_issues_count stay null even with with_counts true; no extra call is made. Returns {repo, items[{name, color, description, open_issues_count, closed_issues_count}], page, per_page, has_more, next_page, meta}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 30 |
with_counts | boolean | GitHub's labels endpoint does not supply issue counts, so both counts stay null; no extra calls |
github_issue GitHub issue
Read one issue, or pull request, with labels and assignees. Set include_comments=true to fetch the latest comments in chronological order; comment_limit caps how many (default 20) and max_comment_chars truncates each body. Returns issue fields {number, title, state, author, labels, assignees, body, created_at, updated_at, closed_at, comments_count, html_url}; adds {comments[{author, body, created_at}], comments_truncated} when include_comments is true.
| Parameter | Type | Description |
|---|---|---|
number * | integer | Issue or pull request number |
repo * | string | Repository in owner/name form |
comment_limit | integer | Number of latest comments to include, default 20 |
fresh | boolean | Bypass the local cache |
include_comments | boolean | Include the latest comments |
max_comment_chars | integer | Truncate each comment body to this many UTF-8 bytes |
github_issues GitHub issues
List issues in a repository with state, label, sort, direction, and since filters. Defaults to issues only; set type to "all" to include pull requests or "pr" for pull requests alone. For aggregate counts over a time window, use github_repo_health instead of paging. Returns {items[{number, title, state, type, author, labels, created_at, updated_at, html_url, comments_count}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
direction | string | Sort direction: asc or desc |
fresh | boolean | Bypass the local cache |
labels | string | Comma-separated label names |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
since | string | Only issues updated at or after this ISO 8601 time (GitHub semantics) |
sort | string | Sort field: created, updated, or comments |
state | string | Issue state, default open |
type | string | Item kind, default issue |
github_pr GitHub pull request
Read one pull request with branches, stats, mergeability, and optional changed files. Set include_files=true to fetch up to 100 files with patches. Returns PR fields {number, title, state, draft, merged, author, base, head, body, additions, deletions, changed_files, mergeable, created_at, updated_at, merged_at, html_url}; adds {files[{filename, status, additions, deletions, changes, patch}], files_truncated} when include_files is true.
| Parameter | Type | Description |
|---|---|---|
number * | integer | Pull request number |
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
include_files | boolean | Include up to 100 changed files |
github_prs GitHub pull requests
List pull requests with state, base, head, sort, and direction filters. Returns {items[{number, title, state, draft, author, base, head, updated_at, html_url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
base | string | Base branch filter |
direction | string | Sort direction: asc or desc |
fresh | boolean | Bypass the local cache |
head | string | Head branch filter, owner:branch |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
sort | string | Sort field: created, updated, popularity, or long-running |
state | string | Pull request state, default open |
github_release GitHub release
Read the latest release or the release for a specific tag, including assets and download URLs. Returns {found, tag_name, name, body, prerelease, draft, published_at, html_url, assets[{name, size, download_count, digest, browser_download_url}]}; found is false when no release exists.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
tag | string | Release tag; omit for the latest release |
github_releases GitHub releases
List releases newest first with tag, name, prerelease/draft flags, and dates. Release note bodies are omitted to keep responses small; use github_release for a single release's notes. With include_prereleases=false the page is filtered client-side, so has_more reflects the unfiltered Link header. Returns {items[{tag_name, name, prerelease, draft, published_at, html_url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
include_prereleases | boolean | Include prerelease and draft releases, default true |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_search_repos GitHub repository search
Search repositories by GitHub search syntax. Supports stars, forks, help-wanted-issues, and updated sorting. public_only defaults to true; pass false to include private repositories the token can see. Returns {total_count, incomplete_results, filtered_count, items[{full_name, description, private, visibility, stars, forks, language, topics, license, updated_at, created_at, pushed_at, html_url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
query * | string | GitHub repository search syntax, like stars:>100 language:rust |
fresh | boolean | Bypass the local cache |
order | string | Sort order: asc or desc |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
public_only | boolean | Drop private repositories from the results; defaults to true, pass false to include private items the token can see |
sort | string | Sort field: stars, forks, help-wanted-issues, or updated |
github_search_code GitHub code search
Search code across GitHub. Requires a token; GitHub allows this endpoint only 10 requests/minute and caps results at 1000. The repo: and path: qualifiers are parsed from query and re-injected at the end. Returns {total_count, incomplete_results, items[{repo, path, sha, html_url, text_matches}], page, per_page, has_more, next_page}. GitHub's search index lags fresh pushes; recently changed symbols may be missing — cross-check with github_file_grep or github_file.
| Parameter | Type | Description |
|---|---|---|
query * | string | GitHub code search query |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_search_issues GitHub issue and pull request search
Search issues and pull requests with GitHub search syntax, such as is:issue, is:pr, state:open, or repo:owner/name; the repo:, path:, state:, and label: qualifiers are parsed from query. A repo: query reads the repository issues endpoint with total_count null and repo_scoped true, filtering pull requests into filtered_count; sort: reactions is unsupported on that path. Free text and other qualifiers are rejected for repo: queries. For per-repository aggregate counts, use github_repo_health. Returns {total_count, incomplete_results, items[{repo, number, title, state, type, author, created_at, u…
| Parameter | Type | Description |
|---|---|---|
query * | string | GitHub issue search query |
fresh | boolean | Bypass the local cache |
order | string | Sort order: asc or desc |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
sort | string | Sort field: comments, reactions, created, or updated |
github_search_users GitHub user search
Search GitHub users by query syntax — location, language, followers:>=N, repositories:>=N, fullname: qualifiers. Costs 1 search call; the search quota is 30 requests per minute. Returns {total_count, incomplete_results, items[{login, type, html_url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
query * | string | GitHub user search syntax, like location:china followers:>=10 repositories:>=8 |
fresh | boolean | Bypass the local cache |
order | string | Sort order: asc or desc |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
sort | string | Sort field: followers, repositories, or joined |
github_trending GitHub trending approximation
Compute a trending approximation from GitHub search, NOT GitHub's trending page: the rising lens lists repositories created inside the window above the star floor and the active lens lists repositories pushed inside the window, both sorted by stars. Star gains are not observable from search alone; every observation is snapshotted under the cache directory, and repeated calls with the same lens, language, and window gain stars_gained against the previous snapshot, so deltas accumulate across calls into real velocity. Costs 2 search calls against the 30 requests/minute search quota. Returns {win…
| Parameter | Type | Description |
|---|---|---|
fresh | boolean | Bypass the local cache |
language | string | Restrict both lenses to one language qualifier, like rust or typescript |
limit | integer | Rows per lens, 1-30, default 15 |
min_stars | integer | Star floor for both lenses (stars:>N), default 100 |
window | string | Lookback window for both lenses; daily is 1 day, weekly 7, monthly 30, default weekly |
github_workflows GitHub workflows
List GitHub Actions workflows in a repository, including disabled and legacy workflows. Returns {total_count, items[{id, name, path, state}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_workflow_runs GitHub workflow runs
List workflow runs for a repository or one workflow, optionally filtered by branch, status, and event. Returns {total_count, items[{id, name, workflow_id, run_number, event, status, conclusion, branch, sha, created_at, updated_at, html_url}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
branch | string | Branch filter |
event | string | Event filter, such as push or pull_request |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
status | string | Run status, conclusion, or both, as accepted by GitHub |
workflow_id | integer | Workflow id or numeric workflow file id |
github_workflow_run GitHub workflow run
Read one workflow run. Set include_jobs=true to fetch up to 100 jobs with their step statuses and conclusions. Returns run fields {id, name, workflow_id, run_number, event, status, conclusion, branch, sha, created_at, updated_at, html_url}; adds {jobs[{id, name, status, conclusion, started_at, completed_at, steps[{number, name, status, conclusion}]}], jobs_truncated} when include_jobs is true.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
run_id * | integer | Workflow run id |
fresh | boolean | Bypass the local cache |
include_jobs | boolean | Include up to 100 jobs and their steps |
github_api_get GitHub API GET
Escape hatch for read-only GitHub REST GET requests that the dedicated tools do not cover. Call github_capabilities first; this tool rejects unless ihaveto: true explicitly acknowledges that no dedicated tool covers the endpoint. The host is fixed to api.github.com; GraphQL and writes are not supported. Returns {status, content_type, body, truncated, pagination, meta?}.
| Parameter | Type | Description |
|---|---|---|
path * | string | Absolute API path, for example /repos/owner/name/readme |
fresh | boolean | Bypass the local cache |
ihaveto | boolean | Explicit acknowledgement that no dedicated tool covers this endpoint |
query | object | Query parameters; entries override pairs already present in path |
github_repo_health GitHub repository health
One-call repository snapshot: stars, true open issue and PR counts, has_issues/has_discussions, window opened/closed counts and per-label open counts (search-backed), and the latest release. Window terms: opened_total = issues created inside the window (any current state); opened_still_open = the subset still open; closed = issues closed inside the window (any creation date). Costs about 10 upstream calls, 9 of them search (within the 30 requests/minute search quota). open_issues here counts issues only; github_repo.open_issues includes pull requests. Returns {repo, window_days, generated_at,…
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
labels | array | Open-issue labels to count, default bug/regression/data-loss/reproduced |
window_days | integer | Analysis window in days, 1-365, default 30 |
github_capabilities GitHub capabilities
Task-grouped index of every tool in this server. Call this first when unsure which tool fits a job; costs nothing. Returns {total, groups[{group, tools[{name, summary, signature, input}]}]}.
| Parameter | Type | Description |
|---|---|---|
group | string | Restrict the index to one group, e.g. Search or Files; groups are listed in the output |
github_pin_ref GitHub pin ref
Pin a repository to a commit for the session: file, tree, grep, and batch reads without an explicit ref anchor to this sha, keeping line-number references internally consistent across a session. An anchored read echoes pinned_sha in its success envelope; an explicit ref suppresses it. The pin lives in server memory and is lost on restart. Costs 1 core call (2 for a default-branch pin; 0 when unpinning or passing a full sha). Returns {repo, ref, sha, pinned}; after an unpin the answer carries only repo and pinned (false).
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
ref | string | Branch, tag, or commit to pin; resolves to a full commit sha. Omit to unpin when unpin is true |
unpin | boolean | Remove this repository's pin |
github_compare_repos GitHub repository comparison
Throttled multi-repo breadth comparison: stars, open issue/PR counts, window closed count, and latest release for up to 20 repositories in one call. About 5 upstream calls per repo, roughly 10 repos/minute (search quota). Label-level detail lives in github_repo_health. Returns {window_days, repos[{repo, stars, has_issues, has_discussions, open_issues, open_prs, search_unavailable, window, latest_release} or {repo, error}], elapsed_ms}.
| Parameter | Type | Description |
|---|---|---|
repos * | array | Repositories in owner/name form |
fresh | boolean | Bypass the local cache |
window_days | integer | Analysis window in days, 1-365, default 30 |
github_user GitHub user profile
Read a GitHub user's profile: name, type, bio, company, location, blog, public repository count, and follower counts. Costs 1 core call. Returns {login, name, type, bio, company, location, blog, public_repos, followers, following, created_at, html_url}.
| Parameter | Type | Description |
|---|---|---|
user * | string | GitHub user login, like octocat (alphanumerics and hyphens) |
github_user_repos GitHub user repositories
List a user's public repositories with the house projection: visibility, fork status, stars, watchers, language, push time, creation time, and description; type defaults to owner. Forks are dropped by default (include_forks: true keeps them) and min_stars keeps repositories at or above the star floor. Every mode gathers up to 10 pages of 100 and applies both filters to the whole window before slicing, so a requested page is full; sort: created|updated|pushed|full_name keeps GitHub's upstream ordering while sort: stars ranks client-side and ignores order. has_more/next_page describe the filtere…
| Parameter | Type | Description |
|---|---|---|
user * | string | GitHub user login, like octocat (alphanumerics and hyphens) |
fresh | boolean | Bypass the local cache |
include_forks | boolean | Keep fork repositories in the results; defaults to false, pass true to include them |
min_stars | integer | Keep repositories with at least this many stars (client-side filter) |
order | string | Sort order: asc or desc (ignored with sort: stars) |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
sort | string | Sort field: created, updated, pushed, full_name, or stars (stars ranks client-side) |
type | string | Filter by relationship to the user: all, owner, public, private, or member |
github_user_starred GitHub user stars
List the repositories a user has starred with the time each star was given; the star+json media type supplies starred_at. Costs 1 core call. Returns {items[{repo, stars, language, starred_at, pushed_at}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
user * | string | GitHub user login, like octocat (alphanumerics and hyphens) |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_user_events GitHub user events
List a user's public events with the event type, repository, and time; private events are never included, only the public feed. A 422 from GitHub's 90-day/300-event cap becomes a hinted invalid_params error. Costs 1 core call. Returns {items[{type, repo, created_at}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
user * | string | GitHub user login, like octocat (alphanumerics and hyphens) |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_user_health GitHub user health
One-call user profile audit: original vs fork split, star totals, top repositories, language distribution, and 90-day push activity — the multi-call walk of a manual audit, compressed to 1. Costs 2-11 core calls, none search. top_repos, languages, and 90-day push activity exclude forks by default (include_forks: true keeps them); originals, forks, fork_share, and total_stars always count them. Returns {user, name, type, public_repos, originals, forks, fork_share, total_stars, top_repos[{full_name, stars, language, pushed_at}], languages, recent_pushes_90d, oldest_push_90d_gap_days, repos_tru…
| Parameter | Type | Description |
|---|---|---|
user * | string | GitHub user login, like octocat (alphanumerics and hyphens) |
fresh | boolean | Bypass the local cache |
include_forks | boolean | Include fork repositories in the top_repos, languages, and push-activity metrics; defaults to false, pass true to include them |
per_page | integer | Accepted for symmetry with the user tools; the metrics walk always reads 100 repositories per page (the gather's fixed page size) |
github_languages GitHub repository languages
Read a repository's language breakdown as bytes per language, sorted by bytes descending; byte counts come from GitHub's language statistics, so they measure code bytes rather than counting file extensions. Costs 1 core call. Returns {languages, total_bytes}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
github_contributors GitHub repository contributors
List a repository's contributors with login, account type, and contribution count; anonymous contributors are never included. Costs 1 core call. Returns {items[{login, type, contributions}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_stargazers GitHub repository stargazers
List a repository's stargazers with the time each star was given (star+json media type). Pages are ordered oldest-first by default, so paged calls build a star timeline; compute velocity client-side from starred_at deltas. Costs 1 core call. Returns {items[{login, starred_at}], page, per_page, has_more, next_page}.
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
page | integer | Page number, starting at 1 |
per_page | integer | Items per page, 1-100, default 20 |
github_repo_activity GitHub repository activity
Answer how alive a repository has been over a window, from core endpoints only: pulls opened/merged/closed (closed counts PRs closed without merging) with bot-authored opens and the median hours from opening to merge, issues opened and closed, the window's commit total, active contributors, and the release count. Pulls and issues walk newest-first until the window edge (10-page cap), releases cap at 3 pages; a *_truncated flag reports a walk the cap stopped, and stats GitHub is still computing report null commits/contributors with stats_unavailable. Costs 4-12 core calls, none search. Returns…
| Parameter | Type | Description |
|---|---|---|
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
window_days | integer | Analysis window in days, 1-365, default 30 |
github_repos GitHub repository batch
Batch repository lookup: fetches up to 20 repositories concurrently, one core call each, and reports per-item success and failure so one missing or inaccessible repo never rejects the call. Returns {results[{repo, ok, data{full_name, description, private, visibility, fork, stars, forks, language, pushed_at, default_branch}} or {repo, ok, error{code, message}}], elapsed_ms}.
| Parameter | Type | Description |
|---|---|---|
repos * | array | Repositories in owner/name form |
fresh | boolean | Bypass the local cache |
github_compare_refs GitHub ref comparison
Compares two refs in one repository, one core call: ahead/behind counts, total commits, and the first 100 changed files with each patch capped at 4000 characters; total_files reports the full diff size and each file's patch_truncated marks a real cut. Unknown refs surface the standard 404 error. Returns {status, ahead_by, behind_by, total_commits, total_files, files[{filename, status, additions, deletions, patch, patch_truncated}], files_truncated?}.
| Parameter | Type | Description |
|---|---|---|
base * | string | Base ref (branch, tag or sha) |
head * | string | Head ref (branch, tag or sha) |
repo * | string | Repository in owner/name form |
fresh | boolean | Bypass the local cache |
github_doctor GitHub health check
One-screen health check of this server's own wiring: token presence, opt-in identity, proxy mode with reachability derived from the doctor's own API probe, local cache state, current quota, and pinned_repos listing this session's pinned repositories. Costs 1 core call, or 2 with opt-in identity. Returns {token{present}, identity?{authenticated_as, scopes}, proxy{mode, url, reachable}, cache{mode, dir, entries, bytes}, quota{core{limit, remaining, reset}, search{limit, remaining, reset}}, pinned_repos, meta{cache}}.
github_release_diff GitHub release diff
Compares two refs in one repository for a release diff, one core call: ahead/behind counts, total commits from ahead_by, up to 100 changed files with patches capped at 4000 bytes, and an optional projected commit list (include_commits defaults to true). total_files reports the full diff size; commits_truncated and files_truncated mark real cuts; each ref is URI-escaped. Returns {repo, from, to, status, ahead_by, behind_by, total_commits, commits, commits_truncated, total_files, files, files_truncated, meta}.
| Parameter | Type | Description |
|---|---|---|
from * | string | Base ref (branch, tag or sha) at the comparison start |
repo * | string | Repository in owner/name form |
to * | string | Head ref (branch, tag or sha) at the comparison end |
fresh | boolean | Bypass the local cache |
include_commits | boolean | Include the projected commit list, default true; false omits commits but keeps commits_truncated |
github_batch_activity GitHub batch activity snapshot
Windowed activity snapshot for up to 5 repositories in one call: stars, forks, open issues/PRs, recent commits, CI run conclusions, and top contributors with their share. Uses core endpoints only; search quota untouched. Each repository's four to seven core GETs run sequentially under a 25-second per-repo timeout: a timed-out repository reports ok:false while the others stay ok:true, and the abandoned request's result is discarded. Contributor gathering stops after 3 pages of 100. Returns {window_days, top_n, generated_at, items[repo item or error item], meta}.
| Parameter | Type | Description |
|---|---|---|
repos * | array | Repositories in owner/name form, at most 5 |
fresh | boolean | Bypass the local cache |
top_n | integer | Top contributors to project, 1-20, default 5 |
window_days | integer | Analysis window in days, 1-90, default 30 |