# Srclight

A local code-indexing MCP server for AI coding agents that combines SQLite full-text search, tree-sitter parsing and embeddings into a single searchable index, replacing many rounds of grep and file reads with direct symbol, call-graph and semantic queries.

Srclight builds a per-repository index, stored as a single SQLite file, that an AI coding agent can query directly instead of running many grep or glob searches to orient itself in a codebase. Tools cover symbol search, caller and callee relationship graphs, community detection, change-impact analysis showing which callers a proposed edit would break, git-derived change intelligence such as blame and hotspots, semantic search over code and documentation, and build-system awareness, across nineteen programming languages parsed with tree-sitter plus ten document formats such as PDF, DOCX and scanned images through optional OCR.

Indexing is incremental, based on a content hash of each file, runs fully offline with local Ollama embeddings, and can span multiple repositories in one workspace by attaching several SQLite databases together. Search combines four modes, symbol name, source-code trigram, stemmed documentation and semantic embedding search, fused with reciprocal rank fusion for a single ranked result set, and a status tool reports which file extensions a given indexing run walked past so an incomplete answer is never mistaken for a complete one.

It is written in Python, works as an MCP server with Claude Code, Cursor and similar agents, and runs fully locally with no cloud dependency.

Website: https://srclight.dev
