
Infimium
io.github.aryankumar06由 GitHub 帳號 aryankumar06 發布v0.3.1更新於 Oct 24, 2026
Private AI context layer for semantic code search, dependency graphs, memory, and workspaces.
概覽
Infimium 是本地 MCP 伺服器,為程式開發助理提供語意化程式碼搜尋、相依圖、本機文件檢索與持久的專案記憶。
- 可以做什麼
- 依語意搜尋程式碼庫並優先回傳符號簽章,需要時再載入完整實作;檢視某個符號的匯入、呼叫端、被呼叫端與 HTTP 路由;檢索本機 Markdown、文字、HTML 與 PDF 文件;讀取並重新整理已儲存的儲存庫脈絡、記憶與交接說明;跨代理保存草稿事件、里程碑與長期專案規則;根據程式碼與相依圖產生實作計畫;可選擇連網搜尋並把網址擷取為可讀文字;執行白名單內的 shell 指令,附帶逾時與輸出限制。
- 適用情境
- 適合助理在大型程式碼庫中工作、否則會讀取過多程式碼或找不到正確符號的情況,也適合希望專案記憶與交接說明能在工作階段與不同代理之間保留。多專案工作區需要關聯專案脈絡時同樣適用。
- 執行需求
- 透過 npx 以 stdio 在本機執行,需要 Node.js 22.5 或更新版本。安裝需在要建立索引的儲存庫目錄中執行。使用 Ollama 產生嵌入(nomic-embed-text),產生計畫可選用 llama3.1;Go、Rust 與 Java 語法檔會在首次使用時下載。可選的連網搜尋需要將 SEARCH_PROVIDER 設為 tinyfish 並提供 SEARCH_API_KEY。設定保存在使用者主目錄下的全域環境檔案。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Infimium,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Infimium
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.
[npm version] [MCP Badge] [MIT] [GitHub stars]
Demo
Why
Large repositories make agents read too much code or miss the right symbol. Infimium retrieves compact, relevant context before the agent starts editing.
Quick Start
Requires Node.js 22.5+. From your project folder:
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:
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:
Full infimium plan generation also needs a local text model:
infimium plan --dry-run "your task" works without this model and shows the retrieved code context first.
Connect Your Agent
Cursor, Windsurf, Claude Desktop, and other MCP clients:
Restart the client, then use:
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.
Tools
CLI
Use npx infimium ... if you did not install the package globally.
Project Memory
Refresh memory yourself, or enable periodic checkpoints for the current project:
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:
- Scratchpad: recent events for the active task.
- Archive: compact summaries of completed tasks.
- Ledger: durable decisions, rules, quirks, and unresolved blockers.
Record meaningful progress while working:
When the task is 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:
Local Architecture
- Ollama creates embeddings on your machine.
- Embedded SQLite stores vectors, index metadata, project memory, and graph edges. No ChromaDB or Docker service is required.
- Documents use recursive boundary-aware chunks instead of blind fixed slices.
- JavaScript, TypeScript, Python, and Dart parsers are bundled.
- Go, Rust, and Java Tree-sitter WASM grammars download on first use and cache in
~/.infimium/grammars/. .gitignore,.infimiumignore, and framework defaults exclude dependencies, build output, Flutter artifacts, caches, and binaries before indexing.semantic_code_searchreturns signatures;expand_symbolprovides full code on demand.- Project memory uses session-scoped scratchpads, compact milestone archives, and a versioned semantic ledger.
get_contextemits static anchors, dynamic repository state, and active execution as separate YAML zones.
Multiple Projects
Run the normal index command from a folder containing related projects:
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:
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 - Playground
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.
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:
Open Token Economics to see the estimated token difference across your actual indexed symbols.
Privacy
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_opened
Telemetry 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:
or set:
Troubleshooting
FAQ & Common Confusions
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:
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:
Database is locked
If you see Failed to start Infimium: Database is locked, it means another instance of Infimium is actively holding a lock on the SQLite memory database. This usually happens if you try to run infimium index manually in one terminal while infimium playground or infimium watch is still running in another. Simply stop the running process (Ctrl+C) before running manual commands.
General Setup Issues
Run:
Every failed check prints one copy-paste fix. If setup still fails, give this prompt to your coding agent:
Contributing
See CONTRIBUTING.md. Adding a language starts with a parser fixture and extraction test.
Self-hosting is free forever under the MIT license.
來源:README.md,提交 6458efd
工具
0版本歷史
1- v0.3.1最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分