Context7
Up-to-date docs for AI agents
作者提供的说明(英文原文)
Private AI context layer for semantic code search, dependency graphs, memory, and workspaces.
这三项永远不会合并成一个分数:意见、测量和人气是不同的东西。
我们还没有为它写通俗的介绍。下面是我们从注册中心读取到的事实。
选择你使用的 AI 应用,然后复制设置。
SEARCH_API_KEY, SEARCH_PROVIDER, CODEBASE_PATH, LOCAL_DOCS_PATH, CHROMADB_HOST, OLLAMA_HOST, SHELL_ALLOWLIST标为机密的值是你账户的钥匙。千万不要分享给别人,也不要粘贴到聊天里。
你需要
你用的是哪个应用?
在上方选择你的应用。我们会记住它,下次按钮会显示“安装到 …”。
打开 Claude Desktop → Settings → Developer → Edit Config,把下面的内容粘贴到 claude_desktop_config.json
{
"mcpServers": {
"infimium": {
"command": "npx",
"args": [
"-y",
"infimium"
],
"env": {
"SEARCH_API_KEY": "your-value",
"SEARCH_PROVIDER": "your-value",
"CODEBASE_PATH": "your-value",
"LOCAL_DOCS_PATH": "your-value",
"CHROMADB_HOST": "your-value",
"OLLAMA_HOST": "your-value",
"SHELL_ALLOWLIST": "your-value"
}
}
}
}在终端中运行这条命令
claude mcp add infimium --env SEARCH_API_KEY=your-value --env SEARCH_PROVIDER=your-value --env CODEBASE_PATH=your-value --env LOCAL_DOCS_PATH=your-value --env CHROMADB_HOST=your-value --env OLLAMA_HOST=your-value --env SHELL_ALLOWLIST=your-value -- npx -y infimium运行前请先填写空着的值。
粘贴到项目中的 .cursor/mcp.json,或 ~/.cursor/mcp.json
{
"mcpServers": {
"infimium": {
"command": "npx",
"args": [
"-y",
"infimium"
],
"env": {
"SEARCH_API_KEY": "your-value",
"SEARCH_PROVIDER": "your-value",
"CODEBASE_PATH": "your-value",
"LOCAL_DOCS_PATH": "your-value",
"CHROMADB_HOST": "your-value",
"OLLAMA_HOST": "your-value",
"SHELL_ALLOWLIST": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
粘贴到项目中的 .vscode/mcp.json
{
"servers": {
"infimium": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"infimium"
],
"env": {
"SEARCH_API_KEY": "your-value",
"SEARCH_PROVIDER": "your-value",
"CODEBASE_PATH": "your-value",
"LOCAL_DOCS_PATH": "your-value",
"CHROMADB_HOST": "your-value",
"OLLAMA_HOST": "your-value",
"SHELL_ALLOWLIST": "your-value"
}
}
}
}浏览器会先询问是否打开应用,然后应用会显示设置并请你确认。密钥的值会留空,由你自己填写。
这个服务器在你的电脑上运行,而 ChatGPT 只能连接互联网上的服务器。请选择其他应用。
你的选择通过 Cookie 保存在这台设备上,无需账户。
SEARCH_PROVIDER envCODEBASE_PATH envLOCAL_DOCS_PATH envCHROMADB_HOST envOLLAMA_HOST envSHELL_ALLOWLIST env这些设置是根据作者在注册中心的条目生成的。如果 README 的写法不同,请以 README 为准。
它在你的电脑上运行;安装后,工具列表会显示在你的 AI 应用中。
我们检查的是任何人都能看到的信息;我们没有阅读代码。不适用的检查项不计入总数。 · 检查于 2026年11月6日
发布者(aryankumar06)不是仓库所有者(infimium-ai);可能是其他人代为上架的
我们还没有从 GitHub 读取这个仓库
我们还没有从 GitHub 读取这个仓库
它在你的电脑上运行,没有互联网端点
在你的电脑上运行,改用本地设置
它在你的电脑上运行;我们只能读取互联网端点的工具列表
与注册中心里这个分类中所有活跃的服务器比较。只有当发布者拥有该仓库时,星标数才计入。
它在 1 项适用的基础检查中通过了 0 项。我们没有阅读代码。在添加密钥或令牌之前,请先看看这个服务器要求哪些权限,并使用只具备所需权限的密钥。
你需要填写:SEARCH_API_KEY
它在你的电脑上运行。你的 AI 应用会在需要时启动它,数据不会经过作者的服务器(除非它自己调用在线服务)。
GitHub 仓库最后更新于–,最新版本(0.3.1)于4个月前进入注册中心。
支持 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、图片和脚本已被移除。链接会离开本站。
The Private Context Layer & Super Brain for Your Codebase. Give AI agents persistent memory, deep dependency graphs, and instant code context -- 100% local, zero token bloat.
Large repositories make agents read too much code or miss the right symbol. Infimium retrieves compact, relevant context before the agent starts editing.
200,000 lines of code
Agent reads everything -> context blown + expensive grep "price calculation" -> misses calcPropertyValue()
tool: semantic_code_search
query: "price calculation logic"
-> services/property/calc.ts:142 · calcPropertyValue() -> callers: getListingPrice(), estimatePropertyTax()
Requires Node.js 22.5+. From your project folder:
cd /path/to/your/project
npx infimium@latest setup
Run setup from the repository you want to index, not from your home directory (~). Infimium stops broad roots automatically so it cannot scan unrelated files.
That creates global config, starts Ollama if it is installed, pulls nomic-embed-text, indexes the current project or workspace, runs doctor, and opens Playground.
The published CLI keeps its executable entrypoint, so MCP clients can launch it directly through the configuration below.
If Ollama is not installed yet:
npx infimium@latest setup --install-deps
infimium setup creates one global config at ~/.infimium/.env. You do not need a .env in every project. Code, docs, memory, graphs, and vectors are stored locally under ~/.infimium/.
Web search is optional. Add a Tinyfish key only when you need it:
SEARCH_PROVIDER=tinyfish
SEARCH_API_KEY=your_key
Full infimium plan generation also needs a local text model:
ollama pull llama3.1
infimium plan --dry-run "your task" works without this model and shows the retrieved code context first.
Cursor, Windsurf, Claude Desktop, and other MCP clients:
{
"mcpServers": { "infimium": { "command": "npx", "args": ["-y", "infimium", "serve"] } } }
Restart the client, then use:
Use Infimium hello_infimium.
Use Infimium get_context before starting. Use Infimium semantic_code_search to explain this repository.
Infimium normally uses the MCP process working directory. If your client starts it elsewhere, pass project_path once; Infimium remembers the active project and auto-indexes it.
| Tool | What it does |
|---|---|
hello_infimium | Confirms the MCP server is healthy. |
get_context | Reads saved YAML repo context, current memory and handoff; explicit refresh updates Git/index state. |
infimium_update | Refreshes episodic memory and handoff graphs; controls automatic memory checkpoints. |
semantic_code_search | Finds code by meaning and returns symbol signatures first. |
expand_symbol | Loads one full implementation only when needed. |
query_local_docs | Searches local Markdown, text, HTML, and PDF files. |
dep_graph | Shows imports, callers, callees, and HTTP routes for a symbol. |
project_memory | Keeps active scratchpad events, compact milestones, and durable project rules across agents. |
plan | Builds a grounded implementation plan from code and graph context. |
web_search | Searches the web through optional Tinyfish configuration. |
fetch_url | Extracts readable Markdown or text from a URL. |
shell | Runs allowlisted commands with timeouts and output limits. |
| Command | Description |
|---|---|
infimium doctor | Run health checks on your dependencies and setup. |
infimium status | Show the current status of the index and memory. |
infimium --help | Shows all relevant cli commands. |
infimium playground | Launch the local web UI to explore index, graph, and memory. |
infimium index | Scan and index the current project directory (code, docs, dependencies). |
infimium watch | Run the indexer in watch mode to continuously index changes. |
infimium get-context | Output the full flattened context as YAML (layer.md). |
infimium code-search | Semantically search code and return symbol signatures. |
infimium expand-symbol | Fetch the full implementation code for a specific symbol. |
infimium docs-search | Semantically search local markdown/text documentation. |
infimium dep-graph | Show dependencies, callers, callees, and route graph. |
infimium plan --dry-run " " | Draft an implementation plan based on a given prompt. |
infimium remember " " | Add a milestone, progress, or decision to project memory. |
infimium resume | Show the active task and recent scratchpad memory events. |
infimium memory complete | Compact the active scratchpad into an archived milestone. |
infimium memory search " " | Semantically search past project rules and memory ledger. |
Use npx infimium ... if you did not install the package globally.
Refresh memory yourself, or enable periodic checkpoints for the current project:
infimium update --note "Implemented login validation" --task "Finish login" --handoff "Run the auth tests next"
infimium update start --interval 300 infimium update status infimium update stop
Replace the example notes with your own. Add --project /path/to/repo to select a project and --file src/auth.ts to attach a relevant file. infimium_update and infimium-update are CLI aliases. MCP agents use the infimium_update tool with action: refresh|start|stop|status, project_path, and optional note, task, handoff, files, or interval_seconds.
Auto-update is opt-in and runs while the foreground CLI watcher or an MCP server is open. Its per-project setting survives restarts; stop disables future checkpoints (an in-flight refresh may finish). Checkpoints link episodes, tasks, file references, and handoff notes in local SQLite. Unchanged observations are deduplicated. Automatic checkpoints record observable state, not guessed intent, and never mark a task complete.
get-context / get_context now reads saved context and current memory without rescanning the repo. It includes a bounded memory graph and guidance to answer repo-overview questions only when asked, using Infimium memory first. Missing context is reported explicitly. Run infimium update or get-context --refresh to refresh filesystem context. These are agent guidelines, not an enforcement mechanism for other clients.
Infimium keeps memory bounded across long sessions:
Record meaningful progress while working:
infimium remember "Added rate-limit middleware" --type progress --task "Rate limiting"
infimium remember "Use Redis-backed counters in production" --type decision
When the task is complete:
infimium memory complete
Infimium uses the local llama3.1 model when available and falls back to deterministic compaction when it is not. Raw compacted events remain stored locally for seven days before pruning. get_context never calls an LLM or network service.
From a source checkout, build once and run the local playground with:
npm run build
npm run playground
~/.infimium/grammars/..gitignore, .infimiumignore, and framework defaults exclude dependencies, build output, Flutter artifacts, caches, and binaries before indexing.semantic_code_search returns signatures; expand_symbol provides full code on demand.get_context emits static anchors, dynamic repository state, and active execution as separate YAML zones.Run the normal index command from a folder containing related projects:
infimium index
Infimium detects immediate project roots from files such as pubspec.yaml, package.json, Cargo.toml, and go.mod. It shows the detected roles and dependencies, asks once, then creates infimium.workspace.json, indexes every project, and opens Playground.
For unattended setup:
infimium index --yes --no-playground
Use --no-workspace to index only the current project. Workspace projects keep separate memory and Git state while get_context includes balanced summaries and graph relationships from related projects.
Infimium drops the initial payload cost from approximately 1,460 tokens to 8 tokens per symbol. Semantic search returns the AST signature first; the agent requests the full implementation only when it needs it with expand_symbol.
Full implementation ~1,460 tokens
AST skeleton ~8 tokens Initial payload reduction ~99.5%
These are Playground reference values, not a claim that every function has the same size. Inspect your own indexed repository and compare AST-first retrieval with full-text retrieval locally:
infimium playground
Open Token Economics to see the estimated token difference across your actual indexed symbols.
Code, docs, embeddings, memory, graph data, prompts, queries, file paths, and repo names remain local.
Infimium sends privacy-safe anonymous lifecycle telemetry so we can understand setup success:
init_started, init_completeddoctor_run, doctor_passedindex_started, index_completed, setup_completedserve_started, first_tool_call, playground_openedTelemetry includes an anonymous install ID, Infimium version, OS, Node major version, timestamp, and event name. It never includes code, file paths, repo names, prompts, search queries, memory notes, API keys, or user identity.
Disable it anytime:
infimium telemetry off
or set:
INFIMIUM_TELEMETRY=false
Where is `layer.md`? When you run infimium get-context, it prints saved context directly to your terminal (stdout). Refreshes store project-scoped YAML under Infimium's local data directory. To export the saved context to a file, use terminal redirection:
infimium get-context > layer.md
Why does the Playground UI say "Awaiting first agent interaction..."? The CURRENT TASK tracker reflects stored project context. Run infimium update --task "Your task" to refresh it; get-context reads the saved snapshot.
How do I format `infimium remember`? The infimium remember command requires a message and a --type flag (valid types: note, progress, decision, blocker, index, plan). If you also want it to update the active task in the Playground, include the --task flag:
infimium remember "Added rate limiting只显示了开头部分;其余内容请在仓库中阅读