SuperAPIAI Directory

srclight

github.com · AI coding

Code indexing with SQLite FTS5, tree-sitter and embeddings for symbol search, call graphs, git intelligence and hybrid semantic search.

Open website Alternatives
PricingOpen source开源项目(可免费自部署)
PlatformsLinux

About this tool

Srclight is a deep code indexing MCP server for AI coding agents. It uses SQLite FTS5, tree-sitter, and embedding vectors to build a rich, searchable index of codebases, enabling AI coding agents to query instantly and replacing large numbers of grep/glob calls with precise structured lookups. It is officially described as the most comprehensive code intelligence MCP server currently available, offering 42 tools covering capabilities such as symbol search, relationship graphs, community detection, impact analysis, Git change intelligence, semantic search, build system awareness, and documentation extraction. Code is processed entirely locally and never leaves the user's machine.

Main capabilities

  • Indexing and search: a single SQLite file per repository, with no need for Docker, Redis, or a vector database; supports incremental indexing, reindexing only files whose content hash has changed; provides 4 search modes—symbol names, source code (trigram), documentation (stemmed), and semantic (embedding vectors); hybrid search fuses keyword and semantic results via RRF.
  • Language and document support: supports 19 languages, including Python, C, C++, C#, Java, Kotlin, Swift, Dart, Go, Rust, JavaScript, TypeScript, PHP, Lua, Bash, SQL, Groovy, CMake, and Markdown, and includes fragment files such as .inc, .inl, .ipp, and .tcc; custom extensions can also be declared via --ext; supports 10 document formats, including PDF, DOCX, XLSX, HTML, CSV/TSV, email (.eml), images (PNG/JPG/SVG, etc.), plain text, RST, and Markdown; optional OCR uses PaddleOCR to process scanned/image-only PDF pages and pytesseract to process images.
  • Indexing transparency: index_status reports indexed_extensions (all suffixes read) and unindexed_extensions (extensions skipped in the last run and the file counts), as well as oversize_skipped and failed_files; every symbol/graph result carries index_freshness, marked as "verified-fresh" or indicating which files are stale, missing, or unindexed;check_freshness(paths?) can probe paths or the entire index on demand.
  • Relationship graph and resolution labels: call/called-by edges carry resolution labels explaining how the target was selected, including same_file, unique_file, import, same_dir, or name_only; names appearing only in comments or strings do not become edges.
  • Git change intelligence: provides git blame, hotspot analysis, and can automatically re-index via git post-commit/post-checkout hooks.
  • Semantic search: each symbol's name, signature, docstring, and content are embedded as floating-point vectors and stored in the symbol_embeddings table in SQLite; after indexing, a .npy sidecar snapshot is built and loaded into GPU VRAM (cupy) or CPU RAM (numpy) to speed up search; semantic_search(query) embeds the query and runs cosine similarity; hybrid_search(query) fuses FTS5 keyword results with embedding results via RRF. The embedding model only needs to be specified once via --embed at first indexing; afterward the index records the model and reuses it; the resolution order is --embed > the model recorded in the index > SRCLIGHT_EMBED_MODEL.
  • Multi-repository workspace: can search multiple repositories simultaneously, each repository keeps its own .srclight/index.db, and queries join across schemas via SQLite ATTACH and UNION; Git submodules are not indexed automatically and must be cloned separately and added as independent workspace projects.
  • MCP integration: supports two transport modes, stdio (one server per session) and SSE (persistent server, multiple sessions); SSE is recommended for workspaces; works with Claude Code, Cursor, Claude Desktop, OpenClaw (via mcporter), and any MCP client.
  • CLI: every MCP tool is accessible from the command line, output is the tool's JSON to stdout, exit code 0 means success, 1 means a tool error, 2 means a usage error.
  • Strict parameter validation: since v0.20.2, the MCP server rejects unknown tool parameters instead of silently discarding them; each toolDeclare additionalProperties: false.

Usage

After installation, indexing, searching, and inspection can be performed via the CLI, for example srclight index; it can also run as an MCP server, for example srclight serve --workspace myworkspace (default SSE port 8742). Configure the MCP server in clients such as Claude Code and Cursor to use it. SSE mode supports multiple concurrent sessions and can withstand client restarts.

Use Cases

Suitable for developers using AI coding agents for codebase navigation, symbol lookup, call relationship analysis, impact analysis, Git change understanding, cross-repository search, and natural language semantic search. The official statement points out that AI coding agents typically spend 40-60% of tokens on locating code, and Srclight aims to eliminate this waste.

Limitations and Dependencies

  • Requires Git (for change intelligence and automatic reindexing hooks).
  • Semantic search/embeddings require Ollama (optional).
  • GPU-accelerated vector search requires an NVIDIA GPU and cupy (optional).
  • PaddleOCR scanned PDF support requires Poppler (optional).
  • Fully offline, no API calls, can run in air-gapped environments (using Ollama local embeddings).
  • The index database and embedding files may be large and should not be committed to version control; srclight index will exclude .srclight/ from Git via the repository-local .git/info/exclude, and will not edit the tracked .gitignore.
  • Skipping embeddings is not without cost: reindexing changed files discards the embeddings of replaced symbols, the skipped process will not restore them, and semantic coverage will decay on files being edited.
  • In workspace mode, search_symbols, get_symbol, codebase_map, and hybrid_search accept an optional project filter; graph/Git/build/community tools require a project parameter in workspace mode.
  • More information on billing, pricing, platform support, etc. is not yet provided in the materials.
Up/Down to navigate · Enter to open · ESC to closeBrowse all tools