
Dev error explainers
io.github.mahdibrr由 GitHub 帳號 mahdibrr 發布v0.2.1更新於 Oct 24, 2026
Offline, deterministic cause and fix for Node, npm, Next.js, CORS and Postgres URL errors.
概覽
離線 MCP 伺服器,為貼上的 Node、npm、Next.js、CORS 與 Postgres 錯誤提供確定性的原因與修正方式。
- 可以做什麼
- 解釋貼上的錯誤:依既有規則比對 CORS、ESM/CJS、npm ERESOLVE、Next.js 建置失敗、chunk/快取問題與 Postgres 連線錯誤,回傳原因、修正方式與引用來源。
- 診斷資料庫連線字串:檢查連線池與直連、連接埠、SSL 及未編碼的密碼字元,回傳密碼已遮蔽的修正網址。
- 稽核環境變數檔案:標示公開密鑰跡象、重複指派、無效行與正式環境回送位址,且不回傳鍵名或值。
- 無法辨識的輸入會如實回報為未辨識,而不是猜測。
- 適用情境
- 適合讓助理在不把日誌送到外部服務的前提下,排查建置、相依套件、CORS 或資料庫連線失敗。最適用於使用 PostgreSQL 或 Supabase 的 Node.js 與 Next.js 專案。
- 執行需求
- 透過 npx 以 stdio 在本機執行(套件名稱 dev-error-explainers,伺服器指令 dev-error-explainers-mcp)。需要 Node.js 20 或更新版本,且僅支援 ES 模組。不需要 API 金鑰、帳號或網路存取。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Dev error explainers,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
dev-error-explainers
[npm version] [test] [license: MIT] [Dev Error Explainers on AI Agents Listing] [Dev error explainers MCP server]
Paste an error. Get a deterministic explanation.
Version 0.4.0 adds an explicit environment audit and native assistant setup. Public database helpers now return masked metadata and URL templates; see the migration notes before upgrading from 0.2.x. The 1.0 verification record remains incomplete.
No LLM · no API · no network · no telemetry
Output:
Eight small, pure JavaScript modules with zero runtime dependencies: seven error explainers and one explicit environment-file audit. The seven explainers recognise
error text a developer pastes (from the browser console, npm, next build,
curl -I, a Node.js stack trace…), explains why it happens, and returns concrete fixes
with a link to the primary source where one exists (MDN, the Node.js docs, the npm docs,
the PostgreSQL docs, the Supabase docs…). The same engine runs as a library, a CLI, a
GitHub Action and an MCP server.
Secrets: error diagnosis in the CLI, Action and MCP server passes the input through redact()
before it is analysed, with one exception in error diagnosis: the DATABASE_URL doctor reads the raw
postgres:// line (a password's exact characters decide the diagnosis), and never
prints that password. Library diagnostics also mask recognised credentials in
build evidence and database query components. The separate auditEnv / audit_env
audit inspects raw values locally to classify keys, but returns no input keys or
values. Public database parsing helpers now return masked metadata;
correctedWithPassword is a deprecated alias returning masked corrections.
See the 0.3 migration and confidentiality limits
and what redaction does not catch.
Six of them power the free tools on iloveblogs.blog/tools, where you can try each one in the browser.
Evidence: most findings cite the primary source they were checked against. The build-error decoder has no primary-source URL; its links point to articles on the author's site, iloveblogs.blog.
Node.js 20 or later. ES modules only.
See input/resource limits,
the prospective evaluation report, and
the execution record for the measured scope and gaps.
npm run check:drift, npm run typecheck and npm test are release gates.
The development fixture score is not independent accuracy.
Usage
Everything is available from the package root, and each module can also be imported on its own:
detect(text)
Returns the names of the modules that recognise text, in a fixed order, or [].
Each module is asked through its own recogniser — detect adds no heuristics of its own.
Note that chunk-cache-explainer reads HTTP response headers (the output of curl -I),
not the ChunkLoadError message itself; the message alone is recognised by
build-error-decoder.
Audit an environment file
This mode never prints file contents or assignment values. The MCP equivalent
is audit_env({ env: envText, environment: "production" }). Error auto-diagnosis
and the GitHub Action do not automatically treat logs as environment files.
An audit with no findings does not certify that the configuration is safe.
See the parsing scope, rules and limits.
JSON contract
Every module has its own result shape. diagnose(text) maps all of them onto one
shape with stable rule ids, after redacting the input — the shape the CLI prints with
--json, the GitHub Action renders and the MCP server returns:
Unknown input gives { matched: false, results: [] } — never a closest guess. The shape,
the full rule table, the confidence semantics and the redaction limits are in
docs/CONTRACT.md.
A public corpus of real pasted errors with their expected results lives in
fixtures/, each case with its source.
redact(text) is exported too (dev-error-explainers/redact).
CLI
Pipe a failing command into it, or pass a log file. Nothing is sent anywhere.
Flags: --only cors|esm|eresolve|build|database-url|database-connection|chunk-cache|env, --json,
--node <version>, --client prisma|drizzle|pg|psql, --html-headers <file> --chunk-headers <file>,
--help, --version. npx dev-error-explainers mcp starts the MCP server.
Exit codes: 0 an error was recognised, 2 nothing recognised (nothing is guessed), 64 usage error.
A connection string is always printed with its password masked.
Use it in CI (GitHub Action)
When a step fails, the Action reads the log you saved from it and writes the cause and the fix to the job summary, with annotations on the file and line when the log names a file in your checkout. No network, no LLM, no token.
Inputs, outputs and why pipefail and steps.build.outcome matter:
docs/ACTION.md.
Use it from your AI assistant (MCP)
An MCP server with two tools, explain_error and audit_env, so an assistant can check a pasted error or explicitly audit an environment file. explain_error checks the pasted error
against the documented cause before it guesses. Offline and deterministic; unrecognised
input is reported as such. Claude Code:
Claude Desktop, Cursor, VS Code and the protocol details: docs/MCP.md.
Codex can use the same local stdio server; see native Codex setup. The recorded test uses actual MCP tool receipts, not a simulated assistant.
Use it in Claude Code (plugin: skill + MCP)
The plugin bundles its local MCP server and a skill that tells Claude when to call it. The engine has no integrated AI provider. Load a cloned repository or extracted plugin from your project with:
Node.js 20+ must be on PATH. The server runs directly from the plugin's files, with no npm download or dependency installation. See native setup and limits. The repository also contains a marketplace definition; remote installation uses the repository version, which can differ from an older local checkout:
Principles
- Deterministic. The same input always gives the same answer; the rules are tested against real error text (Stack Overflow questions, GitHub issues, framework output).
- Offline engine. The deterministic library/CLI/MCP server makes no network request. An assistant host handles pasted text under its own data policy; see native integration privacy.
- Cited where possible. Findings link to the documentation that states the rule, where one exists — not every rule cites a source.
- Honest about unknowns. An error the module does not recognise is reported as not recognised, never guessed.
Selected corrections have actual before/after evidence; alternatives remain unverified by repair execution. See fix verification scope.
Tests
CI runs the suite on Node.js 20, 22 and 24.
Contributing
Unrecognised error? Open an issue with the exact text. Paste the error as printed, the command that produced it, and the tool versions. A new rule needs a test built from a real error. A diagnosis that is wrong is a bug too — there is a separate template for that.
License
Maintainer and project context
Maintained by Mahdi Ben Rhouma.
- Project notes and browser tools - How the offline library connects to browser tools, the CLI and public examples.
來源:README.md,提交 0fc912a
工具
0版本歷史
2- v0.2.1最新Oct 8, 2026
- v0.2.0Sep 30, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分