srclight: Fully Local Code Indexing MCP Server with Ollama Embeddings

✍️ OpenClawRadar📅 Published: February 25, 2026🔗 Source
srclight: Fully Local Code Indexing MCP Server with Ollama Embeddings
Ad

What srclight Does

srclight is an MCP (Model Context Protocol) server that provides deep code indexing with semantic search capabilities that run entirely on your local machine. Your code never leaves your system, and there are no API keys or cloud calls required.

Technical Stack

  • Parsing: tree-sitter AST parsing for 11 languages: Python, C, C++, C#, JavaScript, TypeScript, Dart, Swift, Kotlin, Java, Go
  • Keyword Search: SQLite FTS5 with 3 indexes: symbol names with camelCase/snake_case splitting, trigram for substring matching, Porter stemmer for docstrings
  • Embeddings: Ollama for local embeddings (qwen3-embedding default, nomic-embed-text also works)
  • Vector Search: cupy for GPU-accelerated cosine similarity (~3ms on 27K vectors on RTX 3090) with numpy fallback (~105ms) if no GPU available
  • Hybrid Search: Reciprocal Rank Fusion (RRF, k=60) combining FTS5 keyword results with embedding-based semantic results

Embedding Implementation

The embedding system uses .npy sidecar files that load to GPU VRAM once, then serve all queries from VRAM. Cold start takes ~300ms, with subsequent queries at ~3ms each. The system is incremental—only re-embeds symbols whose content hash has changed. A full embed of 45K symbols takes ~15 minutes with qwen3-embedding, while incremental updates are instant.

Ad

Available Tools

srclight provides 25 MCP tools total:

  • Symbol search (FTS5 + semantic + hybrid RRF)
  • Relationship graph (callers, callees, transitive dependents, implementors, inheritance tree, test coverage)
  • Git change intelligence (blame per symbol, hotspot detection, uncommitted WIP, commit history)
  • Build system awareness (CMake, .csproj targets and platform conditionals)
  • Multi-repo workspaces using SQLite ATTACH+UNION across repos, allowing search across 10+ repos simultaneously

Deployment and Performance

The author indexes 13 repos (45K symbols) in a workspace. Everything is stored in a single SQLite file per repo—no Docker, Redis, vector database, or cloud embedding APIs required. Git hooks (post-commit, post-checkout) keep the index fresh automatically.

According to the author's survey of 50+ MCP code search servers across major registries, most are grep wrappers or require cloud embedding APIs (OpenAI, Voyage). srclight is described as the only one combining local FTS5 keyword search + local Ollama embeddings + GPU-accelerated vector cache + git intelligence + multi-repo workspaces in a single pip install.

Compatibility and Installation

Works with any MCP client including Claude Code, Cursor, Windsurf, Cline, and VS Code. Installation is via pip install srclight. The project is MIT licensed and fully open source at https://github.com/srclight/srclight.

📖 Read the full source: r/LocalLLaMA

Ad

👀 See Also

js-notepad: A Scriptable Notepad with Built-in MCP Server for Claude Code
Tools

js-notepad: A Scriptable Notepad with Built-in MCP Server for Claude Code

js-notepad is a free, open-source scriptable notepad application built with Claude Code assistance. It features a built-in MCP server, allowing Claude Code to directly interact with the app for reading/writing pages, executing scripts, creating todos, and pushing results.

OpenClawRadar
Pepper MCP Server for iOS Simulator Interaction and Debugging
Tools

Pepper MCP Server for iOS Simulator Interaction and Debugging

Pepper is an MCP server that injects a dylib into iOS simulator apps via DYLD_INSERT_LIBRARIES, enabling real-time interaction, screen reading, button tapping, variable inspection, and network traffic monitoring through a WebSocket bridge.

OpenClawRadar
Jean-Claude: A Satirical LLM Frontend Mocking EU AI Regulation, with 412 Cookie Partners and VAT Invoices Every 5 Messages
Tools

Jean-Claude: A Satirical LLM Frontend Mocking EU AI Regulation, with 412 Cookie Partners and VAT Invoices Every 5 Messages

Jean-Claude is a satirical LLM frontend that applies extreme EU-style bureaucracy to AI usage: 412 cookie partners, four-eyes principle requiring co-signature, per-token CO₂ tracking with mandatory €offset, VAT invoices every 5 messages, and a compliance center with fake GDPR/AI Act metrics.

OpenClawRadar
Reflect MCP Server Implements Reflexion Paper for Persistent Coding Agent Memory
Tools

Reflect MCP Server Implements Reflexion Paper for Persistent Coding Agent Memory

A developer implemented the Reflexion paper (Shinn et al., NeurIPS 2023) as an MCP server to give local coding agents persistent memory of their mistakes. The system uses regex-based pattern matching on error messages and stores lessons in SQLite with FTS5.

OpenClawRadar