Reflex logo

Reflex

by reflex-search

Offline MCP code search with symbol lookup, references, dependency graphs, AST queries, and automatic index updates.

Install Reflex

Run the project’s own setup commands, in order.

Setup steps from the project

reflex-search/reflex installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    npm install -g reflex-search
    
  2. 2. Add to Claude Code
    claude mcp add-json --scope user reflex '{"type":"stdio","command":"rfx","args":["mcp"],"alwaysLoad":true}'
    
  3. 3. Add to Claude Code
    claude mcp add-json --scope project reflex '{"type":"stdio","command":"rfx","args":["mcp"],"alwaysLoad":true}'
    

Overview

reflex-search/reflex provides local, offline code search and navigation for AI coding agents through a standard stdio MCP process. It combines a trigram index with Tree-sitter-based symbol and AST analysis across 18 languages, covering search, references, dependencies, and import-graph inspection. Reach for it when agents need deterministic repository exploration, especially on large codebases where symbol-aware queries and whole-tree analysis matter. Each tool refreshes stale indexed files before responding unless the server is run with update checks disabled.

Use cases

  • Search large repositories for symbols and text
  • Trace all references to a definition
  • Inspect direct and reverse dependencies
  • Find circular or unused import-graph components
  • Summarize an unfamiliar codebase for an agent

Key features

  • Offline trigram-indexed code search
  • Symbol and reference navigation
  • Dependency and import-graph analysis
  • Tree-sitter AST queries
  • Automatic stale-index updates
  • JSON-friendly, token-conscious results

Tools9

What Reflex lets your agent do. Expand a tool for its parameters.

Self-reported~213 tokens of context

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked

Recent health check succeeded.

22/23 checks healthy over the last 112d

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars82Stargazers on the source repository.
Last commit16d agoMost recent push to the default branch.
Tools exposed9Callable tools this server registers over MCP.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Reflex works

What reflex-search/reflex does

reflex-search/reflex connects AI coding assistants to a local index of a project’s source files. Its MCP interface supports full-text and symbol search, file-and-line discovery, reference lookup, dependency inspection, import-graph analysis, AST queries, and codebase summaries. The project also provides a standalone rfx command-line interface for interactive searches, scripts, and JSON output.

The server is designed for offline use and returns deterministic results from the local checkout. It supports 18 languages and is particularly useful when an agent needs to find every use of a symbol, inspect module relationships, or search a large repository without loading unnecessary file content.

How it works

Reflex builds a trigram-based index for fast text queries and uses Tree-sitter for symbol and syntax-aware operations. Search results can include line numbers and context, while location-only queries reduce returned content when an agent only needs file paths and line numbers.

The index is maintained automatically. Before answering, MCP tools update changed files or create a missing index; index_project can force a rebuild. check_index_status reports whether the index matches the files on disk without changing it. The --no-update option makes the MCP process answer from the existing index instead.

Identifiers match as whole names by default. Substring matching, case-insensitive search, regular expressions, result counts, generated-file inclusion, and lock-file inclusion are available through tool options. Generated and lock files remain excluded from normal results unless explicitly requested.

Setup and configuration

Install the CLI with either npm or Cargo:

Terminal
npm install -g reflex-search
cargo install reflex-search

From a project directory, create an index with rfx index. To expose the MCP interface, register a stdio server using command rfx and argument mcp. Claude Code can be configured with a user-wide or project-specific MCP registration. Other MCP-compatible clients can use the same stdio command and argument arrangement.

Most tools appear by default. Additional tools can be enabled in ~/.reflex/config.toml:

toml
[mcp]
extra_tools = ["search_ast", "gather_context"]

The index-management tools can be exposed with rfx mcp --no-update.

Tools and capabilities

  • search_code performs full-text or symbol searches, including regular expressions and count-only results.
  • list_locations returns compact file-and-line matches.
  • find_references combines a symbol definition with its usage sites.
  • get_dependencies lists imports or reverse dependents, with configurable traversal depth.
  • analyze reports import-graph summaries, hotspots, circular dependencies, unused components, or isolated sections.
  • search_ast runs Tree-sitter AST queries; supplying a glob is required.
  • gather_context summarizes project structure and type.
  • index_project forces indexing, while check_index_status checks index freshness without updating it.

Limitations and notes

AST queries are slower than ordinary indexed searches and should be narrowed with a glob. A one-off scan of a mid-sized repository may still be better served by ripgrep. Reflex is intended for cases where linear search is insufficient, such as symbol navigation, dependency analysis, and exhaustive searches across large trees.

The MCP tool list is intentionally limited by default because each advertised schema adds tokens to agent turns. Older names for counting, dependency, and import-graph operations remain accepted but are deprecated in favor of the consolidated tools and their options.

Written by AllMCPs with AI assistance from the project’s README and listing data. How we build listings

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Reflex

reflex-search/reflex is an MCP server that connects AI coding assistants to a local indexed codebase for offline exploration. Its main tools search code, locate symbols, find references, inspect dependencies, analyze import graphs, run AST queries, and summarize project context through the `rfx mcp` stdio interface.

Install the `reflex-search` CLI with npm or Cargo, then register `rfx mcp` as a stdio MCP server. Use `npm install -g reflex-search` or `cargo install reflex-search`; run `rfx index` from the project root before searching.

Yes, reflex-search/reflex works with Cursor because it exposes a standard stdio MCP server. Configure Cursor to launch `rfx` with the `mcp` argument, using the project directory as the codebase to index.

No, reflex-search/reflex is designed to run locally and offline. It indexes files from the local project and serves MCP search and code-navigation results without requiring a cloud service.

The MCP tools update changed files or build a missing index before answering. Use `check_index_status` to inspect freshness without updating, `index_project` to force indexing, or `rfx mcp --no-update` to disable automatic updates.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewReflex AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/reflex-search-reflex?style=directory)](https://allmcps.com/mcp/reflex-search-reflex)
HTML Embed
<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>