infimium
OfficialInfimium is a local-first AI context layer for codebases. It gives AI agents token-efficient access to code, memory, and web tools.
Health:
hello_infimiumchecks server status.Semantic code search:
semantic_code_searchfinds code by meaning and returns compact signatures (~99.5% token reduction).Symbol expansion:
expand_symbolloads full symbol implementation on demand.Dependency graph:
dep_graphinspects imports, callers, callees, and HTTP routes.Project context:
get_contextprovides a tri-zonal YAML/JSON context layer (repo overview, Git state, active task) without network or LLM calls.Project memory:
project_memorymanages persistent memory across sessions—remember progress, resume tasks, complete items, and search history.Local docs search:
query_local_docssemantically searches indexed Markdown, text, HTML, and PDF files.Implementation planning:
plangenerates code-aware plans with an optional dry-run to preview retrieved context.Web search:
web_searchsearches the web (requires optional Tinyfish config).URL fetch:
fetch_urlextracts readable text/markdown from any URL.Shell:
shellruns allowlisted commands with configurable timeouts and output limits.
Key highlights: 100% local, embedded SQLite storage, supports JavaScript, TypeScript, Python, Dart, Go, Rust, Java, and works with any MCP client.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@infimiumsemantic code search for pricing logic"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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.
Demo

Related MCP server: LocalNest MCP
Why
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()Quick Start
Requires Node.js 22.5+. From your project folder:
cd /path/to/your/project
npx infimium@latest setupRun 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-depsinfimium 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_keyFull infimium plan generation also needs a local text model:
ollama pull llama3.1infimium 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:
{
"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.
Tools
Tool | What it does |
| Confirms the MCP server is healthy. |
| Loads tri-zonal YAML context: stable repo anchors, live Git/index state, and active execution. |
| Finds code by meaning and returns symbol signatures first. |
| Loads one full implementation only when needed. |
| Searches local Markdown, text, HTML, and PDF files. |
| Shows imports, callers, callees, and HTTP routes for a symbol. |
| Keeps active scratchpad events, compact milestones, and durable project rules across agents. |
| Builds a grounded implementation plan from code and graph context. |
| Searches the web through optional Tinyfish configuration. |
| Extracts readable Markdown or text from a URL. |
| Runs allowlisted commands with timeouts and output limits. |
CLI
Command | Description |
| Run health checks on your dependencies and setup. |
| Show the current status of the index and memory. |
| Shows all relevant cli commands. |
| Launch the local web UI to explore index, graph, and memory. |
| Scan and index the current project directory (code, docs, dependencies). |
| Run the indexer in watch mode to continuously index changes. |
| Output the full flattened context as YAML ( |
| Semantically search code and return symbol signatures. |
| Fetch the full implementation code for a specific symbol. |
| Semantically search local markdown/text documentation. |
| Show dependencies, callers, callees, and route graph. |
| Draft an implementation plan based on a given prompt. |
| Add a milestone, progress, or decision to project memory. |
| Show the active task and recent scratchpad memory events. |
| Compact the active scratchpad into an archived milestone. |
| Semantically search past project rules and memory ledger. |
Use npx infimium ... if you did not install the package globally.
Project Memory
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:
infimium remember "Added rate-limit middleware" --type progress --task "Rate limiting"
infimium remember "Use Redis-backed counters in production" --type decisionWhen the task is complete:
infimium memory completeInfimium 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 playgroundLocal 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 indexInfimium 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-playgroundUse --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.
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 playgroundOpen 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:
infimium telemetry offor set:
INFIMIUM_TELEMETRY=falseTroubleshooting
FAQ & Common Confusions
Where is layer.md?
When you run infimium get-context, it intentionally prints the context directly to your terminal (stdout) so AI agents can read it instantly. It doesn't create a layer.md file in your workspace to avoid clutter. If you want to manually save it to a file, use terminal redirection:
infimium get-context > layer.mdWhy does the Playground UI say "Awaiting first agent interaction..."?
The CURRENT TASK tracker at the top of the Playground UI is designed to mirror exactly what your AI agent sees. If an agent hasn't queried the context yet (via the get-context tool), it waits. To force it to update, manually run infimium get-context.
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" --type progress --task "Security Features"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:
infimium doctorEvery failed check prints one copy-paste fix. If setup still fails, give this prompt to your coding agent:
Set up Infimium in this repository. Install/start Ollama, pull nomic-embed-text,
run npx infimium init, run npx infimium index, and make all six
npx infimium doctor checks pass. Do not commit secrets.Contributing
See CONTRIBUTING.md. Adding a language starts with a parser fixture and extraction test.
Self-hosting is free forever under the MIT license.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityCmaintenanceAn MCP server for semantic code search & navigation that helps AI agents work efficiently without burning through costly tokens. Instead of reading entire files, agents can search conceptually and jump directly to the specific functions, classes, and code chunks they need.Last updated118MIT
- AlicenseBqualityDmaintenanceA local-first MCP server that provides AI agents with safe codebase access through file discovery, hybrid lexical-semantic search, and project introspection. It features durable local memory and semantic indexing while keeping all data and processing entirely on your local machine.Last updated74615MIT
- Alicense-qualityBmaintenanceAn MCP server that gives AI agents structured code understanding and precise code intelligence via local indexing of AST, call graphs, and semantic search.Last updated964Apache 2.0
- Alicense-qualityBmaintenanceAn MCP server that provides structure-aware code analysis (symbol trees, dependencies, docs) to reduce AI agent token consumption by up to 99%, along with Git commit intelligence.Last updatedMIT
Related MCP Connectors
An MCP server that gives your AI access to the source code and docs of all public github repos
Driflyte MCP server which lets AI assistants query topic-specific knowledge from web and GitHub.
Persistent memory and knowledge graphs for AI agents. Hybrid search, context checkpoints, and more.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/infimium-ai/infimium-agent'
If you have feedback or need assistance with the MCP directory API, please join our Discord server