predictive-debugger
Use Predictive Debugger as an MCP server to find likely runtime failures in JavaScript/TypeScript projects with seven tools, mostly local and deterministic, plus optional model predictions through an installed Claude Code, Codex or Copilot CLI.
Rank JavaScript/TypeScript source files by risk density, excluding tests by default and optionally including them (
scan_project).Analyze one file for static complexity metrics and a heuristic risk score (
analyze_file).Get TypeScript compiler diagnostics for selected files using the local project's declarations and settings (
check_types).Map a file's local imports, reverse imports and connected tests with source-line evidence (
map_dependencies).Find anomalous log lines ranked by severity and unusual wording (
analyze_logs).Get an independent model verdict on the most likely runtime failure with a line number, reason and confidence, including batch predictions across files (
predict_failures).Check which supported CLI providers are installed and signed in (
list_providers).Ask agents to verify newly written code with a fresh prediction or sub-agent check, and omit dependency context with
calleeContext: false.
Allows the server to use an installed GitHub Copilot CLI's model access to provide independent runtime-failure predictions with a line number, reason, and confidence score.
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., "@predictive-debugger Find the riskiest files in src/"
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.
Predictive Debugger
Website and docs: predictivedebugger.dev
MCP server for finding likely runtime failures in JavaScript and TypeScript. Seven tools help your coding agent check types, rank risky files, trace dependencies, inspect logs and get an independent model review with a line number and reason.
Uses the Claude Code, Codex or GitHub Copilot CLI you already have installed. Prediction calls use that CLI's model access and usage allowance. No separate API key is needed. Your provider's terms apply to those calls; check them before use, especially on a Claude subscription. See Provider terms.
Setup
Requires Node.js 22 or later. For model predictions, install and sign in to at least one supported CLI. Python 3 is optional for log analysis.
1. Add the MCP server
Choose your agent below. npx downloads and runs the package automatically.
Run in your project on macOS, Linux or WSL:
claude mcp add --scope project predictive-debugger -- npx -y predictive-debugger@latestOn native Windows, from PowerShell:
claude mcp add --scope project predictive-debugger -- cmd /d /c npx -y predictive-debugger@latestUse --scope user to make it available in every project.
For a user-level setup on macOS, Linux or WSL:
codex mcp add predictive-debugger -- npx -y predictive-debugger@latestOn native Windows, from PowerShell:
codex mcp add predictive-debugger -- cmd /d /c npx -y predictive-debugger@latestFor project-only setup or a longer startup timeout, see Codex configuration.
Add to .mcp.json in your project:
{
"mcpServers": {
"predictive-debugger": {
"command": "npx",
"args": ["-y", "predictive-debugger@latest"],
"tools": ["*"]
}
}
}On native Windows, use "command": "cmd" and
"args": ["/d", "/c", "npx", "-y", "predictive-debugger@latest"].
For every project, see Copilot user-level setup.
2. Check the connection
Restart your agent and check /mcp for predictive-debugger and its seven tools.
To check that the package downloads and print its version:
npx -y predictive-debugger@latest --versionRunning without --version starts a stdio server that waits for your agent's
messages. See setup help for local builds and troubleshooting.
3. Ask your agent about the code
Use Predictive Debugger to find the riskiest files in src/.
Show the imports and tests connected to src/services/orders.ts.
Check src/services/orders.ts for likely runtime failures.
Find unusual entries in logs/app.log.Related MCP server: Semantic JS MCP
Tools
Tool | What it does | Model call |
| Rank source files by risk density. Excludes tests by default. | No |
| Return complexity metrics, risk scores and contributing signals. | No |
| Return selected files' TypeScript compiler diagnostics using local project settings. | No |
| Find imports, reverse imports and connected test files, with source-line evidence. | No |
| Return log anomalies, ranked by severity and unusual wording. | No |
| Get an independent model verdict with a line number, reason and confidence. Supports batches. | Yes |
| Check which supported CLIs are installed and their sign-in status. | No |
Start with scan_project and check_types, then read the files they highlight. Use
map_dependencies to find related files and predict_failures when you want a
second opinion. Pass several paths as files so small files share bounded model
calls and avoid repeating the CLI context for every file.
See the tool reference for parameters, result fields and limits.
The server's MCP instructions ask agents to check code they wrote in the current session from a fresh context. The routing depends on file count:
Change | Requested check |
One file, including a feature contained in one file | A fresh |
Several files | A sub-agent scoped to the changed files and intended behavior, where the host supports it |
Mechanical correction with one clear answer | Neither check required |
Grouped predictions retain per-file verdicts. They do not verify a feature's requirements. The benefit of the sub-agent rule has not been measured.
Privacy and limits
Static analysis, dependency maps and log analysis run locally.
predict_failuressends source and bounded dependency context to your CLI's model provider. SetcalleeContext: falseto omit dependency context.Credentials stay with the CLI. MCP tools can read paths the server process can access; project-scoped setup does not restrict file access. See the security model.
JavaScript and TypeScript are supported, including JSX, TSX and decorators. Vue and Svelte single-file components are not supported. Files above 4 MB are rejected; large predictions may cover only selected declarations.
Risk scores and predictions can be wrong. The benchmarks use development cases and do not establish accuracy on arbitrary repositories.
Manually verified on Windows. CI covers Windows, macOS and Linux on Node 22 and 24; real CLI installations on macOS and Linux have not been manually verified.
VS Code preview
An unfinished extension can show findings in the Problems panel. It requires a local build and is not available on the Marketplace or as a prebuilt VSIX. See trying the extension.
Documentation
predictivedebugger.dev: website, quickstart and guides.
Advanced setup: provider login, project scope, updates and local builds.
Tool reference: parameters, prediction results, dependency context and scoring.
VS Code preview: development host, commands and settings.
Benchmarks and method.
Development and contributing. Bug reports are welcome; code contributions are not open yet.
Security policy. Report vulnerabilities privately.
License
MIT.
Available Tools
7 toolsanalyze_fileAnalyze one source fileARead-only
Return static complexity metrics and a heuristic risk score (0-1) for a single JavaScript or TypeScript file. Deterministic and fast — no model call. Call this when reviewing a file to find out where the structural risk sits (nested loops, long functions, async boundaries, unguarded mutation) before reading the whole file yourself.
Inputs: file (required).
analyze_logsFind anomalous log linesARead-only
Score a log file's lines by severity and how unusual their wording is, and return the anomalies, worst first. Deterministic — no model call, no API key. Call this when you have a log file and want the handful of lines worth reading rather than the whole file.
Inputs: logFile (required), threshold.
check_typesCheck selected files with TypeScriptARead-only
Return TypeScript compiler diagnostics for selected JavaScript/TypeScript files. Uses the full local project's declarations and settings, but reports selected files only. No model, emit, plugins or project code execution. Without a config, uses inferred null checking with JS checking. Reports skipped files, incomplete context and limits; no diagnostics is not proof of runtime safety.
Inputs: files (required), project.
list_providersShow available CLI providersARead-only
Report which supported CLIs (Claude Code, Codex, GitHub Copilot) are installed and signed in. Call this to diagnose why predict_failures is failing.
Inputs: no named parameters.
map_dependenciesMap a file's dependency neighborhoodARead-only
Find a file's local imports, reverse imports and tests connected by imports. Each relationship includes a source path and line as evidence. Static file relationships, not runtime callers or test coverage. Scans JavaScript/TypeScript including tests, with bounded work and explicit unresolved imports and scan limits. Deterministic; no provider call.
Inputs: file (required), directory (required), depth, limit, +1 more.
predict_failuresPredict the most likely runtime failure in a fileARead-only
Combine static analysis with a second-opinion verdict from the signed-in Claude Code, Codex, or GitHub Copilot CLI, returning the most likely runtime failure with a line number and reason. status distinguishes actionable, uncertain, no-finding, and unavailable results. checked lists the bug categories the model reports having considered, so a clean file weighed against the whole catalogue is distinguishable from one where it stopped early; it is a self-report, and an empty list means no coverage was reported. Pass multi: true to get every finding the model can demonstrate, ranked, in a findings array instead of one verdict — experimental, and more findings per call is also more surface for false positives per call. actionable applies the measured score >= 0.7 precision gate. uncertain names a candidate the reviewer could not confirm: read its cited lines before dismissing it, and report it only if you confirm it yourself. This spawns another model and takes 5-15 seconds, so only call it when you specifically want an independent second opinion. If you are yourself reviewing the code, use analyze_file and read the source instead. Reviewing several files? Pass them all as files in one call rather than calling once per file: small files share bounded model calls to reduce repeated CLI context. Groups run concurrently, with individual verdicts and explicit failures.
Inputs: file, files, model, multi, +5 more.
scan_projectRank a project's files by riskARead-only
Walk a directory and rank its JavaScript/TypeScript files by risk density — how concentrated the failure-prone code is, not how big the file is. Test files are left out by default; pass includeTests to rank them too. Deterministic and fast — no model call. Call this at the start of a code review to decide which files are worth your attention, instead of reading the tree in arbitrary order.
Inputs: directory (required), limit, verbose, includeTests.
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 granularity or data source: check_types (compiler diagnostics), analyze_file (single-file metrics), scan_project (whole-tree ranking), map_dependencies (import graph), analyze_logs (log lines), list_providers (environment probe), and predict_failures (model verdict). The descriptions explicitly clarify the boundary between analyze_file and predict_failures, and between scan_project and analyze_file, removing overlap.
All seven tools follow a consistent snake_case verb_noun pattern (check_types, map_dependencies, analyze_file, scan_project, analyze_logs, list_providers, predict_failures). Verbs are predictable and nouns name the resource clearly.
Seven tools is well-scoped for a predictive debugging server, covering static analysis, dependency mapping, logs, environment probing, and model-based prediction without redundancy. Each tool earns its place with a clear role in the workflow.
The surface covers the debugging lifecycle well: project triage, per-file analysis, dependency context, logs, provider diagnostics, and independent failure prediction. Minor gaps exist, such as no way to read raw file content or validate configuration directly, but agents can work around these with standard file access.
Maintenance
Related MCP Connectors
Production bugs with replay, network, console and stack, ranked for your coding agent to fix.
Issue tracker for coding agents: a real backlog, plus a risk-ranked review of every change.
Lets coding agents check their own code for leaked secrets, risky dependencies and AI-code mistakes
Synthetic checks, nightly regression replay and model-drift alerts for AI agents
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables LLMs to automatically diagnose coding errors through codebase search, test execution, and live debugger integration (DAP/V8 CDP). Provides a secure, policy-gated environment for investigating failures while preventing destructive operations.9ISC
- AlicenseNot gradedqualityCmaintenanceProvides structured semantic context for JavaScript/TypeScript codebases, enabling coding agents to navigate, review, and change code with explicit uncertainty.26 npm1MIT
- AlicenseAqualityCmaintenanceProvides AI coding agents with reliable root-cause diagnosis and minimal, high-confidence fixes for failing tests.31MIT
- AlicenseNot gradedqualityBmaintenanceEnables coding agents to list functions, scan for risky patterns offline, and generate plain-language explanations of Python, JavaScript, and TypeScript code, including summaries for only the functions affected by recent changes.10 npmMIT