原型 · 预览版:收录官方注册中心里的全部服务器,每 30 分钟同步一次。评价和账户功能将在后续阶段推出。
PopNx MCP为使用 AI 的人准备的 MCP 服务器 · 用大白话讲清楚

github-twin

作者:ChristopherDavenport版本 0.0.17i★ –i在你的电脑上运行
注册名称io.github.ChristopherDavenport/github-twin

安装

概览

作者提供的说明(英文原文)

Personal RAG over your GitHub history (commits, code, reviews), served to Claude Code over MCP.

PopNx MCP 的三大支柱

这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。

它能帮你做什么

我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。

  • 连接方式: 在你的电脑上运行
  • 传输方式: stdio
  • 分类: 开发者工具
  • 你需要填写:GITHUB_TOKEN, ANTHROPIC_API_KEY, GEMINI_API_KEY

安装

选择你使用的 AI 应用,然后复制设置。

安装之前

  • 基础检查:1 项中通过 1 项
  • 在你的电脑上运行,拥有你的用户账户的权限(文件、网络、应用)。
  • 需要你自己填写: GITHUB_TOKEN, ANTHROPIC_API_KEY, GEMINI_API_KEY, GT_PATHS__DATA_DIR

标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。

你需要

  • PyPI已安装 Python 的 uv(用于 uvx 命令)

你用的是哪个应用?

在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。

打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json

{
  "mcpServers": {
    "github-twin": {
      "command": "uvx",
      "args": [
        "github-twin"
      ],
      "env": {
        "GITHUB_TOKEN": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "GEMINI_API_KEY": "your-value",
        "GT_PATHS__DATA_DIR": "your-value"
      }
    }
  }
}

在终端中运行这条命令

claude mcp add github-twin --env GITHUB_TOKEN=your-value --env ANTHROPIC_API_KEY=your-value --env GEMINI_API_KEY=your-value --env GT_PATHS__DATA_DIR=your-value -- uvx github-twin

运行前请先填写空着的值。

在 Cursor 中打开

或者自己复制设置

粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json

