christopherdavenport avatar

github-twin

christopherdavenport/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 tools

Public 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_TOKENsecret

GitHub 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_KEYsecret

Optional. Enables the Claude backend for `gt summarize`, `gt distill`, and `gt eval`. Defaults to local Ollama when unset.

GEMINI_API_KEYsecret

Optional. Enables the Gemini backend for embedding and the LLM seam. Vertex AI ADC via `GT_GEMINI_PROJECT` is also supported.

GT_PATHS__DATA_DIR

Optional. 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

PyPI version Python versions CI License: MIT

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:


View the full README on GitHub

Details

Repository
github.com/christopherdavenport/github-twin
Categories
AI & LLM Tools, Developer Tools
Package
github-twin
Transport
STDIO
Auth
Required
Registry
MCP registry, active

Related AI & LLM Tools MCP servers

View all
1clauxel avatarAgentdataboundary Mcpclauxel/agent-data-boundary-mcpPermission boundary receipts for ChatGPT agents.0stars
2clauxel avatarAgentmonitorrelay Mcpclauxel/agent-monitor-relay-mcpAI agent run monitoring with incident replay and SLA receipts.0stars
3clauxel avatarAgentskillupdategate Mcpclauxel/agent-skill-update-gate-mcpPaid remote MCP for Claude Code skill update gate MCP, structured receipts, audit logs, and reviewer0stars
4clauxel avatarAgenticbudgetrouter Mcpclauxel/agentic-budget-router-mcpAgentic workflow budget approvals with usage receipts.0stars
5clauxel avatarAgentichtmlexportqa Mcpclauxel/agentic-html-export-qa-mcpPaid remote MCP for agentic HTML export QA MCP, structured receipts, audit logs, and reviewer-ready0stars
6clauxel avatarCopilotcliswitchgate Mcpclauxel/copilot-cli-switch-gate-mcpRemote MCP for Copilot CLI switch gate MCP, structured receipts, audit logs, and reviewer-ready evid0stars