# @mongeai/rastro [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/MongeAI/rastro  
**GitHub Stars:** 0  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/mongeai-rastro

## Description
Follow the trail of your code: a local-first, explorable map of JavaScript/TypeScript projects where every relationship links to the line that proves it.

## Claude Desktop Quick Installation
No generated config for this server: it installs through its own setup steps.

The project's own setup steps (from https://github.com/MongeAI/rastro), copied verbatim. Follow them in order; they are not an mcpServers config.

1. Install:

```sh
cd rastro
```

2. Install:

```sh
npm install
```

3. Run:

```sh
npm run build
```

4. Add to Claude Code:

```sh
claude mcp add --transport stdio rastro -- npx -y @mongeai/rastro@0.2.1 mcp
```

## Documentation

## 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:

```bash
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:

```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.

_Full upstream README: https://allmcps.com/mcp/mongeai-rastro/readme_

