audit_sourcemap_match
Validate that .map files in a dist directory align with their compiled .js counterparts.
Turn a minified production stack trace back into TypeScript files, lines and columns, so the agent debugs your code instead of your bundle.
LABSCO SUMMARY
The frames come back as real files and lines with the surrounding code attached, and the trace can be handed over as a raw crash payload from Sentry, Bugsnag or Datadog rather than copied out by hand first.
A source-map reader for production errors. Give it a stack trace full of hashed bundle names and column offsets, and it returns the original files, lines and columns — plus the code around them. The running server answers with seven tools.
Node, through the published npm package, and the .map files for the build that produced the trace — the retrace is only as good as the maps you point it at.
One command — npx -y sourcemap-retrace-mcp
USE CASES
Paste the minified trace and the directory holding your .map files. What comes back is function names, source files and line numbers — with the source lines around the failure point ready to read.
Sentry, Bugsnag and Datadog payloads are accepted as they arrive, so the step where somebody reformats a JSON dump into a stack trace disappears.
A retrace that points at nonsense usually means stale or mismatched maps. Check that the bundle and its map share a Debug ID, and that the maps in dist match the files beside them.
Audit the dist directory as a release step — missing maps, or maps pointing at sources that no longer exist, are cheaper to find now than during an incident.
When the failure appears inside an await or a queue drain, follow the async boundary back to the code that scheduled the work rather than debugging the runtime's own frames.
webpack://, ng:// and Vite's /@fs/ references get resolved to files you can actually open, so a mapped frame leads somewhere.
Counted once with only startup setup. Other versions, modes or optional credentials may expose a different list.
audit_sourcemap_matchValidate that .map files in a dist directory align with their compiled .js counterparts.
ingest_telemetry_payloadDirectly ingest Sentry, Bugsnag, or Datadog crash dumps and return fully retraced stack frames.
normalize_bundler_pathsResolve dynamic bundle references (like webpack://, ng://, or Vite /@fs/ paths) to raw files.
retrace_stackDecode a minified production stack trace back to original TypeScript source files, lines, and columns.
retrieve_code_contextShow the original source code lines surrounding a mapped error location.
surface_async_causalityDetect and trace across async boundaries (e.g. await, processTicksAndMicrotasks) to locate scheduling origins.
verify_debug_id_integrityValidate that a minified production bundle matches its source map using embedded Debug IDs.
BEFORE YOU INSTALL
7 tools when we connected.
npx on PATH
CONTEXT COST
Rated by the size of the 7 tool definitions that ride along on every turn, not by how many there are
INSTALLATION
Add the block to your client, or run the command directly.
{
"mcpServers": {
"sourcemap-retrace-mcp": {
"command": "npx",
"args": [
"-y",
"sourcemap-retrace-mcp"
]
}
}
}npx -y sourcemap-retrace-mcp