
Sourcemap Retrace Mcp
io.github.vola-trebla由 GitHub 账号 vola-trebla 发布v0.2.0更新于 Oct 24, 2026
Decodes minified production stack traces back to original TypeScript source using source maps.
概览
使用 source map 将压缩后的生产环境 JavaScript 堆栈跟踪还原为原始 TypeScript 源文件、行号和列号。
- 可以做什么
- 提供三个工具:retrace_stack 使用指定目录中的 .js.map 文件把压缩堆栈跟踪映射回原始源码位置;retrieve_code_context 显示映射位置附近的原始源码行,并带行号和列指针;audit_sourcemap_match 检查 dist 目录中的 .map 文件是否存在,以及它们指向的源文件是否在磁盘上。它会报告已映射和未映射的帧,让助手知道跟踪中哪些部分被解析。
- 适用场景
- 当助手需要调试生产环境错误、而堆栈跟踪指向压缩后的 bundle,并且本地有 source map 和 dist 文件时适用。也可在部署前用于发现过期或缺失的 source map。
- 运行要求
- 通过 stdio 在本地运行,通常用 npx sourcemap-retrace-mcp 启动,因此需要 Node.js 和 npm。未声明任何认证、环境变量或请求头。需要本地访问包含 .js.map 文件的目录;审计工具还需要 dist 目录及其引用的源文件。
安装
在 SourceWeft 中
- 打开 控制台中的 Sourcemap Retrace Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
🗺️ sourcemap-retrace-mcp
Your app crashed in production. The stack trace is useless. Your AI agent has no idea where the bug is.
MCP server that decodes minified production stack traces back to original TypeScript source files, lines, and columns — using source maps. Before your agent spends 20 minutes guessing at obfuscated code.
🤔 The problem
Your monitoring tool sends you this:
You ask your agent to debug it. The agent reads main.a3f2c1.js. It's 40,000 characters of minified JavaScript. It has no idea what e.<anonymous> at column 47821 means.
sourcemap-retrace-mcp maps that back to:
Now the agent knows exactly where to look.
🛠️ Tools
retrace_stack
Decode a minified stack trace back to original TypeScript source locations. Pass the raw stack trace and the directory containing your .js.map files.
retrieve_code_context
Show the original source lines surrounding a mapped error location — with line numbers and a column pointer.
audit_sourcemap_match
Validate that .map files in your dist directory are present and point to source files that actually exist on disk. Catches stale or missing maps before deployment.
⚡ Setup
🚀 Usage
"I have a production error. Here's the stack trace: [paste]. My dist files are in /path/to/dist. Retrace it, show me the code around the error, and tell me what's wrong."
The agent runs retrace_stack, then retrieve_code_context on the mapped location, and can finally read the actual TypeScript that crashed.
Works great alongside:
- env-secret-exposure-analyzer-mcp — scan for secrets before deploying
- release-readiness-triage-mcp — CI health check before release
📦 Links
License
MIT
来源:README.md,提交 9a53d14
工具
0版本历史
1- v0.2.0最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分