Skip to content

MCP Tools

Reflex’s MCP server (rfx mcp) exposes 15 tools through the Model Context Protocol. These tools let AI assistants search code, analyze dependencies, and understand your codebase.

Full-text search across the codebase.

ParameterTypeRequiredDescription
querystringyesSearch text
languagestringnoFilter by language
limitintnoMax results

Search with regular expressions.

ParameterTypeRequiredDescription
patternstringyesRegex pattern
languagestringnoFilter by language
limitintnoMax results

Search using Tree-sitter AST patterns.

ParameterTypeRequiredDescription
patternstringyesTree-sitter S-expression
languagestringyesTarget language
limitintnoMax results

Find all locations of a symbol or text pattern.

ParameterTypeRequiredDescription
querystringyesSearch text
symbols_onlyboolnoRestrict to symbol definitions
kindstringnoSymbol kind filter

Count how many times a pattern appears without returning full results.

ParameterTypeRequiredDescription
querystringyesSearch text
languagestringnoFilter by language

Trigger reindexing of the project.

ParameterTypeRequiredDescription
forceboolnoForce full rebuild

Get direct dependencies of a file.

ParameterTypeRequiredDescription
filestringyesFile path

Get files that depend on (import) a given file.

ParameterTypeRequiredDescription
filestringyesFile path

Get the full transitive dependency tree of a file.

ParameterTypeRequiredDescription
filestringyesFile path
depthintnoMax traversal depth

Find files with the highest fan-in (most depended upon).

ParameterTypeRequiredDescription
limitintnoNumber of results

Detect circular dependency chains.

ParameterTypeRequiredDescription
limitintnoMax cycles to return

Find files that are never imported by other files.

ParameterTypeRequiredDescription
limitintnoNumber of results

Find disconnected clusters of files with no dependency relationships to the rest of the codebase.

ParameterTypeRequiredDescription
limitintnoNumber of results

Get a high-level summary of the codebase’s dependency structure.

No parameters.

Collect comprehensive codebase information — project structure, frameworks, entry points, and file statistics. With no parameters, all context types are gathered.

ParameterTypeRequiredDescription
structureboolnoShow directory structure
file_typesboolnoShow file type distribution
project_typeboolnoDetect project type (CLI, library, webapp, monorepo)
frameworkboolnoDetect frameworks and conventions
entry_pointsboolnoShow entry point files
test_layoutboolnoShow test organization pattern
config_filesboolnoList important configuration files
depthintnoTree depth for structure (default: 2)
pathstringnoFocus on a specific directory path

Add Reflex to your MCP client configuration:

{
"mcpServers": {
"reflex": {
"command": "rfx",
"args": ["mcp"],
"cwd": "/path/to/your/project"
}
}
}