Xray logo

Xray

by srijanshukla18

Maps codebases, finds symbols, and estimates reference impact across Python, JavaScript, TypeScript, and Go.

Install Xray

Pick your client, then add it in one click or paste the config.

STDIOPython
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "srijanshukla18-xray": {
      "command": "uvx",
      "args": [
        "--from",
        "git+https://github.com/srijanshukla18/xray",
        "xray-mcp"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

The srijanshukla18/xray MCP server gives AI assistants structural code-navigation tools for repository mapping, fuzzy symbol search, and reference analysis. It uses ast-grep and tree-sitter parsing rather than plain text matching, supporting Python, JavaScript, TypeScript, and Go. Its stateless operations run against the current project without a persistent database or index. Reach for it when an assistant needs progressive repository discovery or a quick estimate of what may depend on a symbol.

Use cases

  • Map unfamiliar repository structure before editing
  • Find functions or classes by approximate name
  • Inspect likely references before changing a symbol
  • Focus analysis on selected directories in a large codebase

Key features

  • Progressive repository exploration
  • Fuzzy structural symbol search
  • Potential reference and impact analysis
  • Python, JavaScript, TypeScript, and Go support
  • ast-grep and tree-sitter parsing
  • Stateless on-demand analysis

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.

32/33 checks healthy over the last 112d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 6d ago via OSV.dev · xray-mcp (PyPI)

Adoption & maintenance

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

GitHub stars52Stargazers on the source repository.
Last commit1mo agoMost recent push to the default branch.
Directory activity2 viewsConfig copies, upvotes, and views on AllMCPs.

How Xray works

What srijanshukla18/xray does

The srijanshukla18/xray MCP server exposes three code-intelligence operations through MCP:

  • explore_repo maps a project directory and can include symbol skeletons, signatures, and docstrings.
  • find_symbol searches for functions, classes, methods, and related symbols using fuzzy matching.
  • what_breaks reports likely references to a selected symbol and returns a count with a note describing the search basis.

The tools are intended for progressive discovery. An assistant can first inspect directory structure, then request symbol details for selected folders, locate a target symbol, and examine possible callers or references before proposing a change.

Supported languages are Python, JavaScript, TypeScript, and Go. The available symbol forms include Python functions, classes, methods, and async functions; JavaScript and TypeScript functions, classes, arrow functions, imports, interfaces, and type aliases; and Go functions, structs, interfaces, and methods.

How it works

srijanshukla18/xray uses ast-grep, which relies on tree-sitter for syntax-aware structural searches. This avoids treating every occurrence in a comment, string, or unrelated variable as a symbol definition. The server runs ast-grep queries on demand and does not maintain a database or persistent project index.

Repository exploration accepts options such as focus_dirs, include_symbols, and max_depth. These allow an MCP client to begin with a small directory view and expand only the areas relevant to the task. Symbol extraction is described as cached per Git commit, while analysis remains based on the current repository contents.

Impact analysis is reference-oriented rather than a complete semantic dependency graph. After find_symbol returns a symbol object, that object can be passed to what_breaks to search for likely uses across the project.

Setup and configuration

The srijanshukla18/xray MCP server requires Python 3.10 or newer and the ast-grep external binary. The recommended installation path uses uv: clone the repository, enter its directory, and run uv tool install .. An installation script is also provided to automate setup with uv.

The repository includes mcp-config-generator.py for producing client configuration. Its documented examples generate configurations for Cursor, Claude with Docker, and VS Code using different launch modes, including local Python and source-based setups. The README also provides a separate getting-started guide for the modern installation flow.

Tools and capabilities

  • Explore a repository tree with optional symbol information.
  • Narrow exploration to selected directories or a maximum depth.
  • Fuzzy-find functions, classes, and other supported symbols.
  • Return symbol paths and line numbers from search results.
  • Identify potential references to a selected symbol.
  • Analyze code structurally across four supported language families.

As a Developer Tools listing, srijanshukla18/xray fits workflows where an MCP-enabled coding assistant needs repository orientation, symbol lookup, or preliminary change-impact checks without configuring language servers for each language.

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 Xray

srijanshukla18/xray is an MCP server that connects AI assistants to local codebases through ast-grep-based analysis. Its main tools are explore_repo for project structure, find_symbol for fuzzy symbol lookup, and what_breaks for locating potential references. It supports Python, JavaScript, TypeScript, and Go without a persistent index.

Install it with uv by cloning the repository, entering its directory, and running `uv tool install .`. The repository also provides an installation script that automates the uv setup process.

Yes, the repository includes a configuration-generator example for Cursor. Run `python mcp-config-generator.py cursor local_python` to generate a Cursor configuration for a local Python launch.

It supports Python, JavaScript, TypeScript, and Go. The supported syntax includes language-specific functions, classes, methods, imports, and other constructs described by the project, using ast-grep for structural parsing.

No, it does not maintain a database or persistent index. Each operation runs ast-grep queries against the current code, while symbol extraction may be cached per Git commit for repeated runs.

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 PreviewXray AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/srijanshukla18-xray?style=directory)](https://allmcps.com/mcp/srijanshukla18-xray)
HTML Embed
<a href="https://allmcps.com/mcp/srijanshukla18-xray"><img src="https://allmcps.com/api/badge/srijanshukla18-xray?style=directory" alt="Xray on AllMCPs" /></a>