localmind
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
LocalMind
Give every AI agent perfect memory of your codebase — offline.
LocalMind is a local-first knowledge & context engine for developers and AI coding agents. It indexes your repository into a searchable knowledge base (BM25 + optional embeddings), builds a lightweight import graph, answers questions with citations, and exposes everything through a CLI and an MCP server.
Why LocalMind?
Pain | LocalMind |
AI agents forget project context | Persistent local index + MCP tools |
Cloud RAG leaks private code | 100% local by default (SQLite) |
Grep is not enough for questions | BM25 ranking + extractive / generative answers |
“What depends on this file?” | Import / link knowledge graph |
Works without API keys. Optional OpenAI or Ollama for embeddings and generative answers.
Related MCP server: grepnotes
Quick start
Requirements: Node.js ≥ 22.5
Install from npm
npm install -g @ixxrllg/localmind
# in any project
localmind init
localmind index
localmind ask "Where is authentication handled?"
localmind search "jwt middleware"
localmind statusOr without global install:
npx @ixxrllg/localmind init
npx @ixxrllg/localmind index
npx @ixxrllg/localmind ask "Where is authentication handled?"From source
git clone https://github.com/ixxrllg/localmind.git
cd localmind
npm install
npm run build
node dist/bin/localmind.js init --root /path/to/your/projectCLI
Command | Description |
| Create |
| Walk repo, chunk files, build inverted index (+ optional embeddings) |
| Force full re-index |
| Ranked code/doc search |
| Q&A with citations |
| Files linked via imports / markdown links |
| Index statistics |
| Start MCP server on stdio |
| Show / update config |
Global options:
-r, --root <path> Project root (default: cwd)
-q, --quiet
--verboseExamples
localmind init --provider ollama
localmind index
localmind search "chunkText overlap" --mode bm25
localmind ask "How are files ignored during indexing?" --extractive
localmind related src/indexer/indexer.ts
localmind status --jsonMCP (Cursor / Claude Code / agents)
localmind mcp --root /path/to/your/projectExample MCP config (Cursor / Claude Desktop):
{
"mcpServers": {
"localmind": {
"command": "node",
"args": [
"/absolute/path/to/localmind/dist/bin/localmind.js",
"mcp",
"--root",
"/absolute/path/to/your/project"
]
}
}
}Replace paths with your clone of ixxrllg/localmind and the project you want indexed.
Tools
Tool | Purpose |
| Semantic/lexical search over the index |
| Question answering with citations |
| Graph neighborhood for a path |
| Dump indexed chunks for a file / line range |
| Stats |
| Incremental or full re-index |
How it works
your repo
│
▼
walker + ignore rules (.gitignore, defaults)
│
▼
line-aware chunker ──► SQLite
│ ├─ files / chunks
│ ├─ BM25 inverted index (terms + postings)
│ ├─ import/link edges
│ └─ optional embeddings
▼
search (BM25 / vector / hybrid) ──► ask (extractive or LLM)
│
▼
CLI · MCP · library APIStorage:
.localmind/localmind.db(Node built-innode:sqlite)Default search: BM25 (no network, no models)
Optional: OpenAI / Ollama embeddings + chat
Configuration
.localmind/config.json (created by init):
{
"version": 1,
"provider": "none",
"include": [],
"exclude": [],
"maxFileBytes": 524288,
"chunkSize": 1200,
"chunkOverlap": 150,
"incremental": true
}Environment (optional)
See .env.example:
Variable | Role |
| Embeddings + generative answers |
| Compatible gateways |
| Chat model (default |
| Default |
| Default |
| Local models |
localmind config --provider openai
# or
localmind config --provider ollamaLibrary API
import {
initConfig,
loadConfig,
runIndex,
openDb,
closeDb,
search,
ask,
} from "@ixxrllg/localmind";
const { config } = initConfig({ root: process.cwd() });
await runIndex(config, { full: true });
const db = openDb(config.root);
const hits = await search(db, "authentication middleware");
const answer = await ask(db, config, "How does auth work?");
closeDb(db);Development
npm install
npm run build
npm test
npm run dev -- init
npm run dev -- index
npm run dev -- ask "What is LocalMind?"Requirements:
Node.js ≥ 22.5 (uses built-in
node:sqlite)
Project layout
src/
bin/localmind.ts CLI entry
cli/ Commander program + formatting
core/ config, paths, SQLite
indexer/ walk, chunk, relations, index pipeline
search/ tokenize, BM25, embeddings, hybrid
ask/ extractive + generative Q&A
graph/ related files
mcp/ MCP server + tools
index.ts public exports
tests/ unit + integrationRoadmap
File watcher / live re-index
Tree-sitter aware chunking
sqlite-vec acceleration
Web UI for exploration
Multi-repo workspaces
Contributing
See CONTRIBUTING.md. Issues and PRs welcome.
License
MIT — see LICENSE.
Author
Maintained by @ixxrllg.
This server cannot be deployed
Maintenance
Related MCP Connectors
Shared memory for coding agents. Stop re-explaining your codebase every session.
Token-efficient search for coding agents over public and private documentation.
Your company's shared memory for AI agents: search, remember and cite, per workspace.
1Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to chat with codebases by indexing local directories or GitHub repositories into a vector database for semantic search and code retrieval.16MIT
- AlicenseAqualityDmaintenanceEnables coding agents to search local notes via BM25 keyword ranking, returning relevant passages with file paths and line numbers, fully offline with zero dependencies.3MIT
- AlicenseAqualityAmaintenanceEnables coding agents to query local notes, decisions, docs, and code with hybrid retrieval (BM25 + embeddings + reranking) and get path:line citations. It provides tools like rag_query for full-corpus search and search_knowledge for project-scoped knowledge recall.21MIT
- AlicenseAqualityBmaintenanceEnables semantic and keyword search over a local codebase by chunking source files along function and class boundaries, embedding them offline, and fusing vector and BM25 results. Runs entirely on your machine in a single SQLite file, so AI coding agents can find relevant code with no API keys, telemetry, or cloud calls.711 npmMIT