skill · curated · mcp · code-search · local-first · Aug 27, 2026 · 2 min read
claude-context-local: Semantic Code Search Without the Cloud Tax
Semantic code search for Claude — running entirely on your machine, no API calls, no per-query token cost.
What it actually does
Most coding agents navigate a codebase by either reading every file (expensive) or relying on your ability to grep the right keyword. claude-context-local adds a third option: real semantic search, where you can ask "where does the auth middleware validate tokens?" and get the right function even if neither "auth" nor "validate" appears in its name.
It does this by running Google’s EmbeddingGemma model locally to embed your codebase on first setup, then storing those embeddings on disk. Claude Code talks to it over MCP — no cloud round-trip, no tokens burned on retrieval.
The indexer is reasonably smart: it uses AST chunking for Python and tree-sitter for JS/TS/Go/Java/Rust/C/C++/C# instead of naive line-by-line splitting, so the chunks it searches are actual code units — functions, classes, methods — not random 200-token blobs.
When it earns its place
The sweet spot is large, private codebases. If you’re working on a 300k-line internal monorepo and don’t want every context window front-loaded with file contents (or billed to an embeddings API), this covers that gap.
It also pairs naturally with Claude’s existing tools: rather than replacing your editor’s "go to definition," it handles the "find all places we handle payment errors" queries that text search makes painful.
The real limitations
Setup isn’t zero-friction. The EmbeddingGemma model weighs in at ~1.2–1.3 GB, so the first run involves a non-trivial download and potentially a Hugging Face token if model gating requires it. CPU inference works but is noticeably slow on large repos — you’ll want an NVIDIA or Apple Silicon GPU to make re-indexing fast enough not to be annoying.
The project is also honest about its beta status: core functionality works, but formal benchmarks are still “coming soon.” Don’t treat the search quality as production-grade without testing it against your own codebase first.
Credit and install
Built by FarhanAliRaza. The project lives at github.com/FarhanAliRaza/claude-context-local. Requires Python 3.12+.
curl -fsSL https://raw.githubusercontent.com/FarhanAliRaza/claude-context-local/main/scripts/install.sh | bash