Srclight logo

Srclight

by srclight

Indexes local codebases for symbol search, call graphs, semantic queries, git intelligence, and document extraction.

Install Srclight

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "srclight-srclight": {
      "command": "uvx",
      "args": [
        "srclight"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

We couldn’t confirm it starts correctly

The install command installed and started the server, which then stopped for configuration (such as an API key) that our sandbox does not have — expected for servers that connect to your account.

uvx srclight

Process exited before answering initialize.

This is an experimental automated check and can have false negatives — missing environment variables, a slow cold install, etc. It doesn’t necessarily mean something’s wrong. Last checked .

Overview

srclight/srclight builds a local, searchable index of codebases using SQLite FTS5, tree-sitter, and optional embeddings. MCP tools cover symbol and source search, call relationships, semantic retrieval, codebase maps, change impact, git intelligence, and index coverage. Reach for it when an AI coding agent needs structured code navigation across one or more repositories instead of repeated grep and file reads. It runs offline, supports incremental indexing, and can use Ollama for local semantic embeddings.

Use cases

  • Search unfamiliar repositories by symbol, source text, or meaning
  • Trace callers and callees before changing a function
  • Estimate the impact of Git changes before committing
  • Check index freshness and uncovered file extensions
  • Query several local repositories from one workspace

Key features

  • SQLite FTS5 and tree-sitter code indexing
  • Symbol, source, documentation, semantic, and hybrid search
  • Call graphs, relationship resolution, and impact analysis
  • Incremental indexing with Git refresh hooks
  • Multi-repository workspace search
  • Local document extraction and optional OCR

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

35/36 checks healthy over the last 112d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 11d ago via OSV.dev · srclight (PyPI)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars61Stargazers on the source repository.
Last commit20d agoMost recent push to the default branch.
Install checkRunsOur sandbox started it; it then asked for an API key or config.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Srclight works

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.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Srclight

srclight/srclight is an MCP server that connects AI coding agents to local codebase indexes, providing tools for symbol and source search, call graphs, semantic retrieval, codebase maps, Git change analysis, freshness checks, and document extraction. It uses SQLite FTS5, tree-sitter, and optional local embeddings.

Install it with `pip install srclight`, or clone the repository and run `pip install -e .` from the checkout. Python 3.11 or newer is required, and Git is needed for change intelligence and automatic reindex hooks.

Yes, srclight/srclight works with Cursor. It is exposed as an MCP server and is also described as compatible with Claude Code and MCP clients generally.

Semantic search uses embeddings, with Ollama providing an optional local embedding backend. Hybrid search combines semantic results with keyword search through reciprocal-rank fusion, and Ollama is not required for symbol or keyword-based indexing and search.

Declare the extension during indexing with a mapping such as `srclight index --ext .zz=cpp`. The declaration is saved in the index, so later Git hook reindexes continue using it; `--ext none` clears declarations.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSrclight AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/srclight-srclight?style=directory)](https://allmcps.com/mcp/srclight-srclight)
HTML Embed
<a href="https://allmcps.com/mcp/srclight-srclight"><img src="https://allmcps.com/api/badge/srclight-srclight?style=directory" alt="Srclight on AllMCPs" /></a>