About srclight/srclight
srclight/srclight is an MCP server published by srclight in the Data category: deep code indexing MCP server for AI agents. 25 tools: hybrid FTS5 + embedding search, call graphs, git blame/hotspots, build system analysis. Multi-repo workspaces, GPU-accelerated semantic search, 10 languages via tree-sitter. Fully local, zero cloud dependencies. Conduid read 43 tools from its source: blame_symbol, changes_to, check_freshness, codebase_map, conversation_summary, detect_changes and 37 more. It is published to PyPI as srclight and runs with uvx.
The repository has 61 stars and 13 forks, is licensed MIT, and its last commit was on 10 Nov 2026. The latest release is v0.25.3 (15 Sep 2026): Build script: the engine build script no longer has a built-in macOS build host. It follows v0.25.2 (15 Sep 2026), and the 5 most recent releases go back to v0.24.0 (3 Sep 2026). It passes 4 of the 6 static checks Conduid ran on the repository; it does not pass Dependencies pinned and Scoped permissions. Its topics include embeddings, devtools, code-search, fts5, code-indexing and code-intelligence.
Install
uvx srclightpip install srclightgit clone https://github.com/srclight/srclightTools (43)
blame_symbolGet git blame info for a symbol — who changed it, when, and why.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to blame |
changes_toGet the change history for a specific symbol's file.| Parameter | Type | Description |
|---|---|---|
| n | integer | Number of commits to return |
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Symbol name to track |
check_freshnessIs the index current for these files (or the whole index)?| Parameter | Type | Description |
|---|---|---|
| paths | array | Repo-relative paths to check. Omit to check every indexed file (cheap: unchanged files cost one stat each). |
| project | string | Project name (required in workspace mode). |
codebase_mapGet a complete overview of the indexed codebase.| Parameter | Type | Description |
|---|---|---|
| project | string | Optional project filter (workspace mode only) |
conversation_summaryRecord a conversation session summary.| Parameter | Type | Description |
|---|---|---|
| cost_usd | number | Estimated cost in USD |
| model | string | Model used (e.g. 'claude-opus-4-6') |
| project | string | Primary project worked on (if any) |
| session_id * | string | Unique session identifier |
| task_summary * | string | Brief description of what was done |
| tokens_in | integer | Input tokens consumed |
| tokens_out | integer | Output tokens generated |
detect_changesDetect which symbols were changed and compute their aggregate blast radius.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| ref | string | Git ref to diff against (default: uncommitted changes vs HEAD). Use "HEAD~1" for last commit's impact, or a branch name. |
embedding_healthCheck if the configured embedding provider is reachable.| Parameter | Type | Description |
|---|---|---|
| project | string |
embedding_statusCheck embedding coverage and model info.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (workspace mode) or uses current repo |
find_dead_codeFind symbols that have no callers or references — potential dead code.| Parameter | Type | Description |
|---|---|---|
| kind | string | Filter by symbol kind (e.g., 'function', 'class', 'method') |
| project | string | Project name (required in workspace mode) |
find_importsFind and resolve import statements in a source file.| Parameter | Type | Description |
|---|---|---|
| path * | string | Relative file path (e.g., 'src/srclight/server.py') |
| project | string | Project name (required in workspace mode if ambiguous) |
find_patternSearch for structural code patterns in symbol bodies.| Parameter | Type | Description |
|---|---|---|
| kind | string | Filter by symbol kind (e.g., 'function', 'method') |
| language | string | Filter by language (e.g., 'python', 'javascript') |
| limit | integer | Maximum results (default 50) |
| offset | integer | Skip this many matching symbols before collecting (default 0). With `truncated`, this pages through a result set larger than `limit`. |
| pattern * | string | Regex pattern to search for in symbol source code |
| project | string | Optional project filter (workspace mode: filters to one project) |
get_build_targetsGet all build targets (libraries, executables) from the build system.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
get_calleesFind all symbols that a given symbol calls or references.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to find callees for |
get_callersFind all symbols that call or reference a given symbol.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to find callers for |
get_communitiesGet detected functional communities (module clusters) in the call graph.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
get_communityGet the community that a specific symbol belongs to, with all co-members.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to look up |
get_dependentsFind all symbols that depend on (call/reference) a given symbol.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to find dependents for |
| transitive | boolean | If True, follow the dependency chain recursively |
get_execution_flowsGet traced execution flows through the call graph.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
get_impactCompute blast radius and risk for modifying a symbol.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to analyze |
get_implementorsFind all classes that implement or inherit from an interface/base class.| Parameter | Type | Description |
|---|---|---|
| interface_name * | string | Name of the interface or base class |
| project | string | Project name (required in workspace mode) |
get_platform_variantsFind platform-specific variants of a symbol.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Symbol name to search for |
get_signatureGet just the signature of a symbol (lightweight, for planning).| Parameter | Type | Description |
|---|---|---|
| name * | string | Symbol name |
get_symbolGet full details of a symbol by name.| Parameter | Type | Description |
|---|---|---|
| name * | string | Symbol name (e.g., 'Dictionary', 'lookup', 'main') |
| project | string | Optional project filter (workspace mode only) |
get_tests_forFind test functions that cover a given symbol.| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (required in workspace mode) |
| symbol_name * | string | Name of the symbol to find tests for |
get_type_hierarchyGet the inheritance hierarchy for a class or struct.| Parameter | Type | Description |
|---|---|---|
| name * | string | Class or struct name (e.g., 'ICaptureService', 'TtsProvider') |
| project | string | Project name (required in workspace mode) |
git_hotspotsFind most frequently changed files (churn hotspots / bug magnets).| Parameter | Type | Description |
|---|---|---|
| n | integer | Number of files to return (default 20) |
| project | string | Project name (required in workspace mode) |
| since | string | Time period (e.g., '30.days', '3.months', '1.year') |
hybrid_searchSearch using both keyword matching AND semantic similarity.| Parameter | Type | Description |
|---|---|---|
| kind | string | Optional filter by symbol kind |
| limit | integer | Max results (default 20) |
| project | string | Project name (workspace mode) or uses current repo |
| query * | string | Search query (works with both keywords and natural language) |
index_statusCheck the current state of the code index.learning_statsGet learning statistics — counts by kind over time.| Parameter | Type | Description |
|---|---|---|
| days | integer | Look back N days (omit for all time) |
| project | string | Filter to a specific project (omit for all) |
list_projectsList all projects in the workspace with stats.platform_conditionalsList all platform-conditional code blocks in the project.| Parameter | Type | Description |
|---|---|---|
| platform | string | Optional filter (e.g., 'windows', 'linux', 'apple', 'android') |
| project | string | Project name (required in workspace mode) |
recent_changesGet recent git commits with files changed.| Parameter | Type | Description |
|---|---|---|
| author | string | Filter by author name (substring match) |
| n | integer | Number of commits to return (default 20) |
| path_filter | string | Filter by file path prefix (e.g., 'src/libdict/') |
| project | string | Project name (workspace mode) or uses current repo |
record_learningRecord a learning — a decision, correction, discovery, pattern, blocker, or convention.| Parameter | Type | Description |
|---|---|---|
| confidence | number | 0.0-1.0 confidence level (default 1.0) |
| content * | string | The learning itself (what was decided/discovered/corrected) |
| kind * | string | One of 'decision', 'correction', 'discovery', 'pattern', 'blocker', 'convention' |
| project | string | Project this applies to (omit for cross-project learnings) |
| reasoning | string | Why this learning matters or the context behind it |
| scope | string | 'workspace', 'project', 'file', or 'symbol' |
| source_ref | string | Reference identifier (session ID, file path, etc.) |
| source_type | string | 'conversation', 'labbook', 'decisions_md', 'claude_md', 'agent_log' |
| symbols | array | Symbol names this learning relates to |
| ttl_days | integer | Auto-expire after N days (omit for permanent) |
reindexTrigger re-indexing of the codebase or a specific path.| Parameter | Type | Description |
|---|---|---|
| embed | boolean | Also refresh embeddings, using the model this index already holds (or SRCLIGHT_EMBED_MODEL for an index that holds none yet). Pass False for a keyword-only refresh when you only need search_symbols current: embedding a large backlog calls the embedding model and can take minutes. Not free, though — a reindex drops the embeddings of every symbol it replaces, and with embed=False nothing puts them back, so semantic_search and hybrid_search lose coverage on exactly the files being edited. Does nothing when no model is configured or recorded. |
| path | string | Optional specific directory to re-index (default: entire repo) |
relevant_learningsFind relevant learnings using hybrid search (keyword + semantic).| Parameter | Type | Description |
|---|---|---|
| kind | string | Filter by kind: 'decision', 'correction', 'discovery', 'pattern', 'blocker', 'convention' |
| limit | integer | Max results (default 10) |
| project | string | Filter to a specific project (omit for all) |
| query * | string | What you're looking for (natural language or keywords) |
restart_serverRequest the server to exit so a process manager can restart it (SSE only).search_symbolsSearch for code symbols (functions, classes, methods, structs, etc.).| Parameter | Type | Description |
|---|---|---|
| kind | string | Optional filter: 'function', 'class', 'method', 'struct', 'enum', etc. |
| limit | integer | Max results to return (default 20) |
| project | string | Optional project filter (workspace mode only, e.g. 'my-app') |
| query * | string | Search query — a symbol name or code fragment (keyword/FTS, not semantic) |
semantic_searchFind semantically similar code using embeddings.| Parameter | Type | Description |
|---|---|---|
| kind | string | Optional filter by symbol kind (function, class, method, etc.) |
| limit | integer | Max results (default 10) |
| project | string | Project name (workspace mode) or uses current repo |
| query * | string | Natural language description of what you're looking for |
server_statsReturn when this server process started and how long it has been running.setup_guideStructured setup instructions for AI agents and users.show_statusShow the srclight dashboard window and return current status.| Parameter | Type | Description |
|---|---|---|
| message | string | Optional message to display in the dashboard. |
symbols_in_fileList all symbols defined in a specific file.| Parameter | Type | Description |
|---|---|---|
| path * | string | Relative file path (e.g., 'src/libdict/dictionary.cpp') |
| project | string | Project name (required in workspace mode if ambiguous) |
whats_changedShow uncommitted changes (work in progress).| Parameter | Type | Description |
|---|---|---|
| project | string | Project name (workspace mode) or uses current repo |
Security checks
Static checks derived from the repository 10 days ago. Heuristics on the source, not an audit.
- ✓README presentThe repository's README runs to about 4.9K words.
- ✓License declaredThe repository declares the MIT license.
- ✓Tests presentA test suite exists in the repository.
- !Dependencies pinnedNo lockfile anywhere in the repository. Installs can pull different code over time.
- ✓No dynamic code executionScanned 30 source files and found no eval, dynamic Function or shell execution.
- !Scoped permissionsDoesn't declare a permission scope. Assume it can do anything its process can.
What the source scan found
- Transport
- stdio, Streamable HTTP and HTTP with SSEsrc/srclight/cli.py:461, src/srclight/server.py:3485, src/srclight/cli.py:461
- Starts other programs
- 5 callssrc/srclight/cli.py:991, src/srclight/git.py:21, src/srclight/indexer.py:264
- Outbound network calls
- 8 callssrc/srclight/embeddings.py:142, src/srclight/embeddings.py:167, src/srclight/embeddings.py:187
- Writes or deletes files
- 16 callssrc/srclight/cli.py:1066, src/srclight/cli.py:1082, src/srclight/cli.py:1084
- Lockfile
- None in the repository
Pattern matches on the source text of 30 files: places to read, not proof of what the code does at run time.
Releases
README
The repository's README runs to about 4.9K words, fetched a month ago. The original in the repository is authoritative.
Read full README