Skip to content
LOCAL CODE SEARCH

The right piece of code, right when you need it.

Give your AI agent the right context. LCS finds the useful files and lines, directly in your repository.

Rust CLI · Windows, Linux and macOS · Open source
~/my-project
lcs search "where is the keyboard shortcut handled?"
Matching passagehybrid
src/editor/shortcuts.ts:24-29
export function handleShortcut(event: KeyboardEvent) {
  if ((event.ctrlKey || event.metaKey) && event.key === "k") {
    event.preventDefault();
    openCommandPalette();
  }
}

Start with an intention

Find a behavior, even without knowing the function name.

Combine words and meaning

Hybrid search combines keywords and semantic similarity to find the right passage.

Search on your machine

The model and index stay local, with no remote search service or telemetry.

Give your agent context

Connect Claude Code, Codex or Cursor to your code through the MCP server.

Return to the right line

Get the file, lines and snippet, or jump directly to a definition.

Keep up with code changes

Indexing processes modified files; watch follows changes in your project.

CLAUDE CODE × LCS

Less searching.
Better finding.

With LCS, Claude Code finds more of the files it needs, in fewer steps.

21 %
fewer steps
+5
points of recall
13 tickets · Opus 5.5
Claude Code alone
69 %files found

10.4 steps / ticket

Claude Code + LCS
74 %files found

8.2 steps / ticket

The benchmark

The same 13 tickets from one project, fresh sessions, one run per configuration at maximum effort. LCS includes its MCP server and instructions. Mean per-ticket recall rises from 69% to 74%; mean steps fall from 10.4 to 8.2. This measures expected files found, not elapsed time or successful fixes. Two measured configurations on an illustrative curve without a scale. Method and results on GitHub ↗

Claude Code → Local Code SearchClaude Code connects to the local LCS MCP server, which exposes search, def and status. It receives files, lines and code snippets.stdioClaude CodeLocal Code SearchMCPsearchSearch codedefDefinitionstatusIndex statusfile · lines · snippet
MCP CONNECTION

The right context, straight to Claude Code.

LCS gives your agent the files, lines and snippets it needs for the task.

claude mcp add --scope project local-code-search -- lcs serve

Run lcs index in your project, then approve the server in Claude Code.

Give your agent the right context.

Download lcsView on GitHub