Home / MCP / XRAY MCP Server

XRAY MCP Server

Provides on‑demand code structure insights by indexing projects, locating symbols, and analyzing dependencies for AI assistants.

python
Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
    "mcpServers": {
        "xray": {
            "command": "xray-mcp",
            "args": []
        }
    }
}

XRAY MCP Server provides lightweight, on‑demand code intelligence that helps AI assistants understand codebases. It exposes concise actions to index projects, locate symbols, and analyze dependencies, all without requiring heavy language servers or persistent state. You can use XRAY to give your AI prompts precise, structural insights about your codebase.

How to use

You interact with the XRAY MCP Server through your MCP client by issuing prompts that invoke its three core capabilities. Use the prompt augmentation to trigger XRAY tools and get structured results that your AI can reason over.

How to use

1) Build or index your project so XRAY can analyze its structure. Ask your MCP client to index the current directory or a specific path. XRAY will return a visualized file tree and symbol snapshots for quick navigation.

How to use

2) Find symbols with fuzzy search. Request a search for a function, class, or symbol name. XRAY returns the exact symbol objects with name, type, path, and line numbers to help you pinpoint locations quickly.

How to use

3) Assess impact and dependencies. Ask what would break if you change a method or which symbols reference a given symbol. XRAY returns references and an overall count to guide your edits safely.

How to use

4) Combine these steps in prompts by appending use XRAY tools, for example: Analyze the UserService class and show me what would break if I change the authenticate method. use XRAY tools

Available tools

build_index

Index a codebase to create a navigable, visual file tree and collect symbols for quick exploration.

find_symbol

Fuzzy search for functions, classes, or symbols and return exact symbol objects with path and line numbers.

what_breaks

Perform impact analysis to identify what would break or be affected by a given symbol change, based on references across the codebase.

what_depends

Identify what a symbol depends on, including calls and imports, to understand dependency chains.