# ast-impact-mapper-mcp [Health: Active]

**Category:** 💻 Developer Tools  
**Repository:** https://github.com/vola-trebla/ast-impact-mapper-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 244  
**Views:** 1  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/ast-impact-mapper-mcp

## Description
MCP server that uses TypeScript AST to find which tests are affected by a code change

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "ast-impact-mapper-mcp": {
    "command": "npx",
    "args": ["--","-y","ast-impact-mapper-mcp"]
  }
}
```

## Documentation

## What ast-impact-mapper-mcp MCP server does

ast-impact-mapper-mcp MCP server examines a TypeScript or JavaScript project and maps relationships between source files, tests, imports, and declarations. Its primary use is impact analysis: given changed files, it finds tests that transitively depend on them and can explain the import chain connecting a test to a modified source file.

The server also provides codebase analysis beyond test selection. It can identify files with no incoming imports, locate circular dependency paths, report direct imports and importers, inspect declaration-level dependencies, and summarize test coverage gaps and high-risk modules. Additional analysis checks whether a change affects the public API or is limited to internal implementation details.

## How it works

The project is parsed through the TypeScript AST using ts-morph. The server builds cached dependency information in both directions, allowing it to move from a changed file to affected tests or from a file to its importers and dependencies. `explain_impact` returns an import chain for a selected source/test pair, while `get_dependency_graph` can return JSON or a Mermaid flowchart.

Git-based tools can compare the current project with a base branch. `get_affected_tests_by_branch` uses a branch comparison, and `get_rename_aware_diff` tracks renames with a similarity threshold while ignoring formatting-only changes. After changing branches or pulling updates, `refresh_project` invalidates the cached AST and dependency graphs.

For TypeScript-specific review, `differentiate_type_impact` examines types, interfaces, and type-only imports to indicate whether a change has runtime impact. `analyze_api_surface_mutation` compares a file with its `HEAD` version to classify public API changes versus internal refactors.

## Tools and capabilities

The ast-impact-mapper-mcp MCP server exposes tools in four main areas:

- **Impact mapping:** Find affected tests, explain import paths, compare branches, and produce commands for Jest, Vitest, or Playwright.
- **TypeScript analysis:** Separate type-only changes from runtime changes, inspect API mutations, generate signature-focused skeletons, and trace symbol dependencies.
- **Graph health:** Find unreachable modules, detect architectural cycles, inspect dependency graphs, and identify files without test import coverage.
- **Project reporting:** Produce test summaries and clear cached project analysis.

`generate_skeleton_view` removes function and method bodies while retaining signatures, line numbers, and optionally JSDoc. `get_symbol_dependency_graph` can trace a named symbol or a complete file, with forward, reverse, or bidirectional traversal.

## Setup and configuration

Install the package globally with `npm install -g ast-impact-mapper-mcp`, or configure a client to launch it through `npx -y ast-impact-mapper-mcp`. The documented client configuration uses the server name `ast-impact-mapper` and starts the package as a command-line MCP process.

Each analysis call supplies an absolute `project_root`. Other arguments identify changed files, source directories, entry points, test runners, branch names, or individual files and symbols. Most options have documented defaults, including `main` as the comparison branch, Vitest as the default runner, JSON as the dependency graph format, and a limit of 50 results for selected reports.

## Limitations and notes

Results depend on the project’s TypeScript/JavaScript import structure and the accuracy of the parsed project. A file with no incoming imports may still be a legitimate entry point, so unreachable-module analysis accepts explicit entry points to exclude from warnings. Cached graphs should be refreshed after branch changes or remote updates.

The test-command generator produces commands for supported runners only: Jest, Vitest, and Playwright.

_Full upstream README: https://allmcps.com/mcp/ast-impact-mapper-mcp/readme_

