Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Code graph for coding agents: symbol search, callers, blast radius and cross-service impact.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"cgraph": {
"command": "npx",
"args": [
"-y",
"cgraph-mcp"
]
}
}
}在终端中运行这条命令
claude mcp add cgraph -- npx -y cgraph-mcp粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"cgraph": {
"command": "npx",
"args": [
"-y",
"cgraph-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"cgraph": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"cgraph-mcp"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
注册名称已通过 GitHub 账户 Nxtsoft 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.9.7)于16天前进入注册中心。
支持 MCP 的应用,例如 Claude Desktop、Claude Code、Cursor 和 VS Code。你的电脑上还需要有 Node.js。
同一分类中有: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、图片和脚本已被移除。链接会离开本站。
English · 简体中文
*Scan a project · extract structure into a deterministic graph · query it in ~10 ms from a daemon, a thin client, or an MCP server.*
Why CGraph? · Architecture · Repository layout · What it produces · Output formats · Performance · Retrieval benchmark · Languages · Quick start · Install & Setup · Use with coding agents · CLI · daemon · MCP reference · Host integrations & enrichment · Development notes · Contributing · License
Reading a large repo to answer "what calls this?" or "what breaks if I change it?" means loading dozens of files — and those answers aren't in any single file. They live in the *relationships between* files. CGraph precomputes them so you (and your AI agent) navigate by graph, not grep.
| 🔗 Reverse dependencies & blast radius | graph_impact returns every transitive dependent of a symbol in ~10 ms. On a real 10,706-node repo it surfaced 93 dependents of one god-file, instantly — an answer grep can't give you. |
| 🧭 Navigate, don't grep | Centrality-ranked search, node neighborhoods, shortest paths, and token-budgeted source bundles — served warm in ~10 ms instead of many file reads that burn context. |
| 🏛️ Architecture at a glance | Centrality ranking surfaces the load-bearing files; Leiden/Louvain community detection clusters the repo into modules automatically. |
| ⚡ Deterministic & fast | A full 10k-node graph builds in ~2 s; no LLM in the extraction path — same input, same graph, every time. |
| 🤖 Built for coding agents | A standard MCP server drops the graph straight into Claude / Codex, so they reason over structure instead of blindly reading files. |
The pitch in one line: for a codebase too big to hold in your head, CGraph is the index that decides *which* code to read —
ctags/"find all references", precomputed, centrality-ranked, and exposed over MCP.
graph.json, graph.html, graph.svg, obsidian.md, cypher.txt, modules.mmd, modules.svg, design.mmd, design.md).query / path / explain / impact / context in ~10 ms.The engine owns deterministic extraction, fragment validation, cache state, and local graph mutation; hosts own model choice and semantic enrichment.
src/cli/ One-shot CLI entrypoint: cgraph
src/daemon/ Daemon entrypoint: graphd src/client/ Thin client runtime and cgraph-client executable src/mcp/ MCP request handling and cgraph-mcp executable src/engine/ Detection, extraction, graph building, analysis, daemon ops tests/smoke/ CTest smoke coverage for engine, daemon, MCP, and integration paths tests/fuzz/ Optional libFuzzer targets integrations/ Host hook and always-on integration scripts docs/ Host integration contract and benchmark notes vendor/ Vendored tree-sitter core and grammars
A single scan turns a source tree into an interactive, explorable graph — communities colored, hubs sized by centrality:
The real graph.html viewer on a 10,708-node / 28,945-edge codebase — self-contained HTML, no external JS.
graph.json — directed node-link JSON with graph metadata, nodes, and links. Node ids derive from each file's path relative to the project root, so the same commit built from two checkouts yields the same ids and two graphs can be joined by id; source_file stays the path the graph was read fromgraph.html — browser-readable interactive graph viewgraph.svg — static graph visualizationobsidian.md — markdown export for Obsidian-style navigationcypher.txt — Neo4j Cypher statementsmodules.mmd — module dependency diagram as Mermaidmodules.svg — module dependency diagram as a layered static imagedesign.mmd — entry points and their top call flows as a Mermaid flowchart TDdesign.md — the same as Markdown: entry-point table, nested flows, layers by call distanceThe interactive viewer used to run an O(N²) force simulation in the browser on every open. Layout is now precomputed once in C++ (via igraph), and repaints are viewport-culled — both dependency-free:
| graph | time-to-settle before | after | per-frame repaint |
|---|---|---|---|
| 10,000 nodes | 35.2 s (main thread pinned) | ~0 ms (static layout) | 20–34× cheaper (zoom/pan) |
CGraph has been scored on Agent Retrieval Bench: 427 samples from 25 repositories, each checked out at its base commit, scored with the benchmark's own metric code. The table covers all 345 positive samples.
| Method | Recall@20 | MRR | BCY@8k |
|---|---|---|---|
| CGraph bin-v0.9.1 (label + code-text search) | 0.6362 | 0.2787 | 0.4319 |
| CGraph bin-v0.8.3 (label-only text search) | 0.5726 | 0.2356 | 0.3790 |
| RepoMap (published) | 0.6333 | 0.2158 | 0.3788 |
| RepoMap (rerun on this harness) | 0.6311 | 0.2156 | 0.3846 |
| Qwen3-Embedding-8B (published) | 0.7029 | 0.2336 | 0.3732 |
| Qwen3-Embedding-4B (published) | 0.6306 | 0.2379 | 0.3409 |
| BM25 (published) | 0.4452 | 0.1520 | 0.2051 |
How bin-v0.9.1 compares:
Per-task tables, pins, the noise floor and caveats are in bench/arb/RESULTS.md. Reproduce with bench/arb/run.sh.
Tree-sitter-backed structural extraction, with regex/structured extraction for a few config formats:
Plus structured/regex extraction for Apex, Delphi form/source, MSBuild/XML project files, and MCP config files.
Seven languages emit a field node per declared member, with a defines edge from the owner:
| Language | Owners with members | Field properties |
|---|---|---|
| C, C++ | class, struct only — not enum or union | none |
| TypeScript, TSX | interface, object type alias, class (constructor parameter properties included), enum | type_text, optional, readonly |
| Go | struct, including multi-name and embedded fields | type_text |
| Rust | named and tuple struct, union, enum variant, trait associated type and constant | type_text |
| Python | class-body assignment, including chained and tuple targets | type_text when annotated |
| Java | class, record, enum | type_text, readonly |
Members are declared members only: no inherited-member expansion, no alias flattening, no runtime attribute inference. A declaration that is already a node of its own — a TypeScript method_signature, a Rust trait method or type alias — keeps its function or type node and is not also a field. A field never takes the id a function or type holds; it moves instead, so a symbol's id stays stable.
A class-like declaration without a body (struct FileCacheEntry;) is a forward declaration and mints no node; only the body-bearing definition does.
Fields are members, not navigation targets: graph_context packs the owner (whose snippet spans its members) rather than the members, and report modules symbol counts exclude them.
JavaScript and TypeScript services get one endpoint node per route the code serves, with the full path composed across files: an Elysia, Express or Hono chain's own prefix (new Elysia({ prefix: '/notebooks' }), .basePath('/v1')) beneath every .use(child), .use('/p', child) or .route('/p', child) that mounts it, up to the top-level chain, read through as any and as unknown as T casts and resolved through imports (aliased ones included). A chain built inline inside .use(new Elysia({ prefix }).get(…)), a .group('/v2', app => app.get(…)) or .guard() callback, and a module re-exported as export const deckModule = deckRoutes as unknown as Elysia all compose the same way. A Next.js app/api/x/[id]/route.ts exporting GET is GET /api/x/:id. A repository holding a langgraph.json with a non-empty graphs object is a LangGraph Agent Server: its 49 framework routes (POST /runs/wait, POST /threads/{thread_id}/runs/stream, GET /assistants/{assistant_id}, ..., the table @langchain/langgraph-api 1.5.1 registers, less its fo
只显示了开头部分;其余内容请在仓库中阅读