Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Mines git history for file co-change patterns into a queryable knowledge graph via MCP.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"graphkeeper": {
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}在终端中运行这条命令
claude mcp add graphkeeper -- uvx graphkeeper-cli graphkeeper-mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"graphkeeper": {
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"graphkeeper": {
"type": "stdio",
"command": "uvx",
"args": [
"graphkeeper-cli",
"graphkeeper-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月7日
注册名称已通过 GitHub 账户 RudrenduPaul 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.1.5)于3个月前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Python (uv)。
同一分类中有:Context7, Codebase Memory, Exa
同一分类中其他作者的服务器,按星标数排序。
如何看卡片:★ GitHub 星标i三大支柱:评价 · 检查 · 使用情况i更新 = 最新版本发布到注册中心的时间i
Up-to-date docs for AI agents
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
按原文从作者的仓库复制。PopNx MCP 没有审查或背书其内容。HTML、图片和脚本已被移除。链接会离开本站。
Install • Quickstart • CLI Reference • Comparison • FAQ
A local-only CLI that mines your git log for which files actually change together, then hands an AI coding agent a queryable answer instead of a grep across the whole history.
npx graphkeeper-cli build
npx graphkeeper-cli query co-change src/git.ts
Files that historically change alongside "src/git.ts":
1 src/store.ts 1 src/types.ts 1 test/git.test.ts 1 test/store.test.ts 1 test/test-helpers.ts
(Real output from running GraphKeeper against its own repo, this early in its history. Co-change counts grow as a codebase accumulates more commits.)
No server, no account, no embeddings API. Every byte of output comes from git log on the repo you already have checked out.
GraphKeeper ships two independent, equally first-class packages. Pick whichever fits your toolchain, or install both. Both mine the same git log co-change signal and share one on-disk .graphkeeper/graph.json schema, so a store built by either can be read back by the other.
# npm -- JavaScript/TypeScript CLI + library
npm install -g graphkeeper-cli
npx graphkeeper-cli build
pip install graphkeeper-cli
The npm package requires Node.js 18 or later; the Python package requires Python 3.9 or later. Both require git on your PATH. The Python package's CLI entry point is also graphkeeper (e.g. graphkeeper build). See python/README.md for the Python-specific walkthrough, and CHANGELOG.md for each distribution's version history.
Run it against any git repo, including this one:
git clone https://github.com/RudrenduPaul/GraphKeeper.git
cd GraphKeeper graphkeeper build
GraphKeeper build complete: /path/to/GraphKeeper
Co-change graph: 4 commit(s) analyzed, 80 file pair(s) found graphify enrichment: skipped -- graphify was not found on PATH. Install it with uv tool install graphifyy (or pipx install graphifyy) for symbol/call-graph enrichment; GraphKeeper works fine without it, in co-change-only mode.
Wrote /path/to/GraphKeeper/.graphkeeper/graph.json
Now query it:
graphkeeper query co-change src/git.ts
Files that historically change alongside "src/git.ts":
1 src/store.ts 1 src/types.ts 1 test/git.test.ts 1 test/store.test.ts 1 test/test-helpers.ts
If graphify is installed (uv tool install graphifyy), graphkeeper build automatically shells out to its local, no-API-key graphify extract --code-only and merges its symbol/call-graph into the same store, unlocking call-graph queries:
graphkeeper query calls mineCoChange
mineCoChange() (src/git.ts)
Calls (2): --> assertIsGitRepo() --> runGit()
Called by (1): <-- build()
(Also real output, from running graphkeeper build against this repo with graphify installed.)
Without graphify installed, that same command explains exactly why the answer isn't available instead of crashing or returning an empty result:
Call-graph query for "mineCoChange" is not available.
graphify was not found on PATH. Install it with uv tool install graphifyy (or pipx install graphifyy) for symbol/call-graph enrichment; GraphKeeper works fine without it, in co-change-only mode.
Every command also supports --json for scripts and agents:
graphkeeper query co-change src/git.ts --json
{
"file": "src/git.ts", "results": [ { "file": "src/store.ts", "count": 1 }, { "file": "src/types.ts", "count": 1 }, { "file": "test/git.test.ts", "count": 1 }, { "file": "test/store.test.ts", "count": 1 }, { "file": "test/test-helpers.ts", "count": 1 } ] }
graphkeeper build runs git log --no-merges --name-only across the full history of the repo and counts every file pair that changed together in the same commit. There's no guessing at coupling from folder structure or import statements alone; the answer comes from how the codebase actually got edited over time.PATH, graphkeeper build shells out to its local graphify extract --code-only --no-cluster and merges the resulting symbol/call edges into the same store, unlocking graphkeeper query calls. Without graphify, GraphKeeper still works in co-change-only mode and says so plainly instead of failing.graphkeeper query co-change --json and the equivalents return machine-readable output, so an agent's calling code parses a real data structure instead of scraping text.src/, TypeScript) and the PyPI package (python/src/graphkeeper/, Python) are independent ports, not a wrapper of one around the other. Both read and write the same .graphkeeper/graph.json, so a store built with one CLI is queryable from the other.spawnSync/subprocess.run with a list of arguments, so a crafted commit message or filename in the repo being analyzed can't be interpreted as shell syntax.Usage: graphkeeper [options] [command]
Options: -V, --version output the version number -h, --help display help for command
Commands: build [options] [path] Mine git history for co-change and (if available) merge in graphify's symbol/call graph query Query the GraphKeeper store built by graphkeeper build help [command] display help for command
graphkeeper build [path]Walks path (default: current directory), runs git log --no-merges --name-only across the whole history, and counts how often each pair of files was touched in the same commit. Writes the result to .graphkeeper/graph.json.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--max-files-per-commit | skip commits touching more than this many files (default: 100), keeping a single mass-reformat or vendoring commit from drowning out real co-change signal |
--no-graphify | skip graphify enrichment even if graphify is installed |
If graphify is detected on PATH, build also runs graphify extract --code-only --no-cluster (graphify's own headless, local, no-API-key AST extraction path) into a directory inside .graphkeeper/, and merges its nodes/edges into the same store. The build output always states plainly whether that enrichment was included, and why it was skipped if not.
graphkeeper query co-change Lists files that historically changed alongside , ranked by how many commits touched both.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--limit | cap the number of results |
--graph | path to a specific graph.json (default: /.graphkeeper/graph.json) |
Exit code 0 when results are found, 1 when there's no co-change data for that file yet, 2 on a usage or filesystem error.
graphkeeper query calls Shows callers and callees of , using graphify's calls edges from the most recent build. Only meaningful when that build included graphify enrichment; if it didn't, this prints a clear explanation of why instead of a crash or a silent empty result.
| Option | Description |
|---|---|
--json | emit machine-readable JSON instead of human-readable text |
--graph | path to a specific graph.json (default: /.graphkeeper/graph.json) |
Exit code 0 when the symbol is found, 1 when it isn't (or enrichment wasn't available), 2 on a usage or filesystem error.
GraphKeeper ships a Model Context Protocol server so an AI coding agent (Claude, Cursor, or any MCP-compatible client) can mine co-change history and query the graph directly, without a human invoking the CLI by hand.
Install the extra:
pip install "graphkeeper-cli[mcp]"
Add it to your MCP client's config (for Claude Desktop, claude_desktop_config.json):
{
"mcpServers": { "graphkeeper": { "command": "uvx", "args": ["--from", "graphkeeper-cli", "graphkeeper-mcp"] } } }
The server exposes one tool, run, that shells out to the published graphkeeper-cli npm package (via npx graphkeeper-cli) with the given subcommand and arguments plus --json, and returns the parsed JSON result:
run(["build", "."])
run(["query", "co-change", "src/git.ts"])
Transport is stdio, so there is nothing to host: the MCP client spawns the server as a local subprocess. Source: python/src/graphkeeper/mcp_server.py.
Both packages expose a real importable surface, listed below. The command line is a thin wrapper over the same functions.
graphkeeper-cli on npm)import { build, queryCoChange } from "graphkeeper-cli";
const result = build("."); console.log(${result.store.commitsAnalyzed} commit(s) analyzed);
const coChange = queryCoChange(result.store, "src/git.ts"); for (const row of coChange.results) { console.log(row.count, row.file); }
| Export | Signature | |
|---|---|---|
build | build(targetPath: string, options?: BuildOptions): BuildResult | |
queryCoChange | queryCoChange(store: GraphKeeperStore, file: string, options?: { limit?: number }): CoChangeQueryResult | |
queryCalls | queryCalls(store: GraphKeeperStore, symbol: string): CallsQueryResult | |
findGraphifyNode | `findGraphifyNode(nodes: GraphifyNode[], symbol: string): GraphifyNode \ | null` |
normalizeFileArg | normalizeFileArg(store: GraphKeeperStore, file: string): string |
| detectGraphify | `detectGr
只显示了开头部分;其余内容请在仓库中阅读