
Source Map Parser Mcp
io.github.MasonChow由 GitHub 帳號 MasonChow 發布v1.3.2更新於 Oct 24, 2026
Parse JavaScript error stack traces back to original source code using source maps
發布方自己的服務:Parser Club
概覽
透過 source map 把 JavaScript 錯誤堆疊還原成原始原始碼位置,並回傳對應的原始碼行與上下文。
- 可以做什麼
- 解析堆疊:依行號、欄號與 source map 位址定位原始原始碼,支援單筆與批次
- 查詢上下文:查看壓縮或打包後程式碼中某個位置對應的原始原始碼片段
- 解包原始碼:從 source map 取出所有原始檔案與內容
- 讀取服務內建的使用說明
- 適用情境
- 適合除錯壓縮或打包後的 JavaScript:讓助理把線上錯誤堆疊轉成可讀的原始原始碼與上下文,不必手動開啟 source map。
- 執行需求
- 以 stdio 方式在本機執行,需要 Node.js 20 以上版本(部分 Node 20 環境需啟用實驗性 WebAssembly 參數)。傳入的 source map 位址必須可存取。可選環境變數 SOURCE_MAP_PARSER_CONTEXT_OFFSET_LINE 與 SOURCE_MAP_PARSER_RESOURCE_CACHE_MAX_SIZE 用來調整上下文行數與快取大小。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Source Map Parser Mcp,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
[MseeP.ai Security Assessment Badge]
Source Map Parser
[Node Version] [npm] [Downloads] [Build Status] [codecov] [圖片]
[圖片]This project implements a WebAssembly-based Source Map parser that can map JavaScript error stack traces back to source code and extract relevant context information. Developers can easily map JavaScript error stack traces back to source code for quick problem identification and resolution. This documentation aims to help developers better understand and use this tool.
MCP Integration
Note: Requires Node.js 20+ support
Option 1: Run directly with NPX
Option 2: Download the build artifacts
Download the corresponding version of the build artifacts from the GitHub Release page, then run:
Use as an npm package (bring your own MCP server)
You can embed the tools into your own MCP server process and customize behavior.
Install:
Minimal server (TypeScript):
Build and Type Declarations
This project ships both ESM and CJS builds and a single bundled TypeScript declaration file.
- Build outputs:
- ESM:
dist/index.es.js - CJS:
dist/index.cjs.js - CLI entry:
dist/main.es.js - Types:
dist/index.d.ts(single bundled d.ts)
- ESM:
Quick build locally:
Using types in your project:
Runtime Parameter Configuration
System runtime parameters can be flexibly configured through environment variables to meet the needs of different scenarios
SOURCE_MAP_PARSER_RESOURCE_CACHE_MAX_SIZE: Sets the maximum memory space occupied by resource cache, default is 200MB. Adjusting this value appropriately can balance performance and memory usage.SOURCE_MAP_PARSER_CONTEXT_OFFSET_LINE: Defines the number of context code lines to display around the error location, default is 1 line. Increasing this value provides more context information, facilitating problem diagnosis.
Example:
Feature Overview
- Stack Parsing: Parse the corresponding source code location based on provided line number, column number, and Source Map file.
- Batch Processing: Support parsing multiple stack traces simultaneously and return batch results.
- Context Extraction: Extract context code for a specified number of lines to help developers better understand the environment where errors occur.
- Context Lookup: Look up original source code context for specific compiled code positions.
- Source Unpacking: Extract all source files and their content from source maps.
MCP Service Tool Description
operating_guide
Get usage instructions for the MCP service. Provides information on how to use the MCP service through chat interaction.
parse_stack
Parse stack information by providing stack traces and Source Map addresses.
Request Example
- stacks: Stack information including line number, column number, and Source Map address.
- line: Line number, required.
- column: Column number, required.
- sourceMapUrl: Source Map address, required.
Response Example
lookup_context
Look up original source code context for a specific line and column position in compiled/minified code.
Request Example
- line: The line number in the compiled code (1-based), required.
- column: The column number in the compiled code, required.
- sourceMapUrl: The URL of the source map file, required.
- contextLines: Number of context lines to include (default: 5), optional.
Response Example
unpack_sources
Extract all source files and their content from a source map.
Request Example
- sourceMapUrl: The URL of the source map file to unpack, required.
Response Example
Parsing Result Description
success: Indicates whether the parsing was successful.token: The Token object returned when parsing is successful, containing source code line number, column number, context code, and other information.error: Error information returned when parsing fails.
Example Run
System Prompt
According to actual needs, you can use system prompts to guide the model on how to parse stack information. For security or performance reasons, some teams may not want to expose Source Maps directly to the browser for parsing, but instead process the upload path of the Source Map. For example, converting the path bar-special.js to special/bar.js.map. In this case, you can instruct the model to perform path conversion through prompt rules.
Here is an example:
Runtime Example
Error Stack
FAQ
1. WebAssembly Module Loading Failure
If the tool returns the following error message, please troubleshoot as follows:
parser init error: WebAssembly.instantiate(): invalid value type 'externref', enable with --experimental-wasm-reftypes @+86
- Check Node.js Version: Ensure Node.js version is 20 or higher. If it's lower than 20, please upgrade Node.js.
- Enable Experimental Flag: If Node.js version is 20+ but you still encounter issues, use the following command to start the tool:
Local Development Guide
1. Install Dependencies
Ensure Node.js and npm are installed, then run the following command to install project dependencies:
2. Link MCP Service
Run the following command to start the MCP server:
Internal Logic Overview
1. Main File Description
stack_parser_js_sdk.js: JavaScript wrapper for the WebAssembly module, providing core stack parsing functionality.parser.ts: Main implementation of the parser, responsible for initializing the WebAssembly module, retrieving Source Map content, and parsing stack information.server.ts: Implementation of the MCP server, providing theparse_stacktool interface for external calls.
2. Modify Parsing Logic
To modify the parsing logic, edit the getSourceToken method in the parser.ts file.
3. Add New Tools
In the server.ts file, new tool interfaces can be added using the server.tool method.
Notes
- Source Map Files: Ensure that the provided Source Map file address is accessible and the file format is correct.
- Error Handling: During parsing, network errors, file format errors, and other issues may be encountered; it's recommended to implement proper error handling when making calls.
Contribution Guidelines
Contributions via Issues and Pull Requests are welcome to improve this project.
License
This project is licensed under the MIT License. See the LICENSE file for details.
來源:README.md,提交 2c21e0b
工具
0版本歷史
1- v1.3.2最新Sep 16, 2026
評分
已滿足適用檢查項的 50%
該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。
- 近 30 天內可連通25 分
請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。
- 已宣告認證方式10 分
請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。
- 已列出工具15 分
請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。
- 描述必需15 分
- 圖示10 分
- 文件15 分
- 授權條款10 分
其他 Parser 整合
Parser Club
club.parser官方發布者
Parser Club 讓助理查詢並執行針對 Telegram、VKontakte、電商平台與俄羅斯登記冊的付費資料蒐集任務,另附免費 Telegram 細分資料。

Map Parser
由 GitHub 帳號 changzhiai 發布
將Google Maps連結解析為帶座標的站點。支援地理編碼、路線規劃和匯出。AI 翻譯
x402 Payment Request Parser
由 GitHub 帳號 mk-career-planning 發布
x402 支付請求解析器,帶有受限的代幣列表。不簽名、不核准也不評判支付。AI 翻譯

PDF to Markdown & Document Parser
由 GitHub 帳號 fernandoguiraud16-coder 發布
託管於 Apify 的 MCP 伺服器,可將 PDF、Word、Excel、PowerPoint 及掃描檔轉為 Markdown、表格與 RAG 分塊,並支援 OCR。

AIDataParser
由 GitHub 帳號 shibley 發布
AIDataParser 是託管式 MCP 伺服器,可將 PDF、圖片和雜亂文字轉為符合 schema 的 JSON,提供免費試用擷取與以點數計費的付費解析。