Back to browse
GitHub Repository

Reflex - The instant, code-aware local search engine.

60 starsRust

Reflex – local code search engine and MCP server for AI coding

by therecluse26·Mar 1, 2026·1 point·0 comments

AI Analysis

●●●BangerShip ItSolve My ProblemBig Brain

MCP server gives Claude fast, token-efficient codebase knowledge without loading raw files.

Strengths
  • MCP architecture is the insight: AI gets accurate symbol resolution and dependency traces at 10% the token cost—solved a real pain point in AI-assisted coding.
  • Trigram + Tree-sitter combo deterministically finds every occurrence, not just definitions—beats symbol-only search for real refactoring and debugging.
  • Incremental reindexing on branch switches is instant; no waiting for full rebuilds, no infra overhead.
Weaknesses
  • CLI-only at launch—no first-class IDE integration (though MCP is the bridge; still feels text-interface-heavy for daily use).
  • Rust dependency and local indexing setup required; adoption depends on devs adopting MCP as the standard for AI coding workflows.
Target Audience

Developers using AI coding assistants (Claude Code, Continue), teams managing large codebases, engineers frustrated with hosted code search tools.

Similar To

Sourcegraph · Ripgrep · Tabnine (codebase-aware)

Post Description

I built Reflex after getting frustrated with hosted code search tools' infrastructure overhead, slow reindexing and accuracy limitations as drift occurs between the index and local state. It's a local-first code search engine written in Rust that combines trigram indexing with Tree-sitter symbol extraction and static dependency analysis.

The MCP server is what I get the most value from. Claude Code and other AI coding assistants can search your codebase, find symbol definitions, trace dependencies, and navigate across branches without ever loading raw file contents into the context window. It gives the AI accurate knowledge of your codebase at a fraction of the token cost.

Switching branches is instant. Reflex reindexes only what changed, so you're never waiting for a full reindex when jumping between branches. You can index any branch in seconds on your laptop with no server, no configuration, and no cost.

Other things it does:

- Full-text search via trigram indexing (finds every occurrence, not just definitions) - Symbol-aware search with Tree-sitter (filter by function, class, struct, etc.) - Dependency analysis: what imports a file, what a file imports, circular deps, dead code - Incremental reindexing via blake3 hashing (only reindexes changed files) - Fully offline, all data stays on your machine

Install: npm install -g reflex-search or cargo install reflex-search

Happy to answer any questions about the implementation or use cases.

Similar Projects

Developer Tools●●●Banger

Srclight – Deep code indexing MCP server (FTS5 and Tree-sitter)

Tree-sitter + FTS5 + MCP = tokens saved for AI agents to actually code, not search.

WizardryBig BrainZero to One
srclight
103mo ago
Developer Tools●●●Banger

Local, privacy-first MCP code intelligence in Rust

AST-aware codebase search and onboarding beats grep, ships as local MCP server.

Big BrainSolve My ProblemWizardry
avirajkhare
103mo ago
Developer Tools●●Solid

A universal code formatter using Rust, Tree-sitter, and Rhai

Neatify exposes AST-level formatting as live Rhai scripts, so you write real code to shape output instead of tweaking a dozen JSON flags. The Tree-sitter backbone means any language with a grammar can be targeted, and the repo-first flavoring plus LLM-assisted script generation is a smart, practical twist. It's clearly early-stage (defaults modify files in-place and coverage is limited), but the architecture is an interesting alternative to opinionated, black-box formatters.

WizardryNiche Gem
its-a-new-world
233mo ago