Rastro logo

Rastro

by @mongeai

Queries a local JavaScript or TypeScript code graph with evidence-backed search, references, impact, path, route, and architecture tools.

Install Rastro

Run the project’s own setup commands, in order.

Setup steps from the project

@mongeai/rastro installs with its own steps rather than a config we can generate, so these are copied as-is. Follow them in order and run the commands in a terminal. Source: github.com

  1. 1. Install
    cd rastro
    
  2. 2. Install
    npm install
    
  3. 3. Run
    npm run build
    
  4. 4. Add to Claude Code
    claude mcp add --transport stdio rastro -- npx -y @mongeai/rastro@0.2.1 mcp
    

Overview

@mongeai/rastro exposes a local JavaScript/TypeScript repository graph through MCP, letting coding agents inspect entities, relationships, routes, and architecture rules. Its tools return file-and-line evidence and distinguish proven, external, unresolved, and possible relationships. Run it as a stdio server with Node.js 22.12 or newer, pointing it at the project being analyzed. Reach for it when an agent needs code navigation, change-impact analysis, dependency paths, or architecture checks without relying on grep alone.

Use cases

  • Trace callers and callees before editing a function
  • Assess the impact of uncommitted changes or a branch
  • Find shortest proven paths between code entities
  • Check architecture rules during pull-request review
  • List HTTP routes and their handlers

Key features

  • Evidence-backed JavaScript and TypeScript code graph
  • Search across entities, files, folders, routes, and packages
  • Reference and change-impact analysis
  • Architecture rule checking
  • Proven and possible path discovery
  • HTTP route inspection

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.

Adoption & maintenance

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

Last commit1mo agoMost recent push to the default branch.
Directory activity1 viewsConfig copies, upvotes, and views on AllMCPs.

How Rastro works

What @mongeai/rastro does

@mongeai/rastro analyzes JavaScript and TypeScript projects and makes their structure available to MCP clients. The graph covers folders, files, functions, classes, methods, packages, imports, calls, inheritance, and HTTP routes. Agents can use it to answer questions such as who calls a function, what a change may affect, which tests to run, or how one entity reaches another.

Evidence is central to the graph. Relationships include the source file, line number, and code snippet that supports them. Results separate proven relationships from external and possible ones, while unresolved relationships include cases the analyzer cannot establish statically.

The package also provides a browser-based interactive map when run through its CLI, but the MCP entry point is rastro mcp. Analysis runs locally, with no cloud service or mandatory AI component.

How it works

Start the MCP command with a project path, for example:

Terminal
npx -y @mongeai/rastro mcp /path/to/project

When no path is supplied, Claude Code's CLAUDE_PROJECT_DIR is used when available; otherwise the current directory is analyzed. The server communicates over stdio, so an MCP client starts it as a local subprocess.

The analyzer can inspect the repository's current state and supports change-oriented queries. Impact analysis can target selected entities, uncommitted changes, or changes since a branch. Architecture checks read rastro.rules.json; they can report violations introduced by changes or suggest rules that reflect existing code patterns when no rules file is present.

Setup and configuration

The runtime requirement is Node.js 22.12 or newer. Add the server to an MCP client using the package command and the project path. Cursor uses .cursor/mcp.json, VS Code Copilot agent mode uses .vscode/mcp.json, and Claude Code can register the command with its claude mcp add command. A project-scoped Claude Code setup can be shared through a root .mcp.json file.

A minimal generic stdio configuration uses:

config.json
{
  "command": "npx",
  "args": ["-y", "@mongeai/rastro", "mcp", "/path/to/project"]
}

The optional RASTRO_LANG environment variable selects English or Portuguese for the CLI. The interface and CLI support both languages; the CLI also considers system locale settings when this variable and an explicit language flag are absent.

Tools and capabilities

  • rastro_overview reports repository size, entity counts, relationship categories, main folders, routes, frequently called functions, central files, possible unused code, diagnostics, and freshness.
  • rastro_search finds functions, classes, methods, files, folders, routes, and packages by name, qualified method name, or path.
  • rastro_entity returns an entity's location, hierarchy, exports, members, callers, callees, inheritance, imports, and related details. It can include source code.
  • rastro_references lists callers, callees, import relationships, and subclasses with evidence, paging, and depth up to three.
  • rastro_impact identifies potentially affected entities, routes, references, and tests, including a tests-only format.
  • rastro_check evaluates architecture rules and reports violations with relationship kind and source location.
  • rastro_path finds shortest proven chains between entities, files, folders, or external packages, with reverse, file-level, and possible-path results when available.
  • rastro_routes lists HTTP routes with their methods and full paths.

Limitations and notes

Static analysis cannot prove every JavaScript or TypeScript relationship. Dynamic callbacks, computed member calls such as obj[name](), and dynamic imports may remain unresolved, with the reason shown. The graph therefore distinguishes what the code proves from what may be possible rather than inventing connections.

The MCP server is designed for local repositories and requires a supported JavaScript or TypeScript project plus Node.js 22.12 or newer. Analysis freshness and diagnostics are exposed through the overview results.

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 Rastro

@mongeai/rastro is an MCP server that analyzes a local JavaScript or TypeScript repository and exposes its evidence-backed code graph to AI agents. Its tools cover overview, search, entity details, references, impact analysis, architecture checks, paths between entities, and HTTP routes, with file-and-line evidence separating proven from possible relationships.

Run it with Node.js 22.12 or newer using `npx -y @mongeai/rastro mcp /path/to/project`. Add that command as a stdio server in your MCP client. Claude Code, Cursor, and VS Code Copilot each have project configuration locations documented by the package.

Yes, @mongeai/rastro works with Cursor through a stdio entry in `.cursor/mcp.json` or the user-level `~/.cursor/mcp.json`. Configure `npx` with `@mongeai/rastro`, the `mcp` subcommand, and `${workspaceFolder}` as the project path.

@mongeai/rastro requires Node.js 22.12 or newer. The MCP command runs locally with `npx`, and the server analyzes the project path supplied by the client or command line.

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