{
  "mcpServers": {
    "github-twin": {
      "command": "uvx",
      "args": [
        "github-twin"
      ],
      "env": {
        "GITHUB_TOKEN": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "GEMINI_API_KEY": "your-value",
        "GT_PATHS__DATA_DIR": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

在 VS Code 中打开

或者自己复制设置

粘贴到项目中的 .vscode/mcp.json

{
  "servers": {
    "github-twin": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "github-twin"
      ],
      "env": {
        "GITHUB_TOKEN": "your-value",
        "ANTHROPIC_API_KEY": "your-value",
        "GEMINI_API_KEY": "your-value",
        "GT_PATHS__DATA_DIR": "your-value"
      }
    }
  }
}

浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。

这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。

你的选择通过 Cookie 保存在这台设备上,无需账户。

需要你填写的值

  • GITHUB_TOKEN 机密 env
    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_KEY 机密 env
    Optional. Enables the Claude backend for `gt summarize`, `gt distill`, and `gt eval`. Defaults to local Ollama when unset.
  • GEMINI_API_KEY 机密 env
    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 env
    Optional. Override the on-disk data directory holding the SQLite index, embeddings, and cached GitHub responses. Defaults to `$XDG_DATA_HOME/github-twin`.

这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。

它能做什么

它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。

基础检查i

我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日

  • ✓ 通过

    作者与仓库一致

    注册名称已通过 GitHub 账户 ChristopherDavenport 验证,该账户拥有此仓库

  • … 尚未检查

    仍在维护

    我们还没有从 GitHub 读取这个仓库

  • … 尚未检查

    有许可证

    我们还没有从 GitHub 读取这个仓库

  • – 不适用

    端点有响应

    它在你的电脑上运行,没有互联网端点

  • – 不适用

    使用 OAuth 登录

    在你的电脑上运行,改用本地设置

  • … 尚未检查

    工具描述中没有隐藏指令

    它在你的电脑上运行;我们只能读取互联网端点的工具列表

与“开发者工具”中的其他服务器比较i

  • 星标数多于此分类中其他 1386 个服务器的 0%
  • 发布到注册中心的时间比此分类中其他 1386 个服务器的 24% 更新
  • 基础检查结果等于或优于此分类中其他 1386 个服务器的 100%

与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。

常见问题

github-twin 安全吗?

它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。

它需要哪些密钥或代码?

你需要填写:GITHUB_TOKEN, ANTHROPIC_API_KEY, GEMINI_API_KEY

它在我的电脑上运行还是在云端?

它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。

它还在维护吗?

GitHub 仓库最后更新于–,最新版本(0.0.17)于5个月前进入注册中心。

哪些应用可以使用它?

支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。

有什么可以替代它?

同一分类中有:GitHub, Desktop Commander, Cloudflare MCP

替代选择

同一分类中其他作者的服务器,按星标数排序。

如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i

GitHub

作者:github

Connect AI assistants to GitHub - manage repos, issues, PRs, and workflows through natural language.

电脑或云端★ 34,245MIT3天前更新
安装

Desktop Commander

作者:wonderwhy-er

MCP server for terminal commands, file operations, and process management

在你的电脑上运行★ 10,225MIT15天前更新
安装

Cloudflare MCP

作者:cloudflare

Cloudflare MCP servers

在云端运行★ 4,446Apache-2.014个月前更新
安装

作者的 README

打开 README

按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。

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.

Try it now from Claude Code — drop this into ~/.claude.json and reload:

{

"mcpServers": { "github-twin": { "command": "uvx", "args": ["github-twin", "serve"] } } }

Your code stays on your box. Embeddings are computed locally

(Ollama or sentence-transformers); only the LLM seam (gt summarize,

gt distill, gt eval) optionally calls a hosted provider, and even

that's swappable to local Ollama. The gemini embedder is the one

exception — opt-in only.


A personal RAG over your GitHub history, served to Claude Code (or any MCP client) as a stdio server. Two scopes, one codebase:

  • User mode — index your own commits + review comments. Surfaces your past code as style examples and your past comments as review hints when an agent is writing or reviewing new code.
  • Org mode — index a whole GitHub org's files-at-HEAD, commits, and PR reviews across every member. Queries scope by repo, language, or reviewer login.

Retrieval is hybrid (BM25 + vector via RRF), AST-aware via tree-sitter for python/scala/javascript/typescript/go/rust, and contextually enriched at embed time with per-chunk headers + optional LLM-generated summaries.

Install

The fastest path is uvx — no virtualenv to manage, isolated per-tool:

# One-shot

uvx github-twin --help

Pinned version

uvx github-twin@0.1.0 --help

With sentence-transformers for the alt embedder

uvx --with 'github-twin[st]' github-twin --help

If you prefer a project-local install:

uv add github-twin            # or: pip install github-twin

gt --help

gt and github-twin are the same Typer app — use whichever fits your muscle memory.

Authenticate

Pick whichever is least friction — github-twin tries them in this order:

  1. OAuth device flow (no `gh` install needed):
   uvx github-twin auth login        # opens browser, persists token

uvx github-twin auth status # show which source is active

   Token persists in the OS keyring (macOS Keychain / Linux Secret

Service / Windows Credential Manager) or, when unavailable, a 0600 file under your data dir.

  1. Existing `gh` CLI: if you've already run gh auth login, gt picks up the token via gh auth token — nothing to do.
  2. `GITHUB_TOKEN` env var: a classic PAT works too; useful for CI / headless / docker. Required scopes: repo, read:org, user:email.

Wire into Claude Code

The MCP server runs over stdio via github-twin serve (or gt serve). Run uvx github-twin auth login once on the box that will host the server.

Option A — via the Claude Code plugin marketplace (lowest-friction):

/plugin marketplace add ChristopherDavenport/christopherdavenport-marketplace

/plugin install github-twin@christopherdavenport

This registers the MCP server entry automatically; set GT_PATHS__DATA_DIR in your environment (or in ~/.claude.json's env block for this server) to point at the DB directory.

Option B — manual wiring: add an entry to ~/.claude.json (or your mcp_servers.json):

{

"mcpServers": { "github-twin": { "command": "uvx", "args": ["github-twin", "serve"], "env": { "GT_PATHS__DATA_DIR": "/path/to/your/github-twin-data" } } } }

If you'd rather not persist a token and instead supply it inline (CI, ephemeral container), add "GITHUB_TOKEN": "ghp_..." to that env block; it acts as the lowest-priority fallback.

Restart Claude Code; the find_*, predict_review_outcome, summarize_review_patterns, and sync tools will be available.

Quickstart

Pick a directory to hold the SQLite DB, config, and ingested cache — everything per-data-dir lives under this one root:

export GT_PATHS__DATA_DIR=~/github-twin-data

uvx github-twin auth login # one-time OAuth (or set GITHUB_TOKEN)

user mode (your own GitHub history)

uvx github-twin init # discover identity via /user uvx github-twin sync # ingest + summarize + embed uvx github-twin serve # MCP server over stdio

layer an org into the SAME DB

uvx github-twin init --kind org --org http4s uvx github-twin sync

OR keep the org in its own DB by switching data dirs

GT_PATHS__DATA_DIR=~/twin-http4s \ uvx github-twin init --kind org --org http4s GT_PATHS__DATA_DIR=~/twin-http4s uvx github-twin sync

gt sync is incremental on subsequent runs.

config.toml lives next to the DB at /config.toml and is created on the first gt init --embed-backend ... call. Default is $XDG_DATA_HOME/github-twin (or ~/.local/share/github-twin) when GT_PATHS__DATA_DIR is unset.

LLM provider matrix

The retrieval surface (find_*, predict_review_outcome) always runs locally on the SQLite index — no API call. LLM calls only happen in three places:

  • gt distill — clusters review comments / commits into rules.
  • gt summarize — generates per-chunk NL summaries used by the embed-time prefix.
  • gt eval reviews / eval predictions — held-out RAG-vs-baseline scoring.

Each picks a backend by precedence Claude → Gemini → Ollama (whichever API key is set), or you can force one explicitly.

ProviderEnv varWhat it covers
Anthropic (Claude)ANTHROPIC_API_KEYDistill / summarize / eval LLM. Best quality.
Google (Gemini, API key)GEMINI_API_KEY or GOOGLE_API_KEYDistill / summarize / eval LLM. Free tier is generous.
Google (Gemini, Vertex / ADC)GT_GEMINI_PROJECT (+ optional GT_GEMINI_LOCATION, default us-central1)Same backends, but auth via gcloud auth application-default login — no key in your shell. API key wins if both are set.
Ollama (local)OLLAMA_HOST (default http://127.0.0.1:11434)Distill / summarize / eval LLM. Fully offline.

The Vertex / ADC path needs the aiplatform.googleapis.com API enabled on your project, and billing applies even for "free" Gemini models — the AI Studio free tier does not extend to Vertex. Project IDs are not secrets; the credential itself lives at ~/.config/gcloud/application_default_credentials.json and is refreshed by gcloud.

Embedder backends

We keep the embedder backend separate from the LLM backend. Choose one:

  • Default — Ollama (nomic-embed-text, 768-dim, ~50ms/chunk). Requires a running Ollama daemon. Zero cost, fully local.
  • Alternative — sentence-transformers (uv add 'github-twin[st]', pulls torch). Useful when an Ollama daemon isn't available or you want a specific HuggingFace model. Local.
  • Alternative — Gemini (gemini-embedding-001 at 3072-dim by default). Uses the google-genai dep that's already installed; auth via GEMINI_API_KEY / GOOGLE_API_KEY, or via GT_GEMINI_PROJECT
  • ADC (gcloud auth application-default login) to route through Vertex AI without managing a key. Remote — this is the only embedder that sends chunk text off-box. Pick it when you have Gemini auth but no Ollama / [st] install, and your corpus is okay to share with Google.

The embedder is a per-DB commitment — sqlite-vec bakes the vector dimension into the table at first creation. Stamp the choice into /config.toml at init time so every subsequent command picks it up:

gt init --embed-backend gemini                              # gemini-embedding-001, 3072

gt init --embed-backend gemini --embed-dim 1536 # request shorter output gt init --embed-backend sentence_transformers \ --embed-model BAAI/bge-small-en-v1.5 --embed-dim 384

Re-running with the same values is a no-op; running with different values against an existing config.toml fails loud rather than silently changing the corpus. GT_EMBED__* env vars still work for one-off overrides and CI.

A "cloud-LLM only" setup either needs an embedder process (Ollama / [st]) or has to opt into the remote Gemini embedder.

Required GitHub token scopes

When you gt init, the GH client needs:

  • repo — private repos and PR comments on them
  • user:email — verified email addresses for the user-mode identity sweep
  • read:org — org member listing and private org repo discovery

A fine-grained PAT works; classic tokens too.

Retrieval

Hybrid search by default: BM25 (SQLite FTS5) and vector similarity run in parallel, then fuse via Reciprocal Rank Fusion (k=60). The vector leg matches semantic intent; the BM25 leg catches exact identifiers (getUserById, SQLITE_OPEN_READWRITE) that vector search routinely misses. Design reference: Anthropic — Contextual Retrieval.

At embed time, each chunk gets a deterministic header prepended: # path :: symbol_name (node_kind), plus the function's leading docstring/comment when present, plus an optional LLM-generated summary (see gt summarize). The header lets vector queries land on chunks whose bodies only contain identifiers (e.g. natural-language queries against a VaultSecretEq function).

BM25 query expansion is on by default (cfg.retrieval.query_expansion = "rule"), with rule-based code-shaped synonyms applied only to the BM25 leg — embeddings already capture synonymy, so expansion never touches the vector query. Switch to "ollama" to add LLM-generated alternates on top, cached on disk per-token.

predict_review_outcome stays on pure vector retrieval because its inverse-distance vote weighting depends on calibrated L2 distance.

MCP tools

All retrieval tools accept optional repo= and author_login= filters.

ToolReturns
find_review_comments(diff_hunk, language?, repo?, author_login?, k=5)Past review comments on diffs similar to the input.
find_style_examples(query, language?, repo?, author_login?, k=5)Past code chunks matching a description.
find_code(query, language?, repo?, path_glob?, node_kind?, k=5)Source snippets from files at HEAD (org mode).
find_applicable_rules(query, language?, repo?, author_login?, k=5)Distilled code-pattern rules relevant to a coding task.
predict_review_outcome(diff_or_summary, language?, repo?, author_login?, k=20)Weighted prediction over nearest past PRs: {approved, changes_requested, commented}.
summarize_review_patterns(language?, limit=20)Distilled rules from clustered review comments (run gt distill first).
sync(since?)Incremental ingest + summarize + embed.

CLI

gt init [--kind user|org|repo] [--org N] [--repo owner/name]

gt repos # list discovered org repos gt ingest # backfill gt summarize [--limit N] [--backend ...] # LLM NL summaries per chunk gt embed

只显示了开头部分;其余内容请在仓库中阅读

问 PopNx