gitquery-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| LOG_LEVEL | No | Stderr logging verbosity (debug, info, warn, error). | info |
| CACHE_SIZE | No | In-memory LRU cache maximum entry count. | 5000 |
| GITHUB_TOKEN | No | GitHub Personal Access Token (classic or fine-grained). | |
| ALLOWED_REPOS | No | Comma-separated list of allowed repos (owner/repo or owner/*). | |
| GITQUERY_CACHE_DIR | No | Directory path for optional persistent on-disk cache. | |
| GITQUERY_CACHE_MAX_BYTES | No | Disk cache capacity ceiling in bytes (default: 200 MB). | 209715200 |
| CACHE_TTL_MUTABLE_SECONDS | No | In-memory TTL for mutable branch/tag ref resolutions. | 30 |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| resolve_refA | Resolves a git reference (branch name, tag, or partial SHA) to a full 40-character commit SHA. Use before queries when you need the canonical immutable commit identifier. Returns {sha, refType}. Fast and cached. |
| get_blameA | Returns line-by-line git blame annotations for a file at a commit or ref. Use to identify who changed specific lines, when, in which commit, and via which PR. Returns ranges of lines with commit, author, and PR metadata. Use start_line and end_line to slice. |
| get_path_historyA | Lists commits modifying a specific file or directory up to a ref. Use to trace when a path was touched or refactored. Returns commit SHA, author, date, and headline. Capped at 100 commits (default 20). Narrow with since, until, or limit. |
| find_merge_baseA | Finds the common ancestor commit (merge base) between two git refs and reports ahead/behind commit counts. Use to check branch divergence before merging or comparing histories. Returns mergeBaseSha, aheadBy, behindBy, and status. |
| is_ancestorA | Determines whether commit 'ancestor' is an ancestor of commit 'descendant'. Use to verify whether a fix or feature branch is already contained within another branch without cloning. Returns a boolean and explanation. |
| find_pr_for_commitA | Finds merged pull requests associated with a commit SHA. Use to discover original PR discussions, reviews, and context for an existing commit. Returns PR number, title, URL, merged date, and author. |
| list_changed_filesA | Lists all files modified, added, or deleted between two git refs with change statistics. Use to survey changes across commits or branches. Capped at 500 files; narrow with path_prefix. |
| get_diffA | Returns the unified git diff between two refs, optionally restricted to specific file paths. Use to inspect code changes without cloning. Output is truncated at max_bytes (default 60KB; narrow with paths). |
| get_file_at_refA | Retrieves file content at a specific ref or commit, with optional line slicing. Use to inspect historical code without cloning. Rejects binary files and files exceeding 1 MB. Narrow with start_line and end_line. |
| cache_statsA | Returns in-memory cache metrics including total cache hits, misses, current entry count, and hit rate percentage. Use to inspect caching performance and verify cache hits. |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 10 tools
Each tool targets a distinct Git query operation: ref resolution, ancestry, blame, path history, PR lookup, changed files, diff, file content, merge base, and cache stats. Overlaps are only superficial (e.g., ancestry vs merge base, diff vs changed files), and descriptions make boundaries clear.
Most names follow a predictable verb_noun pattern (find_merge_base, resolve_ref, get_blame, get_path_history, list_changed_files, get_diff, get_file_at_ref). Minor deviations are predicate/noun forms like is_ancestor and cache_stats, but the set remains readable and coherent.
Ten tools is well-scoped for a read-only Git query server. Each tool earns its place by covering a distinct query need, with no obvious redundancy or bloat.
The surface covers core query operations: ref resolution, history, blame, diffs, changed files, file content, PR association, ancestry, and merge bases. Minor gaps include listing available branches/tags/remotes or richer commit metadata, but agents can often work around these with resolve_ref and path history.