Provides on‑demand code structure insights by indexing projects, locating symbols, and analyzing dependencies for AI assistants.
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.
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.
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.
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.
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.
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
Index a codebase to create a navigable, visual file tree and collect symbols for quick exploration.
Fuzzy search for functions, classes, or symbols and return exact symbol objects with path and line numbers.
Perform impact analysis to identify what would break or be affected by a given symbol change, based on references across the codebase.
Identify what a symbol depends on, including calls and imports, to understand dependency chains.