Proporciona explicaciones deterministas y soluciones concretas para errores de Node.js, npm, Next.js, CORS y PostgreSQL sin utilizar un LLM ni conexión a red.
También conocido como mahdibrr/dev-error-explainers, dev-error-explainers
- Stars
- 0
- Herramientas
- —
- Descargas, 30 días
- —
- Última versión
- 0.2.1
- Último commit
- 3 nov 2026
- Licencia
- MIT
¿Qué es Dev error explainers MCP?
Dev error explainers es un MCP server. Proporciona explicaciones deterministas y soluciones concretas para errores de Node.js, npm, Next.js, CORS y PostgreSQL sin utilizar un LLM ni conexión a red.
Resumen generado a partir del README del proyecto
Acerca del MCP server de Dev error explainers
Los desarrolladores que se enfrentan a obstáculos comunes en el desarrollo web pueden obtener explicaciones deterministas e inmediatas para sus errores sin depender de un LLM o de una conexión a internet. Este MCP server proporciona herramientas de diagnóstico específicas para problemas de Node.js, npm, Next.js, CORS y PostgreSQL. Funciona localmente analizando el texto del error, los stack traces o los archivos de entorno para identificar la causa raíz y sugerir soluciones concretas.
Los usuarios pueden interactuar con el servidor para resolver problemas complejos como conflictos de módulos ESM/CJS, desajustes de peer-dependencies en npm o fallos de conexión a la base de datos. El sistema incluye módulos especializados como database-url-doctor para cadenas de conexión y build-error-decoder para fallos en el build de Next.js. Debido a que opera sin red ni telemetría, mantiene la privacidad redactando la información sensible antes del análisis, garantizando que las credenciales y los secretos permanezcan seguros durante el proceso de diagnóstico.
Qué puedes hacer con él
- 1Resolver conflictos de módulos de Node.jsIdentifica por qué no se puede hacer require de un módulo ES en un archivo CommonJS y obtén soluciones clasificadas por relevancia.
- 2Corregir cadenas de conexión de PostgreSQLDiagnostica problemas con las URLs de la base de datos para herramientas como Prisma o Drizzle y recibe una cadena de conexión corregida.
- 3Depurar fallos en el build de Next.jsAnaliza los outputs de un build fallido para encontrar causas como desajustes de hidratación o problemas de memoria.
- 4Auditar configuraciones de entornoComprueba un archivo .env de Next.js en busca de asignaciones duplicadas o URLs de producción inválidas sin exponer los valores reales.
Escrito a partir del README del proyecto. Cada caso de uso se verifica con una cita del mismo.
Cómo instalar Dev error explainers MCP
Formatos verificados el 10 nov 2026Instalar Dev error explainers MCP en Claude Code
$ claude mcp add dev-error-explainers -- npx -y dev-error-explainersInstalar Dev error explainers MCP en Cursor
~/.cursor/mcp.json
{
"mcpServers": {
"dev-error-explainers": {
"command": "npx",
"args": [
"-y",
"dev-error-explainers"
]
}
}
}Instalar Dev error explainers MCP en VS Code
.vscode/mcp.json
{
"servers": {
"dev-error-explainers": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"dev-error-explainers"
]
}
}
}Instalar Dev error explainers MCP en Claude Desktop
claude_desktop_config.json
{
"mcpServers": {
"dev-error-explainers": {
"command": "npx",
"args": [
"-y",
"dev-error-explainers"
]
}
}
}Instalar Dev error explainers MCP en Codex
~/.codex/config.toml
[mcp_servers.dev-error-explainers] command = "npx" args = ["-y", "dev-error-explainers"]
Instalar Dev error explainers MCP en Gemini CLI
~/.gemini/settings.json
{
"mcpServers": {
"dev-error-explainers": {
"command": "npx",
"args": [
"-y",
"dev-error-explainers"
]
}
}
}Verificaciones automáticas
Ejecutado 14 nov 2026Informe completo →Pasó nuestras verificaciones automáticas. Esto no es una auditoría de seguridad: lee el código y dale al servidor el acceso más limitado que necesite. Cómo funcionan las verificaciones
- Repositorio de origen vinculado y accesiblemahdibrr/dev-error-explainers is public and reachablegithub.com/mahdibrr/dev-error-explainers ↗Aprobado
- El paquete cita este repositorio como fuentedev-error-explainers names mahdibrr/dev-error-explainers as sourcenpmjs.com/package/dev-error-explainers ↗Aprobado
- Procedencia de la compilación (atestación Sigstore)Sigstore attestation for dev-error-explainersnpmjs.com/package/dev-error-explainers/v/0.2.1#provenance ↗Aprobado
- Licencia de código abierto (OSI)MITspdx.org/licenses/MIT.html ↗Aprobado
- Commit o lanzamiento en el último añoLast commit or release 2026-11-03github.com/mahdibrr/dev-error-explainers ↗Aprobado
- OpenSSF ScorecardNo verificado
- El nombre del paquete no es similar a un paquete popularNo popular package one edit away from dev-error-explainersAprobado
- Sin avisos críticos en el paquete ni en sus dependencias1 resolved dependencies checked; no critical advisoryosv.dev ↗Aprobado
- Sin instrucciones ocultas para el modelo0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersAprobado
- Las herramientas destructivas están etiquetadasNo verificado
- El endpoint remoto responde al handshake MCPNo verificado
README
Ver en GitHubdev-error-explainers
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
npm run build 2>&1 | npx dev-error-explainers
npm install dev-error-explainers
import { detect, explainEsmCjs } from 'dev-error-explainers';
const error = 'Error [ERR_REQUIRE_ESM]: require() of ES Module /app/node_modules/node-fetch/src/index.js from /app/index.js not supported.';
console.log(detect(error));
const { findings } = explainEsmCjs({ error, nodeVersion: '20.10.0' });
console.log(findings[0].title, findings[0].fixes.map((f) => f.title));
Output:
[ 'esm-cjs-explainer' ]
ERR_REQUIRE_ESM — require() of an ES module [
'Upgrade Node.js (you are on 20.10.0)',
'Use dynamic import() from CommonJS',
'Convert the calling file to ESM'
]
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.
| Module | Main export (dev-error-explainers) |
What it explains | Try it live |
|---|---|---|---|
cors-error-explainer |
diagnoseCors |
Chrome / Firefox / Safari "blocked by CORS policy" errors: missing or wrong Access-Control-Allow-* headers, preflight failures, credentials, mixed content — with a fix for your stack |
CORS Error Explainer |
esm-cjs-explainer |
explainEsmCjs |
ERR_REQUIRE_ESM, "Cannot use import statement outside a module", "exports is not defined in ES module scope", ERR_UNKNOWN_FILE_EXTENSION ".ts", ERR_MODULE_NOT_FOUND, ERR_PACKAGE_PATH_NOT_EXPORTED — aware of your Node.js version |
ESM/CJS Error Explainer |
npm-eresolve-explainer |
analyseEresolveLog |
npm ERR! ERESOLVE peer-dependency conflicts: who asks for which range, what is installed, and why they do not intersect |
npm ERESOLVE Explainer |
chunk-cache-explainer |
diagnoseChunkCache |
ChunkLoadError / "Loading chunk failed" after a deploy: reads your response headers and finds the stale HTML, the CDN cache hit or the SPA fallback |
ChunkLoadError Cache Checker |
database-url-doctor |
diagnoseDatabaseUrl |
Postgres / Supabase connection strings: pooler vs direct, port 5432 vs 6543, pgbouncer, SSL, unencoded password characters — with a corrected URL for Prisma, Drizzle, pg or psql |
DATABASE_URL Doctor |
build-error-decoder |
decodeBuildError |
Failing next build / next dev output: Suspense bailouts, dynamic server usage, window is not defined, hydration mismatches, module resolution, heap out of memory, EADDRINUSE… |
Next.js Build Error Decoder |
next-env-checker |
auditEnv |
Explicit audit of one Next.js .env file: public secret indicators, duplicate assignments, invalid lines and production loopback URLs. Values never returned | Env audit contract |
database-connection-explainer |
explainDatabaseConnection |
"Can't connect to the database" from Node.js apps on PostgreSQL: ECONNREFUSED (including ::1 localhost), ETIMEDOUT, ENOTFOUND, Prisma P1000 / P1001 / P1017, password authentication failed, no pg_hba.conf entry, too many clients, self-signed certificates. Generic network codes are only diagnosed next to a Postgres signal |
No browser tool yet — rules and sources |
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:
import { diagnose } from 'dev-error-explainers/cors-error-explainer';
const r = diagnose({
error: "Access to fetch at 'https://api.example.com/data' from origin 'http://localhost:3000' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.",
});
r.isCorsProblem; // true
r.findings; // what is wrong, why, and the source
r.fix; // a fix for the detected (or guessed) stack
import {
analyseEresolveLog, diagnoseDatabaseUrl, diagnoseChunkCache, decodeBuildError, explainDatabaseConnection,
} from 'dev-error-explainers';
analyseEresolveLog(npmOutput); // { detected, code, conflicts: [...] }
diagnoseDatabaseUrl(process.env.DATABASE_URL, { client: 'prisma' }); // { ok, kind, findings, corrected }
diagnoseChunkCache({ htmlHeaders, chunkHeaders }); // headers from `curl -I`
decodeBuildError(nextBuildOutput); // matched rules, most severe first
explainDatabaseConnection({ error: stackTrace }); // { recognised, findings, related }
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
import { auditEnv } from 'dev-error-explainers';
const audit = auditEnv(envText, { environment: 'production' });
// { version: '0.1', status, assignments, matched, redactions, results }
npx dev-error-explainers --only env --environment production --json .env.local
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:
import { diagnose } from 'dev-error-explainers'; // or 'dev-error-explainers/contract'
diagnose('FATAL: password authentication failed for user "andym"');
// { version: '0.1', matched: true, redactions: 0,
// results: [{ rule: 'database-connection.password-auth-failed', family: 'database-connection',
// severity: 'critical', confidence: 'high', title, cause, fixes, evidence, module }] }
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.
npm run build 2>&1 | npx dev-error-explainers
npx dev-error-explainers < error.log
npx dev-error-explainers --text "Error [ERR_REQUIRE_ESM]: require() of ES Module …" --node 18.17.0
npx dev-error-explainers --json < error.log # the contract result (docs/CONTRACT.md)
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.
- name: Build
id: build
continue-on-error: true # let the explain step run…
shell: bash
run: |
set -o pipefail
npm run build 2>&1 | tee build.log
- name: Explain the failure
if: steps.build.outcome == 'failure'
uses: mahdibrr/dev-error-explainers@v0
with:
log-file: build.log
- name: Fail the job if the build failed
if: steps.build.outcome == 'failure'
run: exit 1 # …then keep the job red
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 mcp add dev-error-explainers -- npx -y -p dev-error-explainers dev-error-explainers-mcp
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:
claude --plugin-dir "/absolute/path/to/dev-error-explainers"
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:
/plugin marketplace add mahdibrr/dev-error-explainers
/plugin install dev-error-explainers@dev-error-explainers
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
npm install
npm test
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.
Preguntas sobre Dev error explainers MCP
¿Cómo agrego Dev error explainers MCP a Claude Code?
Ejecuta claude mcp add dev-error-explainers -- npx -y dev-error-explainers en tu terminal. Añade --scope user para que esté disponible en todos los proyectos.
¿Cómo agrego Dev error explainers MCP a Cursor?
Abre ~/.cursor/mcp.json y añade el servidor en mcpServers, usando la configuración de Cursor que se muestra en la sección de instalación de arriba.
¿Este servidor utiliza un LLM o requiere conexión a internet?
No, funciona totalmente offline sin LLM, sin API, sin red y sin telemetría.
¿Cómo gestiona el servidor la información sensible como las contraseñas?
El servidor pasa la entrada por un proceso de redacción antes del análisis, y los ayudantes de base de datos devuelven metadatos enmascarados y plantillas de URL.
¿Qué tipo de errores puede diagnosticar?
Explica errores relacionados con CORS, conflictos de módulos ESM/CJS, problemas de peer-dependency en npm, builds de Next.js y cadenas de conexión de PostgreSQL.