# srclight/srclight [Health: Active]

**Category:** 🗄️ Databases  
**Repository:** https://github.com/srclight/srclight  
**GitHub Stars:** 61  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/srclight-srclight

## Description
Deep code indexing MCP server with SQLite FTS5, tree-sitter, and embeddings. 29 tools for symbol search, call graphs, git intelligence, and hybrid semantic search.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `uvx` (confidence: high):

```json
"mcpServers": {
  "srclight": {
    "command": "uvx",
    "args": ["srclight"]
  }
}
```

## Documentation

## What srclight/srclight does

srclight/srclight indexes local repositories so MCP-compatible coding agents can query code structure, text, relationships, and changes through structured tools. Its index uses SQLite FTS5 for search, tree-sitter for source parsing, and optional embeddings for semantic retrieval. The project is aimed at reducing orientation work during tasks such as debugging, refactoring, and understanding unfamiliar modules.

The index is stored locally, with one SQLite file per repository. Multiple repositories can also be searched together through a workspace that attaches their SQLite indexes. Content hashes allow subsequent runs to process only changed files.

## How it works

Run the command-line indexer against a repository, then expose the resulting index through the MCP server. Search can target symbol names, source text, documentation, or embeddings. Hybrid search combines keyword and semantic results using reciprocal-rank fusion.

Tree-sitter parsing supports a broad set of languages, including Python, C and C++, C#, Java, Kotlin, Swift, Dart, Go, Rust, JavaScript, TypeScript, PHP, Lua, Bash, SQL, Groovy, CMake, Markdown, and declared custom extensions. Include fragments such as `.inc`, `.inl`, `.ipp`, and `.tcc` are handled as source files according to their content or an explicit extension mapping.

Git integration supports change analysis and automatic refresh through post-commit and post-checkout hooks. Optional Ollama embeddings provide local semantic search without sending code to an external service.

## Setup and configuration

Install the package from PyPI with `pip install srclight`, or install an editable checkout with `pip install -e .`. Python 3.11 or newer and Git are required. Ollama is optional and is used for embeddings and semantic search. GPU acceleration can use NVIDIA hardware with CuPy.

Document indexing extras support formats such as PDF, DOCX, XLSX, HTML, images, email, CSV/TSV, plain text, RST, and Markdown. OCR requires additional packages; scanned-PDF OCR also requires Poppler, while image OCR requires Tesseract. Custom source extensions can be registered during indexing, for example `srclight index --ext .zz=cpp`. These declarations are stored in the index and remain available to hook-triggered reindexes.

## Tools and capabilities

The MCP interface includes tools for:

- Symbol, source, documentation, semantic, and hybrid search
- Finding callers, callees, and other symbol relationships
- Building codebase maps and inspecting project indexes
- Analyzing Git changes and estimating change impact
- Searching across multiple repositories
- Extracting text from supported documents
- Checking index freshness and reporting skipped, failed, or oversized files
- Inspecting indexed and unindexed extensions

Tool arguments are validated strictly. Unknown parameters are rejected rather than ignored, and each tool disallows undeclared properties. Results involving symbols or graphs include freshness information when it can be checked.

## Limitations and notes

Results describe the indexed state of a repository. A `verified-fresh` marker confirms that the relevant files match the indexed bytes; stale results identify files that changed, disappeared, or were not indexed. Reindex or inspect the live files before relying on stale bodies or line numbers.

Coverage depends on recognized or explicitly declared extensions, installed language grammars, readable document dependencies, ignored paths, and file-size limits. The index reports skipped extensions, failed files, and oversized files so callers can identify gaps. Relationship resolution is strongest for same-file, unique-file, import, and same-directory matches. A `name_only` edge is a ranked candidate rather than a confirmed reference and should be verified separately.

_Full upstream README: https://allmcps.com/mcp/srclight-srclight/readme_

