Predictive Debugger

io.github.SpeedosDK由 GitHub 账号 SpeedosDK 发布v0.9.0更新于 Oct 24, 2026

Predicts where JavaScript and TypeScript code will fail at runtime, for coding agents.

已验证STDIO仅桌面开发者工具AI 与机器学习

概览

AI 生成的概览

一个本地 MCP 服务器,借助静态分析和已安装的 AI CLI,帮助编程助手预测 JavaScript 与 TypeScript 代码在运行时会在哪里出错。

可以做什么
按风险密度对源文件排序,并给出每个文件的复杂度和风险指标,默认排除测试文件。使用本地项目设置检查所选文件的 TypeScript 编译器诊断信息。梳理导入、反向导入和相关测试文件,并附源码行证据。分析日志中的异常,按严重程度和异常措辞排序。批量请求独立的模型判断,给出可能出错的行号、原因和置信度。列出已安装并已登录的受支持 AI CLI。
适用场景
适合在编程助手处理 JavaScript 或 TypeScript 项目时使用,让它优先关注高风险文件、追踪依赖关系,或在运行前对可能出错的位置获取第二意见。最适合已经在使用 Claude Code、Codex 或 GitHub Copilot CLI 的开发者。
运行要求
通过 npx 运行的本地进程,需要 Node.js 22 或更高版本。模型预测需要至少安装并登录一个受支持的 CLI(Claude Code、Codex 或 GitHub Copilot CLI);日志分析可选使用 Python 3。未声明单独的 API 密钥或环境变量。
安装前请注意
predict_failures 工具会把源代码和有限范围的依赖上下文发送给所用 CLI 的模型提供商,消耗该 CLI 的用量额度并受提供商条款约束;可将 calleeContext 设为 false 以省略依赖上下文。工具可读取服务器进程能访问的任何路径,项目级配置并不限制文件访问。风险评分和预测可能出错,基准测试不能证明其在任意代码库上的准确性。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Predictive Debugger,将其添加到工作区。
  2. 为需要使用其工具的对话启用该服务。

Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。

其他 MCP 客户端

参照 仓库 中的启动说明。

README

[Predictive Debugger]

Predictive Debugger

Website and docs: predictivedebugger.dev

[npm version] [CI] [License: MIT] [GitHub stars]

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.

Claude Code

Run in your project on macOS, Linux or WSL:

bash
claude mcp add --scope project predictive-debugger -- npx -y predictive-debugger@latest

On native Windows, from PowerShell:

powershell
claude mcp add --scope project predictive-debugger -- cmd /d /c npx -y predictive-debugger@latest

Use --scope user to make it available in every project.

Codex

For a user-level setup on macOS, Linux or WSL:

bash
codex mcp add predictive-debugger -- npx -y predictive-debugger@latest

On native Windows, from PowerShell:

powershell
codex mcp add predictive-debugger -- cmd /d /c npx -y predictive-debugger@latest

For project-only setup or a longer startup timeout, see Codex configuration.

GitHub Copilot CLI

Add to .mcp.json in your project:

json
{  "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:

bash
npx -y predictive-debugger@latest --version

Running 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

text
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.

Tools

ToolWhat it doesModel call
scan_projectRank source files by risk density. Excludes tests by default.No
analyze_fileReturn complexity metrics, risk scores and contributing signals.No
check_typesReturn selected files' TypeScript compiler diagnostics using local project settings.No
map_dependenciesFind imports, reverse imports and connected test files, with source-line evidence.No
analyze_logsReturn log anomalies, ranked by severity and unusual wording.No
predict_failuresGet an independent model verdict with a line number, reason and confidence. Supports batches.Yes
list_providersCheck 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.

How the server asks agents to verify new code

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:

ChangeRequested check
One file, including a feature contained in one fileA fresh predict_failures call
Several filesA sub-agent scoped to the changed files and intended behavior, where the host supports it
Mechanical correction with one clear answerNeither 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_failures sends source and bounded dependency context to your CLI's model provider. Set calleeContext: false to 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

License

MIT.

来源:README.md,提交 2f03938

工具

0
SourceWeft 尚未在沙箱中启动过该软件包,因此其工具未知。

版本历史

2
  1. v0.9.0最新Sep 27, 2026
  2. v0.8.2Sep 24, 2026

评分

已满足适用检查项的 50%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通25 分

    请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。

  • 已声明认证方式10 分

    请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。

  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分