Local offline full-text and symbol-aware code search with dependency analysis and MCP integration for AI agents.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
One-click editor setup isnβt available for this listing yet β we donβt have a confirmed install command, and weβd rather show nothing than point your editor at the wrong package or host. Follow the projectβs own setup instructions, linked above.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Reflex.
search_codeFull-text or symbol search with line numbers and context
list_locationsFast file+line discovery (minimal tokens)
count_occurrencesQuick match statistics without full content
search_regexRegex pattern matching across the codebase
search_astStructure-aware search via Tree-sitter AST queries
find_referencesSymbol definition + all usage sites in a single call; the primary code-navigation tool for AI agents
Sub-100ms local code search β CLI, scripts, and AI agents
Reflex is a local-first, full-text code search engine. Use it from the command line, pipe it into scripts, or connect it to AI coding assistants (Claude Code, Cursor, and any MCP-compatible tool) for instant symbol lookup, dependency analysis, and codebase exploration β fully offline, fully deterministic, no cloud required.
Add this to your Claude Code MCP configuration (~/.claude/claude_desktop_config.json):
Your AI assistant can now call search_code, find_references, get_dependencies, and more.
See Claude Code + Reflex MCP Quickstart for MCP setup, key tools, and troubleshooting.
| Capability | grep / ripgrep | Built-in AI search | Sourcegraph | Reflex |
|---|---|---|---|---|
| Full-text search | β | β | β | β |
| Symbol-aware filtering | β | Partial | β | β |
| Dependency analysis | β | β | Partial | β |
| Deterministic results | β | β | β | β |
| Local-first / offline | β | β | β | β |
| MCP server built-in | β | β | β | β |
| JSON output for agents | Manual | β | β | β |
We A/B-tested an AI coding agent on real code-search tasks using Reflex (via MCP) against the same agent using its built-in search (ripgrep-backed Grep/Glob) β identical tasks, model, and repository, paired per task. The harness lives in benches/efficacy/ and is fully reproducible.
Setup: model claude-sonnet-4-6; 12 code-search tasks (find-all-usages, symbol locate, dependency/reverse-dependency, hotspot, comprehension, plus negative controls); N = 3 replicates per arm; run against the Reflex repository.
Results β Reflex Γ· built-in, so < 1.0 means Reflex uses less:
| Metric | Reflex Γ· built-in | Reading |
|---|---|---|
| Task success rate | 1.00 (100% vs 100%) | Equal correctness β no regression |
| Total tokens (median over tasks) | β 1.00 | Parity |
| Find-all-usages tokens | 0.79 | Favors Reflex (CI still includes parity) |
| Agent iterations / turns (mean) | 0.85 | ~15% fewer round-trips |
| Cost per task (median) | 0.69 | ~31% cheaper (p < 0.01) |
Implications
find_references returns a symbol's definition and every call site in one call, so the agent iterates less than chaining grep + file reads.Honest caveats. This is a focused benchmark: one model, one repository, N = 3 β enough to demonstrate parity-to-better and no regression, not a large statistical claim (the token primary is formally "no significant difference," with point estimates favoring Reflex). Per-result precision/recall is not yet formally scored. Reproduce it yourself:
When connected via MCP, your AI assistant gets these tools:
| Tool | What it does |
|---|---|
search_code | Full-text or symbol search with line numbers and context |
list_locations | Fast file+line discovery (minimal tokens) |
count_occurrences | Quick match statistics without full content |
search_regex | Regex pattern matching across the codebase |
search_ast | Structure-aware search via Tree-sitter AST queries |
find_references | Symbol definition + all usage sites in a single call; the primary code-navigation tool for AI agents |
index_project | Trigger or refresh the search index |
check_index_status | Check whether the index is fresh, stale, or missing; call before any search session or after git operations |
get_dependencies | All imports for a specific file |
get_dependents | All files that import a given file (reverse lookup) |
get_transitive_deps | Transitive dependency graph up to a configurable depth |
find_hotspots | Most-imported files (dependency hotspots) |
find_circular | Detect circular dependency chains |
find_unused | Files with no incoming dependencies |
find_islands | Disconnected components in the dependency graph |
analyze_summary | High-level dependency counts and metrics |
gather_context | Codebase structure and project-type summary |
Index not found error? If an MCP tool returns "Index not found. Run 'rfx index' to build the cache first", call index_project first, then retry the failed tool.
Reflex also works as a standalone CLI for humans and shell scripts.
Interactive TUI mode β run rfx query with no pattern to launch live search with keyboard navigation.
Requires an AI provider configured via rfx llm config (OpenAI, Anthropic, OpenRouter, or any OpenAI-compatible endpoint).
Run rfx <command> --help for full options.
Setup note: run rfx commands from your project root directory. Add .reflex/ to your .gitignore to exclude the search index from version control.
Full symbol extraction (functions, classes, methods, types, etc.) for 15 languages:
Systems: Rust, C, C++, Zig
Backend: Python, Go, Java, C#, PHP, Ruby, Kotlin
Frontend: TypeScript, JavaScript, Vue, Svelte
Swift is temporarily disabled (tree-sitter-swift 0.7.x grammar incompatibility).
rfx query --lang swiftemits a warning; full-text search still works.
Full-text search works on all file types regardless of parser support.
For AI provider configuration (rfx ask, rfx pulse), run rfx llm config.
Reflex uses a trigram-based inverted index with runtime symbol detection:
content.bin; no tree-sitter parsing at index timerfx serve binds to 127.0.0.1:7878 by default β loopback only, no authentication. Do not expose it to the network. See CLAUDE.md for the full threat model.
Factual signals from GitHub, npm, and our automated checks β not a rating.
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/reflex-search-reflex)<a href="https://allmcps.com/mcp/reflex-search-reflex"><img src="https://allmcps.com/api/badge/reflex-search-reflex?style=directory" alt="Reflex on AllMCPs" /></a>