Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Offline codebase knowledge graph: 91% token reduction vs naive RAG, plus cross-session agent memory.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"nervapack": {
"command": "uvx",
"args": [
"nervapack"
]
}
}
}在终端中运行这条命令
claude mcp add nervapack -- uvx nervapack粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"nervapack": {
"command": "uvx",
"args": [
"nervapack"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"nervapack": {
"type": "stdio",
"command": "uvx",
"args": [
"nervapack"
]
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月8日
注册名称已通过 GitHub 账户 ramdhavepreetam 验证,该账户拥有此仓库
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 1 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
注册中心没有列出必需的密钥,不过有些服务器会在首次使用时要求你登录。
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.5.8)于4个月前进入注册中心。
支持 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、图片和脚本已被移除。链接会离开本站。
NervaPack is a privacy-first, offline knowledge graph for your codebase. It solves two fundamental problems with standard Vector RAG:
NervaPack runs 100% on your machine. It uses tree-sitter to parse your codebase into a deterministic Abstract Syntax Tree graph, then uses a local Ollama model to draw hard semantic edges between your documentation and your code. Queries traverse this graph with a K-Hop BFS, returning a hyper-targeted, token-efficient context window — no cloud required.
91.2% Average Token Reduction — independently verified on real-world codebases.
| Test Type | Tokens (Naive) | Tokens (NervaPack) | Reduction |
|---|---|---|---|
| Simple Query | 10,926 | 101 | 99.1% |
| Medium Query | 13,092 | 164 | 98.7% |
| Complex Query | 3,290 | 1,102 | 66.5% |
| Average | 52,037 | 2,459 | 91.2% |
Cost Savings: $181–$724 per developer per year (GPT-4o to Claude Sonnet)
📊 [View Full Benchmarks](docs/BENCHMARKS.md) · 🧪 [Messy Code Performance](docs/MESSY_CODE_PERFORMANCE.md)
Code quality impact: 90–99% reduction on clean code, 50–75% on legacy/messy code. Even poorly structured codebases benefit significantly.
| Standard Vector RAG | NervaPack | |
|---|---|---|
| Parsing | Arbitrary text chunks | Deterministic AST nodes (class, function, import) |
| Retrieval | Nearest-neighbour blob | K-Hop BFS on a structural graph |
| Doc ↔ Code links | None | Hard EXPLAINS edges drawn by local LLM |
| Privacy | Cloud embeddings | 100% local (ChromaDB + ONNX + optional Ollama) |
| Incremental sync | Re-index everything | Surgical per-file update via GitPython diff |
| Token savings | No measurement | Built-in dashboard shows exact reduction per query |
| Graph visibility | Black box | Interactive HTML visualization of every node and edge |
| Duplicate-safe | Repeated ingest = duplicate data | upsert — re-ingest is idempotent |
| Agent memory | None | 17-tool MCP server for cross-session memory |
git init if not)*(Optional for semantic code-doc binding)* — an LLM provider. Structural graph indexing and basic queries work out-of-the-box with zero configuration and no cloud connection.
| Provider | Setup | Cost | Privacy |
|---|---|---|---|
| Ollama (default) | brew install ollama && ollama pull llama3 | Free | 100% local |
| Claude API | pip install "nervapack[claude]" + ANTHROPIC_API_KEY | ~$0.25/1k calls | Cloud |
| OpenAI API | pip install "nervapack[openai]" + OPENAI_API_KEY | ~$0.15/1k calls | Cloud |
| MCP (Claude Code) | Zero config | Included in subscription | Cloud |
# Recommended
pip install nervapack
pip install "nervapack[mcp]" # MCP server for Claude Code / Cursor pip install "nervapack[memory]" # agent memory MCP server pip install "nervapack[metrics]" # exact token counts (tiktoken) pip install "nervapack[dashboard]" # web dashboard (streamlit + plotly) pip install "nervapack[claude]" # Claude API support pip install "nervapack[openai]" # OpenAI API support pip install "nervapack[all]" # everything
On first run, ChromaDB downloads an ONNX embedding model (~30 MB) to
~/.cache/chroma/. This is a one-time download.
cd your-project/
nervapack ingest .
nervapack query "How does authentication work?"
nervapack enrich .
nervapack visualize --enhanced --communities
nervapack sync .
nervapack clean --all nervapack ingest .
nervapack doctor
nervapack ingest [PATH] — Build the graphScans PATH (default: .) and builds the full knowledge graph.
What happens:
dist/, build/, node_modules/, venv/, site/, .tox/, and dozens of other build directories automatically..md files by header hierarchy.EXPLAINS edges..nervapack/graph.graphml.Re-ingesting is safe — upsert is used throughout, so running ingest twice does not duplicate data.
nervapack ingest . # auto-detect LLM
nervapack ingest . --llm ollama # force Ollama nervapack ingest . --llm claude # use Claude API nervapack ingest . --llm openai --model gpt-4o-mini nervapack ingest . --embeddings ollama # use Ollama for embeddings too
Supported languages (bundled): Python, JavaScript, JSX, TypeScript, TSX
Additional languages:
pip install "nervapack[go]" # Go
pip install "nervapack[rust]" # Rust pip install "nervapack[java]" # Java pip install "nervapack[c]" # C / C headers pip install "nervapack[cpp]" # C++ pip install "nervapack[ruby]" # Ruby pip install "nervapack[csharp]" # C# pip install "nervapack[all-languages]" # all of the above
Exclude directories — create .nervapackignore in your project root (gitignore syntax):
dist/
build/ site/ generated/ *.egg-info/
nervapack query PROMPT — Query the graphRetrieves focused context for a natural-language prompt and prints a token savings dashboard.
What happens:
EXPLAINS edges and memory notes via TOUCHES edges — are collected.nervapack query "How does authentication work?"
nervapack query "What calls VectorStore?" nervapack query "what breaks if I change GraphBuilder" # impact analysis
Example output:
Query: "How does authentication work?"
Query Router: Intent: semantic, Direction: both Vector Search: Found 3 seed nodes
Retrieved Context: ──────────────────────────────────────────────────────────
src/auth/middleware.py... ──────────────────────────────────────────────────────────
╭────────────── NervaPack Token Efficiency ──────────────╮ │ Strategy Tokens Reduction │ │ Naive RAG (3 files) 12,840 100% (base) │ │ NervaPack 1,180 9.2% │ │ ─────────────────────────────────────────────────────────│ │ Tokens saved: 11,660 Reduction: 90.8% │ │ Cost saved (GPT-4o $2.50/1M): $0.0292 per query │ ╰───────────────────────────────────────────────────────────╯
nervapack sync [PATH] — Incremental updateUpdates only the files that changed since the last ingest. Uses GitPython to diff the working tree.
nervapack sync .
A full ingest on a large project can take minutes. sync turns that into a 2–5 second surgical update per file. Re-parses changed files, batch-upserts new vectors, and saves the graph once at the end.
nervapack clean [OPTIONS] — Remove ingested dataWipe graph data and start fresh. Use this when you have duplicate vectors, ingested the wrong directory, or need to reduce disk usage.
nervapack clean --vectors # wipe ChromaDB only (chroma_db/)
nervapack clean --graph # delete graph.graphml only nervapack clean --history # clear query + graph history logs nervapack clean --all # everything above (keeps memory.db) nervapack clean --all --yes # skip confirmation (CI / scripts)
Never deleted by `clean`: memory.db — your agent memory is always safe.
Typical workflow after a bad ingest:
nervapack clean --all
nervapack ingest .
nervapack enrich [PATH] — Add semantic edgesRuns LLM doc-to-code binding on an already-ingested graph. Use this if you:
ingest without an LLM and want to add EXPLAINS edges now.nervapack enrich . # auto-detect LLM
nervapack enrich . --llm ollama --model llama3 nervapack enrich . --llm claude # shows cost estimate before proceeding
nervapack status [--detailed] — Graph healthnervapack status # node/edge counts + unsynced files
nervapack status --detailed # full analytics: health score, language distribution, coverage
Health score (0–100) factors in documentation coverage, node connectivity, graph density, and edge diversity. A structural-only graph typically scores 30–40; after enrich it rises to 70–90.
nervapack visualize [OPTIONS] — Interactive HTML graphnervapack visualize # basic visualization
nervapack visualize --enhanced # + real-time search + path finder nervapack visualize --enhanced --communities # + community detection (Louvain) nervapack visualize --output ~/my-graph.html # custom output path nervapack visualize --no-browser # generate without opening
Produces a standalone HTML file with no external dependencies — drag, zoom, search, find shortest paths between nodes.
nervapack explore TARGET [--hops N] — Focused subgraphExtract and visualize the N-hop neighbourhood of a specific file, class, or function.
nervapack explore GraphBuilder --hops 2
nervapack explore src/auth/middleware.py --hops 1 nervapack explore "function:parse"
nervapack dependencies [FILE] — Import dependency analysisAnalyze file-level import chains, detect circular dependencies, and visualize the dependency graph.
nervapack dependencies # full project analysis
nervapack dependencies src/graph/builder.py # single file nervapack dependencies --no-cycles # skip cycle detection
只显示了开头部分;其余内容请在仓库中阅读