srclight

srclight

Deep code indexing for AI agents

SQLite FTS5 + tree-sitter + embeddings + MCP

$ pip install srclight
25
MCP tools
7
Languages
3
FTS5 indexes
1
SQLite file

Why Srclight

Minimal dependencies

Single SQLite file per repo. No external databases, no Docker, no cloud services. Just a .srclight/ directory alongside your code.

Fully offline

Local embeddings via Ollama. Your code never leaves your machine. Works on air-gapped networks and private repos.

Hybrid search

Keyword (FTS5 trigram + porter stemmer) fused with semantic embeddings via Reciprocal Rank Fusion. The best of both worlds.

Multi-repo workspaces

ATTACH multiple SQLite databases and UNION across schemas. Query your entire codebase as one, with batch rotation for the 10-ATTACH limit.

Tree-sitter parsing

Precise symbol extraction: functions, classes, methods, interfaces, structs. With call graph edges and type hierarchies.

GPU-accelerated

Optional CuPy backend for GPU-resident vector cache. Sub-3ms semantic queries over tens of thousands of symbols.

Get started in 60 seconds

1

Install

One pip install. No compilation, no system deps beyond Python 3.10+.

pip install srclight
2

Index

Point at any repo. Tree-sitter parses symbols, FTS5 indexes everything, optionally generate embeddings.

srclight index /path/to/repo srclight index --embed \ qwen3-embedding /path/to/repo
3

Serve

Start the MCP server. Connect from Claude Code, Cursor, Windsurf, or any MCP client.

srclight serve \ --workspace myworkspace