impact-mcp
Provides static analysis for JavaScript projects: builds the import graph and answers dependents, dependencies, blast-radius impact, test reachability, affected entry points, import cycles, orphan/hub candidates, and symbol-user questions, with confidence reporting for unresolved or dynamic imports.
Provides static analysis for Python projects: builds the import graph and answers dependents, dependencies, blast-radius impact, test reachability, affected entry points, import cycles, orphan/hub candidates, and symbol-user questions, with confidence reporting for unresolved or dynamic imports.
Provides static analysis for TypeScript projects: builds the import graph and answers dependents, dependencies, blast-radius impact, test reachability, affected entry points, import cycles, orphan/hub candidates, and symbol-user questions, with confidence reporting for unresolved or dynamic imports.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@impact-mcp what breaks if I change src/billing/invoice.py, and which tests should I run?"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
impact-mcp
Ask "what depends on this file, and what breaks if I change it?" and get an answer that tells you how much to trust it.
impact-mcp is an MCP server that builds the import graph of a Python and/or JavaScript/TypeScript project and answers blast-radius questions: who imports this file, who uses this one symbol, which tests reach it, which entry points are downstream, where the cycles are, what looks dead.
What is different from the other code-graph MCP servers (codegraph-mcp, code-impact-mcp, ts-review-graph, dep-graph-guard and friends):
Zero extra dependencies and fully offline. Only
mcp. Python is read with the stdlibast; JS/TS with a small hand-written tokenizer. No Node, no TypeScript compiler, no ts-morph, no SQLite, no network, nothing executed, nothing written inside your repo.It tells you what it could not see. Every answer ends with a
Graph confidenceline: resolved edges, external packages, unresolved project-looking imports, dynamic non-literal imports, syntax-error files. Dynamicimportlib/import(x)/require(x)is reported as UNRESOLVED, never guessed.impactalso warns when unresolved imports end in the name of the file you are about to change.Python and JS/TS resolution that matches how projects are really laid out:
src/layouts, namespace packages,__init__.pyre-exports and__all__,TYPE_CHECKING, tsconfigextends/baseUrl/paths, monorepo workspace packages,.js->.tsESM style imports,index.tsdirectories,export * from,import type.Symbol-level answers that follow re-exports:
symbol_users("pkg/core.py", "Engine")also finds the file that importsEnginefrom the package__init__.pythat re-exports it.
What it looks like
> impact path=mort/lexer.py
Impact of changing mort/lexer.py
Direct dependents: 2; transitive: 10; max depth: 4
mort/lsp.py -- line 10: from-import {Lexer}
mortc.py [entry] -- line 36: from-import {Lexer}
Tests that reach it through imports (4) - a superset to run, not proof of coverage:
kernel/test_exec.py
tests/test_mort.py
...
Entry points affected (4):
mortc.py (console script in pyproject.toml)
...
Risk: HIGH
- 10 transitive dependent file(s) = 31% of 32 files
- 4 entry point(s) are downstream (a break can surface at startup)
Graph confidence: 32 files (32 py, 0 js/ts) | 52 resolved internal edges | external packages not tracked: 4 (+37 stdlib/builtin) | UNRESOLVED project-looking imports: 0 | dynamic non-literal imports: 0 | syntax-error files: 0Related MCP server: Axon
Install
You need uv. Point --dir at the project you want analyzed.
Claude Code
claude mcp add impact -- uvx impact-mcp --dir /path/to/your/projectClaude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"impact": {
"command": "uvx",
"args": ["impact-mcp", "--dir", "C:\\path\\to\\your\\project"]
}
}
}--dir defaults to the current directory (or IMPACT_MCP_DIR). One server instance analyzes one project.
Tools
Tool | What it answers |
| Languages, module count, packages, guessed entry points, cycle count, unresolved/dynamic imports. Start here. |
| Who imports this file, transitively, grouped by depth, with the import line, names and flags. |
| What this file imports from the project; lists its unresolved and dynamic imports. |
| Blast radius: dependents, tests that reach it, entry points affected, LOW/MEDIUM/HIGH risk with reasons. With |
| Strongly connected components (Tarjan) with the shortest cycle written out edge by edge; notes lazy/type-only edges that soften a cycle. |
| Dead-code candidates (with caveats) and the most depended-on files. |
| Who imports or accesses one name, including through re-exports. Best effort, labeled as such. |
path_or_module accepts a project-relative path (src/app/util.py, packages/ui/src/Button.tsx), a
dotted Python module (app.util), an absolute path inside the project, or an extensionless JS path.
Try asking
"I'm about to change
src/billing/invoice.py. What could break and which tests should I run?""Who uses
parse_configfromapp.config?""Are there import cycles in this repo? Show me the shortest one."
"What are the most depended-on files here? Which files look dead?"
"Which entry points are affected if I rename
Buttoninpackages/ui/src/Button.tsx?""Give me an overview of this project and how much I can trust the import graph."
What it cannot resolve (read this)
The graph is static. These are counted in the confidence line where they are detectable, and the
impact and dependents add hints when they could be hiding a dependent of the file you asked about.
Python
importlib.import_module(name)/__import__(name)with a non-literal argument,exec, plugin discovery by entry points or string names,getattron modules. A literalimport_module("pkg.mod")is resolved and flaggeddynamic.Implicit parent-package execution is not modeled:
import a.b.cis an edge toa/b/c.pyonly, not also toa/__init__.pyanda/b/__init__.py.Which directories act as import roots is inferred (project root,
src/, dirs withpyproject.toml/setup.py, and the dir above each top-level package); a customPYTHONPATHorsys.pathedit is invisible.from x import *is an edge; which names it brings in is taken from__all__/ top-level definitions.Re-exports renamed with
asinside__init__.pyare not followed by symbol tracking.
JavaScript / TypeScript
A tokenizer, not a parser. Known weak spots: JSX text containing an apostrophe can desync the rest of that line; regex-vs-division is heuristic.
require(x)/import(x)with a non-literal argument,require.context, bundler magic (import.meta.glob), Next.js/Nuxt file-system routing.tsconfig:
extendsto an npm package is not followed (warned);references/includeare ignored; the nearest tsconfig.json wins.package.json
exportsis read only for the.entry and simple subpaths (conditions: import, module, default, require, node, types);imports(#alias) maps are reported as unresolved.Workspace packages whose entry is a build output (
dist/) resolve tosrc/equivalents if the source file exists; otherwise the import counts as unresolved.Namespace-import and
requireattribute tracking (ns.foo) is by name only; a namespace passed around as a value marks the edge as "may use anything".Only
.js .jsx .mjs .cjs .ts .tsx .mts .ctsfiles are in the graph;.vue,.svelte,.astroare not.Files over 2 MB (bundles) are skipped and reported.
Both
Symlinks and junctions are not followed (loop safe); skipped counts are reported.
On Windows and macOS (case-insensitive file systems) an import that only matches by case resolves and is counted.
Dead-code candidates are candidates: frameworks, external consumers of a library and non-code tooling can use files the graph cannot see.
Performance
Parsed results are cached by file mtime and size in a cache directory outside your repo
(%LOCALAPPDATA%\impact-mcp on Windows, $XDG_CACHE_HOME/impact-mcp or ~/.cache/impact-mcp elsewhere;
override with IMPACT_MCP_CACHE_DIR). A cold scan of a 2,700-file JS repo takes a few seconds; a warm scan is
dominated by the directory walk. File reading is threaded; .gitignore files (nested too), .git,
node_modules, venv, .venv, dist, build, __pycache__ and similar directories are skipped.
Security
Read-only. Source files are opened for reading and parsed; nothing is imported, executed, installed or written inside the project. The only write is the parse cache, in your user cache directory.
Sandboxed. All paths are resolved against
--dir; absolute paths or..that leave it are rejected. Symlinks are not followed.Offline. No network access of any kind.
Output contains file paths, line numbers, and import names from your code, which go to whatever AI client you connected.
Develop
uv sync --extra test
uv run pytest
uv run --with ruff==0.16.0 ruff check src tests
uv run --with mypy==2.3.0 mypy --strict srcSet IMPACT_TEST_REPOS (paths separated by ; on Windows, : elsewhere) to also run read-only checks against your own repositories.
There is a from-scratch tutorial that builds a minimal version of this server: impact-mcp-the-hard-way.
MIT licensed.
Available Tools
7 toolsdependenciesB
What does this file import from inside the project (transitively up to depth)?
Also lists this file's UNRESOLVED and DYNAMIC imports explicitly.
Inputs: path_or_module (required), depth, limit. Returns: result
dependentsA
Who imports this file? Transitive importers grouped by depth, with the import line,
imported names, and flags (type-only / lazy / conditional). path_or_module is a
project-relative path (src/app/util.py, packages/ui/src/Button.tsx), an extensionless JS
path, or a dotted Python module (app.util). Depth 1 = direct importers only.
Inputs: path_or_module (required), depth, limit. Returns: result
find_cyclesA
Import cycles: strongly connected components (Tarjan), each with its shortest cycle spelled out file by file, and whether the cycle is softened by lazy/type-only imports.
Inputs: limit. Returns: result
impactA
Blast radius of changing a file (or one symbol in it): direct and transitive dependents,
the tests that reach it through imports (run these), entry points affected, and a LOW/MEDIUM/HIGH
risk summary with reasons. With symbol, direct users are narrowed to files that import or
access that name (following re-exports); the rest is an upper bound.
Inputs: path (required), limit, symbol. Returns: result
orphans_and_hubsB
Dead-code candidates (files nothing imports that are not entry points, tests, init.py or configs - with caveats) and the most depended-on files (direct importers / transitive dependents).
Inputs: limit. Returns: result
project_mapA
Overview of the project: languages, module count, Python packages, guessed entry points (pyproject scripts, main.py, package.json bin/main/exports), import-cycle count, unresolved/dynamic imports, and syntax-error files. Start here.
Inputs: no named parameters. Returns: result
symbol_usersA
Who uses symbol from module? Best effort and labeled as such: from-imports, named
imports, attribute access on the module alias (mod.name), wildcard imports, and re-export chains
(init.py, all, export {x} from). getattr()/dynamic use is invisible.
Inputs: module (required), symbol (required), limit. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 7 tools
Each tool targets a distinct analysis: overview, cycles, forward imports, reverse imports, blast radius, hub/orphan stats, and symbol-level usage. The main risk is `dependents` vs `impact` (impact largely subsumes dependents' output plus tests and risk) and the near-homophone pair `dependents`/`dependencies`, which an agent could swap despite direction being stated in the text.
Names are all lowercase snake_case, but grammatical form is mixed: verb phrases (`find_cycles`), bare nouns (`dependents`, `dependencies`, `impact`), and a conjoined noun (`orphans_and_hubs`). The pair `dependents`/`dependencies` is only one character-apart in semantics and spelling, which is a real readability hazard even though no convention is violated outright.
Seven tools is well-scoped for an import-graph/impact-analysis server, with one tool per analysis question rather than redundant variants. Nothing feels padded or missing at the count level.
The surface covers the full lifecycle of impact analysis: orient (project_map), forward/reverse graph queries, cycles, dead code/hubs, symbol usage, and a risk-rated blast radius including affected tests and entry points. Minor gaps: no direct way to locate a file by fuzzy name or browse the test-to-source mapping outside `impact`, and no handling of dynamic/reflective edges beyond flagging them.
Related MCP Connectors
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Ask a codebase what calls what: search, blast radius, paths between symbols, and diffs.
Ask who calls a route, what a change breaks or who reads a field, across a system's repos.
Codebase intelligence for AI agents — dead code, blast radius, ownership.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables querying and analyzing code relationships by building a lightweight graph of TypeScript and Python symbols. Supports symbol lookup, reference tracking, impact analysis from diffs, and code snippet retrieval through natural language.MIT
- AlicenseNot gradedqualityDmaintenanceA graph-powered code intelligence engine that indexes codebases into a structural knowledge graph to provide AI agents with deep context on function calls, types, and execution flows. It offers local, zero-dependency tools for hybrid search, impact analysis, and dead code detection across Python, JavaScript, and TypeScript projects.196 PyPI821MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI agents and terminal users to query codebases for callers, impact, tests, dependencies, and refactor previews using static AST analysis, with every match accounted for and uncertain relationships clearly marked.1,016 npm2MIT
- AlicenseNot gradedqualityAmaintenanceEnables AI coding agents to query a local structural code graph, inspect relationships and impact, and retrieve focused project context before reading full files.24 npmMIT