Matching auth.ts to auth.test.ts misses the test that reaches it three imports away, and running everything is slow. The import graph gives an exact answer plus the chain that explains it — and the same graph then answers the questions nobody schedules time for: dead files, untested files, cycles.
An AST and dependency-graph analyser for TypeScript and JavaScript: it parses the project with ts-morph, builds a bidirectional import graph, and answers which tests a set of changed files reaches.
- The test files a list of changed sources reaches, directly or transitively
- The same answer from a branch diff, with renamed and moved files handled correctly
- The exact import chain connecting a changed file to a test that depends on it
- Type-only changes separated from runtime ones, splitting the tests into must-run and skippable
- API surface changes classified — a removed export reads differently from an added one
- Source files no test can reach, and files nothing imports at all
- Circular import chains detected
- A project-level view: coverage rate and the most-imported files
- A ready test command for Jest, Vitest or Playwright built from the changed files
- Skeleton views of a file with function bodies stripped, for reading structure cheaply
A TypeScript or JavaScript project root, and git for the branch-diff tools — they run git diff --name-only internally. Published on npm as ast-impact-mapper-mcp. After switching branches, refresh_project clears the cached AST so the next call re-parses.
One command — npx -y ast-impact-mapper-mcp
