srcmap-mcp
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@srcmap-mcp find the original source for main-2f8a.js:1:34291 on https://app.example.com"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
srcmap-mcp
MCP server for source map debugging. Fetch, inspect, look up, and extract original sources from any production website — directly from your AI assistant.
The server supports MCP specification 2026-07-28. Clients that use the 2025 handshake also work.
Add To Your Editor
Claude Code
claude mcp add srcmap-mcp -- npx srcmap-mcpCodex CLI
codex --mcp-config '{"srcmap-mcp":{"command":"npx","args":["srcmap-mcp"]}}'Gemini CLI
gemini --mcp-config '{"srcmap-mcp":{"command":"npx","args":["srcmap-mcp"]}}'VS Code
Add to .vscode/mcp.json:
{
"servers": {
"srcmap-mcp": {
"command": "npx",
"args": ["srcmap-mcp"]
}
}
}Claude Desktop / Windsurf / Cline
Add to your MCP config file:
{
"mcpServers": {
"srcmap-mcp": {
"command": "npx",
"args": ["srcmap-mcp"]
}
}
}Zed
Add to Zed settings:
{
"context_servers": {
"srcmap-mcp": {
"command": {
"path": "npx",
"args": ["srcmap-mcp"]
}
}
}
}Docker
docker run -i --rm ghcr.io/bartwaardenburg/srcmap-mcpRelated MCP server: MCP JS Debugger
Prerequisites
Node.js >= 20 and the srcmap CLI:
cargo install srcmap-cliFeatures
8 tools across 3 categories for complete source map debugging:
Inspection (4 tools)
Tool | Description |
| Show source map metadata and statistics |
| Validate a source map file |
| List all original source files in a source map |
| List mappings with pagination and source filtering |
Lookup (2 tools)
Tool | Description |
| Find original position for a generated position, with source context |
| Reverse lookup: find generated position for an original position |
Fetch (2 tools)
Tool | Description |
| Download a bundle and its source map from a URL |
| Extract all embedded original sources to disk |
Configuration
Variable | Required | Default | Description |
| No |
| Path to the srcmap CLI binary |
| No |
| Cache TTL in seconds (0 to disable) |
| No | all | Comma-separated toolsets to enable |
Toolset names match the Features categories: SRCMAP_TOOLSETS=lookup,fetch enables only the lookup and fetch tools.
Example Usage
Debug a production error
Sentry is showing
TypeError: Cannot read property 'items' of undefinedatmain-2f8a.js:1:34291on https://app.example.com — what's the original source?
The assistant fetches the bundle and source map, looks up the position, and shows you the exact original file and line causing the error — with surrounding context.
Investigate what's deployed
What code is actually running on https://app.example.com? Extract the source tree so we can look around.
The assistant pulls the production bundles, extracts all original sources, and gives you the full project structure to explore.
Trace a bug from a stack trace
Users are reporting a crash on our checkout page. Here's the minified stack trace — can you trace each frame back to the original source?
at https://cdn.example.com/checkout-a3f2.js:1:48293 at https://cdn.example.com/checkout-a3f2.js:1:51007 at https://cdn.example.com/vendor-9b1e.js:1:12844
The assistant resolves each frame to the original file, function name, and line number — turning a wall of minified positions into a readable stack trace.
Development
pnpm install # Install dependencies
pnpm dev # Run in development mode
pnpm build # Compile TypeScript
pnpm test # Run tests
pnpm typecheck # Type check without emittingLicense
MIT
Available Tools
8 toolssourcemap_extract_sourcesExtract Original SourcesA
Extract all embedded original source files from a source map to disk. Writes each sourcesContent entry as a file, preserving the directory structure. Handles webpack://, file://, and relative path prefixes. Use this after fetching a source map to get the full original source tree.
Inputs: file (required), outputDir.
sourcemap_fetchFetch Bundle & Source MapA
Download a JavaScript or CSS bundle and its source map from a URL. Automatically resolves the sourceMappingURL reference (inline data URIs, external URLs, and conventional .map suffix fallback). Saves both files to the output directory. Use this as the first step when debugging a production website.
Inputs: url (required), outputDir.
sourcemap_infoSource Map InfoARead-only
Show metadata and statistics for a source map file. Returns file name, source count, names, mappings count, lines, content size, and debug ID. Use this to understand what a source map contains before doing lookups.
Inputs: file (required).
sourcemap_lookupLookup Original PositionARead-only
Find the original source position for a generated (minified) position. Given a line and column in the generated/minified file, returns the original source file, line, column, and optionally the identifier name. Use --context to also get surrounding lines of original source code. All positions are 0-based.
Inputs: file (required), line (required), column (required), context.
sourcemap_mappingsList MappingsBRead-only
List mappings in a source map with pagination. Shows generated and original positions for each mapping. Optionally filter by source file. Use --limit and --offset for pagination.
Inputs: file (required), limit, offset, source.
sourcemap_resolveResolve Generated PositionARead-only
Reverse lookup: find the generated (minified) position for an original source position. Given a source file, line, and column, returns the generated line and column. All positions are 0-based.
Inputs: file (required), line (required), column (required), source (required).
sourcemap_sourcesList SourcesARead-only
List all original source files embedded in a source map. Shows each source path, whether it has embedded content, content size, and if it's on the ignore list. Use this to understand what files a bundle was built from.
Inputs: file (required).
sourcemap_validateValidate Source MapARead-only
Validate that a file is a valid source map. Reports whether the map is valid and its basic structure (sources, names, mappings count).
Inputs: file (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 8 tools
The tools are mostly clearly distinct: lookup and resolve are explicit forward/reverse operations, while sources and extract_sources separate listing from writing files. The main overlap is between sourcemap_info and sourcemap_validate, which both report structural metadata, though their primary purposes are still distinguishable.
All tools consistently use the sourcemap_ prefix with snake_case verb/noun naming. The pattern is predictable throughout the set.
Eight tools are well-scoped for a source-map inspection and debugging server. Each tool covers a distinct part of the workflow without unnecessary bloat.
The surface covers the full source-map workflow: fetching, validation, metadata inspection, source listing/extraction, mappings listing, and bidirectional position lookup. No major dead ends are apparent for the stated domain.
Maintenance
Related MCP Connectors
Live browser debugging for AI assistants — DOM, console, network via MCP.
Web search and page reading for AI agents: search, fetch, scrape, map and crawl, with sources.
Web search, data extraction and controlled browser automation for AI assistants via OAuth.
Unblocking and fresh web data for agents: URL to Markdown, YouTube, Maps, Amazon, jobs. Pay per call
Related MCP Servers
- AlicenseAqualityDmaintenanceEnables mapping JavaScript error stack traces back to original source code, extracting context information to help developers locate and fix issues.32MIT
- AlicenseAqualityDmaintenanceEnables AI assistants to debug JavaScript and TypeScript applications by connecting to Chrome DevTools Protocol-compatible debuggers, allowing them to set breakpoints, step through code, inspect variables, and evaluate expressions with full source map support.182Apache 2.0
- AlicenseAqualityCmaintenanceEnables AI coding assistants to debug and analyze JavaScript code in web pages through breakpoint debugging, function hooking, network analysis, and runtime inspection of scripts including minified code.241,007 npm3,102Apache 2.0
- AlicenseCqualityDmaintenanceEnables AI assistants to connect to browser DevTools and backend debuggers for full-stack debugging, including frontend console, network, performance, and backend log analysis.1623 npm7MIT