Local-first MCP server that indexes a codebase into SQLite once and then lets AI agents search it instantly — offline, private, and with zero dependencies via literal substring search, incremental indexing, per-language stats, and root listing.
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., "@Local-first MCP server that indexes a codebase into SQLite once and then lets AI agents search it instantly — offline, private, and with zero dependencies via literal substring search, incremental indexing, per-language stats, and root listing.index my project and search for "TODO" across all roots"
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.
locidx
Local-first code indexer and search. Index a codebase once, then search it instantly — offline, private, and with zero dependencies.
locidx builds a SQLite index of your project, respects .gitignore-style
rules, updates incrementally, and gives you three ways to query it: a CLI, an
interactive TUI, and a Model Context Protocol
server so AI agents can search your code too.
Why locidx?
Zero dependencies. Python 3.9+ standard library only. No
pip installbattle royale — the indexer, CLI, TUI, and MCP server all usesqlite3,curses, andjson.Private and local-first. Everything lives in SQLite files on your machine. No network, no telemetry, no "send us your code" to get search.
Fast and incremental. Only files whose mtime changed are re-read. Searching reads the database, never the filesystem.
gitignore-aware. Real
.gitignoresemantics: negation, anchoring,**, directory-only patterns — plus optional--ignoreglobs and per-directory.locidxignorefiles.One tool, three interfaces. Terminal, TUI, and MCP — the same index serves all three.
Related MCP server: Code-Index-MCP
Install
# From source (no install needed to run — just clone and use ./locidx)
git clone https://github.com/wenn-id/locidx
cd locidx
# Or install the package (creates the `locidx` command)
python -m pip install .You can also run it straight from the checkout without installing:
python -m locidx.cli --helpQuick start
# 1. Index a project (creates .locidx.sqlite inside it)
locidx index ~/src/myproject --stats
# 2. Search it
locidx find "def parse_" ~/src/myproject
# 3. Language stats
locidx stats --json ~/src/myprojectGlobal database
By default locidx index creates a per-project database
(.locidx.sqlite in the indexed folder). That keeps everything self-contained
and shareable.
For a single machine-wide index across many projects, add --global:
locidx index ~/src/project-a --global
locidx index ~/src/project-b --global
locidx search "TODO" --global # searches every indexed root
locidx roots # list all indexed roots
locidx clear # wipe the global indexCLI reference
Command | Description |
| Build or update the index |
| Search inside a project's own index |
| Search the global index |
| Per-language file/line stats |
| List indexed roots |
| Wipe the global index |
Interactive TUI
locidx tui [PATH]/— enter a search queryj/k— move through resultso— open the selected file in$VISUAL/$EDITORg/G— jump to top / bottomq— quit
The TUI is a thin wrapper over the same search core, so results in the terminal and the TUI are always identical.
MCP server
locidx speaks the Model Context Protocol over stdio, so any MCP client
(Claude, code agents, custom tooling) can search your indexed code with
structured results.
# Run the server directly
locidx mcpConfigure it in your MCP client, e.g. Claude Desktop:
{
"mcpServers": {
"locidx": {
"command": "locidx",
"args": ["mcp"]
}
}
}MCP tools
Tool | Description |
| Literal substring search; returns matching lines with paths and line numbers |
| Incrementally index a directory |
| Per-language file/line statistics |
| List every indexed root |
The server is a minimal JSON-RPC 2.0 implementation over stdio with zero
dependencies — no mcp SDK required.
How it works
┌─────────────────────────────┐
.gitignore ──► │ │
│ locidx index PATH │
source tree ──► │ ┌──────────────────┐ │
│ │ incremental walk │─────┼──► .locidx.sqlite
│ └──────────────────┘ │ (SQLite)
└─────────────────────────────┘
│
┌─────────────┼──────────────┐
▼ ▼ ▼
locidx find locidx stats locidx mcp
(CLI) (CLI/TUI) (MCP server)locidx indexwalks the tree, applies ignore rules, and stores each text file's path, size, mtime, a SHA-256 content hash, and the text itself in SQLite.Unchanged files (same size + mtime) are skipped on subsequent runs.
Queries (
find,stats, TUI, MCP) read only from SQLite — the filesystem is never touched again.
Ignore rules
locidx honors .gitignore and .locidxignore files at any depth, plus
--ignore globs:
# .gitignore
*.log # everywhere
build/ # directory only
/src/generated/ # anchored
!keep.log # re-include
node_modules/ # handled out of the box--no-ignore disables all ignore handling.
Project layout
locidx/
├── locidx/
│ ├── cli.py # argparse CLI
│ ├── tui.py # curses TUI
│ ├── indexer.py # incremental walk + content hashing
│ ├── search.py # literal substring search
│ ├── stats.py # language detection + aggregation
│ ├── ignore.py # gitignore-style matching
│ ├── db.py # tiny SQLite wrapper (schema + helpers)
│ ├── mcp.py # MCP entrypoint
│ ├── server.py # JSON-RPC 2.0 stdio server
│ └── tools.py # agent-friendly tool wrappers
└── tests/ # stdlib unittest suite (runs in CI without install)Development
# Run the test suite (stdlib only)
python -m unittest discover -s tests -v
# Or with pytest, if you have it
python -m pytest -qCI runs the same unittest command across Python 3.9–3.12.
License
MIT — do whatever you want with it, but please star it if it saves you time.
This server cannot be installed
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-qualityAmaintenanceDocdex is a lightweight, local documentation indexer/search daemon. It runs per-project, keeps an on-disk index of your markdown/text docs, and serves top-k snippets over HTTP or CLI for any coding assistant or tool—no external services or uploads required.Last updated1,56016MIT
- Alicense-qualityAmaintenanceLocal-first code indexer that provides deep code understanding for Claude and other LLMs with symbol/text search across 48+ languages, semantic search capabilities, and real-time index updates through the Model Context Protocol.Last updated54MIT
- Alicense-qualityCmaintenanceA local code indexing and search library that enables AI agents to perform semantic and keyword searches across codebases using tree-sitter and SQLite. It provides tools for indexing projects and finding precise code definitions without requiring external APIs, Docker, or server infrastructure.Last updated1,430332MIT
- AlicenseBqualityAmaintenanceLocal code context engine for Codex App/CLI that indexes code with SQLite/sqlite-vec for hybrid search and context packing to provide relevant files, line numbers, snippets, and paths.Last updated7282Apache 2.0
Related MCP Connectors
A loc_id to its bounding box, centroid, and polygon, with its name and admin level.
Reverse geocode latitude/longitude to loc_id; resolve loc_ids to boundaries, centroids, hierarchy.
Convert latitude/longitude to the deepest administrative loc_id plus its full parent chain.
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/wenn-id/locidx'
If you have feedback or need assistance with the MCP directory API, please join our Discord server