
Ast Impact Mapper Mcp
This server builds a bidirectional TypeScript dependency graph using ts-morph to answer "which tests should I run?" when files change. It exposes tools like get_affected_tests to trace import chains, differentiate_type_impact to skip tests when only interfaces changed, and explain_impact to show why a test depends on modified code. You also get analyze_api_surface_mutation to detect breaking changes, detect_architectural_cycles for circular imports, and identify_unreachable_modules for dead code. It generates runner-specific commands for vitest, jest, or playwright with only the necessary test files. Reach for this when you want surgical test execution instead of running the full suite on every commit.
- tools
- 15
- transport
- STDIO
- last updated
- May 21, 2026
Tools
15 toolsPublic tool metadata for what this MCP can expose to an agent.
get_affected_testsFinds all test files transitively importing changed source files.
Finds all test files transitively importing changed source files.
No parameter schema in public metadata yet.
get_affected_tests_by_branchAutomatically diffs the current state against a base branch using git to find affected tests.
Automatically diffs the current state against a base branch using git to find affected tests.
No parameter schema in public metadata yet.
get_rename_aware_diffHighly robust branch impact analysis that tracks file moves/renames (via git diff -M) and ignores formatting/whitespace changes.
Highly robust branch impact analysis that tracks file moves/renames (via git diff -M) and ignores formatting/whitespace changes.
No parameter schema in public metadata yet.
explain_impactTraces and explains the exact chain of imports showing why a changed source file affects a specific test.
Traces and explains the exact chain of imports showing why a changed source file affects a specific test.
No parameter schema in public metadata yet.
generate_test_commandConstructs CLI commands for test runners (vitest, jest, or playwright) matching the affected tests subset.
Constructs CLI commands for test runners (vitest, jest, or playwright) matching the affected tests subset.
No parameter schema in public metadata yet.
differentiate_type_impactInspects imports and types to isolate type-only changes (interfaces, types, or import type exports).
Inspects imports and types to isolate type-only changes (interfaces, types, or import type exports).
No parameter schema in public metadata yet.
analyze_api_surface_mutationCompares a file against its HEAD version and determines if it modifies the public API or only contains internal implementation edits.
Compares a file against its HEAD version and determines if it modifies the public API or only contains internal implementation edits.
No parameter schema in public metadata yet.
generate_skeleton_viewGenerates a token-optimized skeleton of a file by stripping out function and method bodies, keeping only signatures, JSDocs, and line numbers.
Generates a token-optimized skeleton of a file by stripping out function and method bodies, keeping only signatures, JSDocs, and line numbers.
No parameter schema in public metadata yet.
get_symbol_dependency_graphTraces declaration-level dependencies (functions, classes, variables) across files, finding internal declarations usage.
Traces declaration-level dependencies (functions, classes, variables) across files, finding internal declarations usage.
No parameter schema in public metadata yet.
identify_unreachable_modulesFinds orphaned source files that have zero incoming imports (dead code safe to prune).
Finds orphaned source files that have zero incoming imports (dead code safe to prune).
No parameter schema in public metadata yet.
detect_architectural_cyclesLocates circular dependency loops which cause unpredictable module initialization orders.
Locates circular dependency loops which cause unpredictable module initialization orders.
No parameter schema in public metadata yet.
get_dependency_graphReturns direct imports/importers of a file in JSON format or as a visual Mermaid TD flowchart.
Returns direct imports/importers of a file in JSON format or as a visual Mermaid TD flowchart.
No parameter schema in public metadata yet.
get_coverage_gapsIdentifies files with zero import coverage — those that are never imported by any test file.
Identifies files with zero import coverage — those that are never imported by any test file.
No parameter schema in public metadata yet.
get_test_summaryProvides a high-level view of test coverage rate, deepest import chains, and high-risk most-imported modules.
Provides a high-level view of test coverage rate, deepest import chains, and high-risk most-imported modules.
No parameter schema in public metadata yet.
refresh_projectInvalidates AST and dependency graphs cache. Run this after checking out branches or pulling remote git updates.
Invalidates AST and dependency graphs cache. Run this after checking out branches or pulling remote git updates.
No parameter schema in public metadata yet.
Sponsors
Readme
🗺️ ast-impact-mapper-mcp ✨
"Stop boiling the ocean. Run only the tests that actually care about your changes." 🐸
ast-impact-mapper-mcp is an advanced Model Context Protocol (MCP) server that analyzes your TypeScript/JavaScript codebase using AST parsing (ts-morph) and dependency graph tracing. It helps AI agents (like Claude or Cursor) target only the relevant tests, find dead code, identify circular import dependencies, and trace API mutations.
🧐 Why import graphs?
Details
- Repository
- github.com/vola-trebla/ast-impact-mapper-mcp
- Package
ast-impact-mapper-mcp- Transport
- STDIO
- Registry
- MCP registry, active
More from vola-trebla
- Env Secret Exposure Analyzer Mcp
- Flakiness Knowledge Graph Mcp
- Ndjson Local Log Triage Mcp
- Playwright Network Chaos Mcp
- Playwright Spatial Layout Mcp
- Sourcemap Retrace Mcp
- Tailwind Context Resolver Mcp
- Tsconfig Inheritance Flattener Mcp
- V8 Cpu Profile Decoder Mcp
- Release Readiness Triage Mcp
- React Render Profile Mcp2
- Playwright Trace Decoder Mcp1