Local MCP server for exploring project structure, finding code symbols, and assessing potential change impact.
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
We haven't yet run this listing's install command through our automated sandbox check. This isn't a red flag β we're steadily working through the catalog.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
Inspect callable tools, capabilities, and parameters exposed to AI agents by Xray.
AI assistants struggle with codebase understanding. You get:
XRAY gives AI assistants code navigation capabilities. Add use XRAY tools to your prompt:
XRAY provides three focused tools:
explore_repo) - See project structure with symbol skeletonsfind_symbol) - Locate functions and classes with fuzzy searchwhat_breaks) - Find where a symbol is referencedFor the quickest setup, this script automates the uv installation process.
XRAY uses ast-grep, a tree-sitter powered structural search tool, providing accurate parsing for:
ast-grep ensures structural accuracy - it understands code syntax, not just text patterns.
Stateless design - No database, no persistent index. Each operation runs fresh ast-grep queries for real-time accuracy.
Traditional grep searches text. ast-grep searches code structure:
def authenticate() or function authenticate() definitionsThis structural approach provides clean, accurate results essential for reliable code intelligence.
focus_dirs to zoom into specific parts of large codebasesXRAY helps AI assistants avoid information overload while providing deep code intelligence where needed.
XRAY performs on-demand structural analysis using ast-grep. There's no database to manage, no index to build, and no state to maintain. Each query runs fresh against your current code.
getting_started.md for modern installationexplore_repo("/path/to/project")find_symbol("/path/to/project", "UserService")what_breaks(symbol)XRAY bridges the gap between simple text search and complex LSP servers:
A simple tool that helps AI assistants navigate codebases more effectively than text search alone.
The current implementation of XRAY is the result of a rigorous evaluation of multiple code analysis methodologies. My journey involved prototyping and assessing several distinct approaches, each with its own set of trade-offs. Below is a summary of the considered architectures and the rationale for my final decision.
Naive Grep-Based Analysis: I initially explored a baseline approach using standard grep for symbol identification. While expedient, this method proved fundamentally inadequate due to its inability to differentiate between syntactical constructs and simple text occurrences (e.g., comments, strings, variable names). The high signal-to-noise ratio rendered it impractical for reliable code intelligence.
Tree-Sitter Native Integration: A direct integration with tree-sitter was evaluated to leverage its powerful parsing capabilities. However, this path was fraught with significant implementation complexities, including intractable errors within the parser generation and binding layers. The maintenance overhead and steep learning curve for custom grammar development were deemed prohibitive for a lean, multi-language tool.
Language Server Protocol (LSP): I considered leveraging the Language Server Protocol for its comprehensive, standardized approach to code analysis. This was ultimately rejected due to the excessive operational burden it would impose on the end-user, requiring them to install, configure, and manage separate LSPs for each language in their environment. This friction conflicted with my goal of a lightweight, zero-configuration user experience.
Comby-Based Structural Search: Comby was explored for its structural search and replacement capabilities. Despite its promising feature set, I encountered significant runtime instability and idiosyncratic behavior that undermined its reliability for mission-critical code analysis. The tool's performance and consistency did not meet my stringent requirements for a production-ready system.
ast-grep as the Core Engine: My final and current architecture is centered on ast-grep. This tool provides the optimal balance of structural awareness, performance, and ease of integration. By leveraging tree-sitter internally, it offers robust, syntactically-aware code analysis without the complexities of direct tree-sitter integration or the overhead of LSPs. Its reliability and rich feature set for structural querying made it the unequivocal choice for XRAY's core engine.
XRAY is a minimal-dependency code intelligence system that enhances AI assistants' understanding of codebases. This guide shows how to install and use XRAY with the modern uv package manager.
For the quickest setup, use the one-line installer from the README.md. This will handle everything for you.
Run XRAY directly without installation using uvx:
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/srijanshukla18-xray)<a href="https://allmcps.com/mcp/srijanshukla18-xray"><img src="https://allmcps.com/api/badge/srijanshukla18-xray?style=directory" alt="Xray on AllMCPs" /></a>