
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 分