
github-twin
Indexes your personal GitHub commit history, code changes, and PR review comments into a local RAG system that Claude can query over MCP. Ships with find_commits, find_review_comments, and predict_review_outcome tools so the assistant can surface your past decisions when writing or reviewing new code. Runs fully local by default with Ollama embeddings and BM25+vector hybrid search over SQLite. Supports both single-user mode and org-wide indexing across all repositories. The summarize and distill commands can optionally call Claude, Gemini, or local Ollama to cluster your review patterns into reusable rules. Authentication works via OAuth device flow, existing gh CLI tokens, or a GITHUB_TOKEN environment variable.
- tools
- 7
- auth
- Secret needed
- transport
- STDIO
- env vars
- 4
- last updated
- May 29, 2026
Tools
7 toolsPublic tool metadata for what this MCP can expose to an agent.
find_review_commentsPast review comments on diffs similar to the input.
Past review comments on diffs similar to the input.
No parameter schema in public metadata yet.
find_style_examplesPast code chunks matching a description.
Past code chunks matching a description.
No parameter schema in public metadata yet.
find_codeSource snippets from files at HEAD (org mode).
Source snippets from files at HEAD (org mode).
No parameter schema in public metadata yet.
find_applicable_rulesDistilled code-pattern rules relevant to a coding task.
Distilled code-pattern rules relevant to a coding task.
No parameter schema in public metadata yet.
predict_review_outcomeWeighted prediction over nearest past PRs: {approved, changes_requested, commented}.
Weighted prediction over nearest past PRs: {approved, changes_requested, commented}.
No parameter schema in public metadata yet.
summarize_review_patternsDistilled rules from clustered review comments (run gt distill first).
Distilled rules from clustered review comments (run gt distill first).
No parameter schema in public metadata yet.
syncIncremental ingest + summarize + embed.
Incremental ingest + summarize + embed.
No parameter schema in public metadata yet.
Sponsors
Configuration
GITHUB_TOKENsecretGitHub personal access token. Optional: github-twin can also pick the token up from `gh auth token` or from its own OAuth device-flow login (`gt auth login`).
ANTHROPIC_API_KEYsecretOptional. Enables the Claude backend for `gt summarize`, `gt distill`, and `gt eval`. Defaults to local Ollama when unset.
GEMINI_API_KEYsecretOptional. Enables the Gemini backend for embedding and the LLM seam. Vertex AI ADC via `GT_GEMINI_PROJECT` is also supported.
GT_PATHS__DATA_DIROptional. Override the on-disk data directory holding the SQLite index, embeddings, and cached GitHub responses. Defaults to `$XDG_DATA_HOME/github-twin`.
Readme
github-twin
You reviewed a permission check six months ago. Claude doesn't remember it. github-twin does — it indexes your commits and review comments, and surfaces them as retrieval hits whenever an agent writes or reviews new code in your style.
gt stats + gt eval search returning hits against a real corpus
Claude Code citing a past review comment via the find_review_comments tool
Try it now from Claude Code — drop this into ~/.claude.json and reload:
Details
- Repository
- github.com/christopherdavenport/github-twin
- Categories
- AI & LLM Tools, Developer Tools
- Package
github-twin- Transport
- STDIO
- Auth
- Required
- Registry
- MCP registry, active