impact-mcp
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| IMPACT_MCP_DIR | No | Project directory to analyze. Equivalent to passing `--dir`; defaults to the current directory. | |
| IMPACT_MCP_CACHE_DIR | No | Directory for the parse cache (kept outside the analyzed repo). Defaults to `%LOCALAPPDATA%\impact-mcp` on Windows or `$XDG_CACHE_HOME/impact-mcp` / `~/.cache/impact-mcp` elsewhere. |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
Static import-graph analysis of ONE project directory (set by --dir; read-only, offline). Use it BEFORE editing to answer 'what depends on this file/symbol and what could break': impact(path, symbol?) gives blast radius, tests to run and entry points affected; dependents / dependencies walk the graph; symbol_users finds who uses one name; find_cycles and orphans_and_hubs audit structure; project_map is the overview. Every result ends with a 'Graph confidence' line: unresolved or dynamic imports mean the graph can miss dependents, so treat results as a lower bound when those counts are non-zero.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| 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. |
| dependentsA | Who imports this file? Transitive importers grouped by depth, with the import line,
imported names, and flags (type-only / lazy / conditional). |
| dependenciesB | What does this file import from inside the project (transitively up to |
| 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 |
| 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. |
| 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). |
| symbol_usersA | Who uses |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
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.