Local Rag
@TheWinci
About Local Rag
Semantic code search for AI agents — hybrid vector + BM25 with cross-encoder reranking, AST-aware chunking for 14 languages, conversation memory, code annotations, and search analytics. Zero config, zero API keys. Just bunx.
Config
Add this server to your MCP-compatible client using the configuration below.
{
"mcpServers": {
"local-rag": {
"command": "bunx",
"args": [
"@winci/local-rag@latest",
"serve"
],
"env": {
"RAG_PROJECT_DIR": "/path/to/your/project"
}
}
}
}Tools
No tools detected
Fetch the live tool list by running this server in a temporary sandbox using the button above.
Overview
What is Local Rag?
Local Rag is a persistent project memory tool for AI coding agents. It provides semantic code search, cross-session conversation memory, auto-generated project wikis, and dependency graph analysis—all running fully locally using SQLite and in-process embeddings.
How to use Local Rag?
Install with bunx mimirs init --ide <ide> (e.g., claude, cursor, windsurf, copilot, jetbrains). Ensure SQLite with extension support is installed (brew install sqlite on macOS). No API keys, cloud, or Docker required—just Bun and SQLite.
Key features of Local Rag
- Hybrid vector + BM25 search boosted by dependency graph centrality
- Cross-session conversation indexing and checkpoints
- Auto-generated structured markdown wiki with Mermaid diagrams
- Annotations attached to files or symbols surfacing in results
- Dependency graph and reverse-dependency lookup for blast radius
- Local analytics logging zero-result and low-relevance queries
Use cases of Local Rag
- Quickly find code by meaning instead of filename or keyword search
- Recover context from past sessions—discussions, decisions, and blockers
- Understand codebase structure and impact before refactoring
- Expose documentation gaps through query analytics
- Mark milestones and direction changes with searchable checkpoints
FAQ from Local Rag
What does Local Rag do that alternatives don’t?
It combines AST-aware chunking (24 languages), local embeddings, cross-session memory, and checkpoints—all in one local tool with no API keys. The table in the README shows it reduces token cost from ~380K to ~91K per prompt with 93–98% recall.
Where does my data live?
All data is stored in a .mimirs/ directory inside your project. Nothing leaves your machine—the tool is fully local and privacy-preserving.
What languages and file formats does it support?
AST-aware chunking covers 24 languages via tree-sitter (TypeScript, Python, Go, Rust, Java, C, C++, C#, Ruby, PHP, Scala, Kotlin, Lua, Zig, Elixir, Haskell, OCaml, Dart, Bash/Zsh, TOML, YAML, HTML, CSS/SCSS/LESS). Many other formats fall back to paragraph splitting.
Does Local Rag require an embedding API or cloud service?
No. Embeddings are computed in-process using Transformers.js + ONNX with the all-MiniLM-L6-v2 model. The vector store is sqlite-vec—a single .db file.
What transport and authentication does it use?
Local Rag uses stdio transport via the MCP SDK. There is no network service; authentication is not required because everything runs locally.
Frequently asked questions
What does Local Rag do that alternatives don’t?
It combines AST-aware chunking (24 languages), local embeddings, cross-session memory, and checkpoints—all in one local tool with no API keys. The table in the README shows it reduces token cost from ~380K to ~91K per prompt with 93–98% recall.
Where does my data live?
All data is stored in a `.mimirs/` directory inside your project. Nothing leaves your machine—the tool is fully local and privacy-preserving.
What languages and file formats does it support?
AST-aware chunking covers 24 languages via tree-sitter (TypeScript, Python, Go, Rust, Java, C, C++, C#, Ruby, PHP, Scala, Kotlin, Lua, Zig, Elixir, Haskell, OCaml, Dart, Bash/Zsh, TOML, YAML, HTML, CSS/SCSS/LESS). Many other formats fall back to paragraph splitting.
Does Local Rag require an embedding API or cloud service?
No. Embeddings are computed in-process using Transformers.js + ONNX with the all-MiniLM-L6-v2 model. The vector store is sqlite-vec—a single `.db` file.
What transport and authentication does it use?
Local Rag uses stdio transport via the MCP SDK. There is no network service; authentication is not required because everything runs locally.
Basic information
More Memory & Knowledge MCP servers
Groundwork
Rarefied-EarthGroundwork: company memory for your AI tools. Docs public. Source closed. Public proof needs no account.
Basic Memory
basicmachines-coAI conversations that actually remember. Never re-explain your project to your AI again. Join our Discord: https://discord.gg/tyvKNccgqN
Tempreon
TempreonPerson-owned, portable AI memory served over MCP. Your knowledge, preferences, and decisions — captured in one assistant, available in all of them.
MCP server for Obsidian
MarkusPfundsteinMCP server that interacts with Obsidian via the Obsidian rest API community plugin
Context Portal MCP (ConPort)
GreatScottyMacContext Portal (ConPort): A memory bank MCP server building a project-specific knowledge graph to supercharge AI assistants. Enables powerful Retrieval Augmented Generation (RAG) for context-aware development in your IDE.
Comments