Source Map Debugger
MCP server to trace minified production errors back to original source files
Source Map Debugger is an open-source MCP server for developer tools. It runs locally on your machine and is started by your AI client.
- Pricing
- Open source
- Platforms
- CLI, API, macOS
- Runs
- Locally
- Version
- 0.2.1
- Listing updated
Similar MCP servers
Install
Add with the CLI
Run in a terminal
claude mcp add srcmap-mcp -- npx -y srcmap-mcpAdd --scope user to use it in every project, or --scope project to share it in .mcp.json.
Or share it with your project
Add to .mcp.json
{
"mcpServers": {
"srcmap-mcp": {
"command": "npx",
"args": [
"-y",
"srcmap-mcp"
]
}
}
}Add to claude_desktop_config.json
{
"mcpServers": {
"srcmap-mcp": {
"command": "npx",
"args": [
"-y",
"srcmap-mcp"
]
}
}
}Settings → Developer → Edit Config, then quit and reopen Claude Desktop.
Add to ~/.cursor/mcp.json
{
"mcpServers": {
"srcmap-mcp": {
"command": "npx",
"args": [
"-y",
"srcmap-mcp"
]
}
}
}Use .cursor/mcp.json in a project to share it with the project.
Add to ~/.copilot/mcp-config.json
{
"mcpServers": {
"srcmap-mcp": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"srcmap-mcp"
]
}
}
}Or put the same entry in .mcp.json at your workspace root to share it.
Add with the CLI
Run in a terminal
codex mcp add srcmap-mcp -- npx -y srcmap-mcpOr add to config.toml
Add to ~/.codex/config.toml
[mcp_servers.srcmap-mcp]
command = "npx"
args = ["-y", "srcmap-mcp"]Add to your client's MCP settings (most use this shape)
{
"mcpServers": {
"srcmap-mcp": {
"command": "npx",
"args": [
"-y",
"srcmap-mcp"
]
}
}
}Gemini CLI and Antigravity
Gemini CLI
Add to ~/.gemini/settings.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Or run: gemini mcp add -s user srcmap-mcp npx -- -y srcmap-mcp
Antigravity
Add to ~/.gemini/config/mcp_config.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Use .agents/mcp_config.json to add it to one workspace only.
Devin Desktop (formerly Windsurf)
Add to ~/.config/devin/mcp_config.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }On Windows the file is %APPDATA%\devin\mcp_config.json. Use .devin/mcp_config.json to share it with a project.
Cline
Add to cline_mcp_settings.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Open it from the MCP Servers icon → Configure → Configure MCP Servers.
Zed
Add to Zed settings.json
{ "context_servers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Open it with zed: open settings file. Merge context_servers into the settings you already have.
JetBrains AI Assistant and Junie
AI Assistant
Add to Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Junie
Add to ~/.junie/mcp/mcp.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Use .junie/mcp/mcp.json to share it with a project.
Kiro
Add to ~/.kiro/settings/mcp.json
{ "mcpServers": { "srcmap-mcp": { "command": "npx", "args": [ "-y", "srcmap-mcp" ] } } }Use .kiro/settings/mcp.json to add it to one workspace only.
Using several servers? Build one config file with the MCP config generator.
Configuration
SRCMAP_BINARYPath to the srcmap CLI binary (default: srcmap)SRCMAP_CACHE_TTLCache TTL in seconds (default: 300, 0 to disable)SRCMAP_TOOLSETSComma-separated toolsets to enable: inspection, lookup, fetch (default: all)
About Source Map Debugger
Srcmap MCP gives an AI assistant the ability to pull a deployed JavaScript bundle and its source map, then translate minified positions into the original file, line and surrounding code. It wraps the srcmap command-line tool and exposes its functions as MCP tools, so a stack trace from an error tracker can be resolved without leaving the editor.
The server is organised into three toolsets: inspection for reading source map metadata, validating files and paging through mappings; lookup for forward and reverse position queries; and fetch for downloading bundles and extracting embedded sources to disk. Each toolset can be switched on or off through an environment variable, and results are cached for a configurable period.
It suits front-end developers and support engineers who need to read minified production code, trace crashes reported by monitoring services, or explore the source tree that is actually running on a live site. It runs locally over stdio and requires Node.js and the srcmap CLI to be installed.
Tools this server provides (8)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 3 of 8 tools read data; 5 names don't say.
From the server's own tool labels and tool names; not verified by us.
- sourcemap_info
- Show source map metadata and statistics
- sourcemap_validateName suggests: reads
- Validate a source map file
- sourcemap_sources
- List all original source files in a source map
- sourcemap_mappings
- List mappings with pagination and source filtering
- sourcemap_lookupName suggests: reads
- Find original position for a generated position, with source context
- sourcemap_resolve
- Reverse lookup: find generated position for an original position
- sourcemap_fetchName suggests: reads
- Download a bundle and its source map from a URL
- sourcemap_extract_sources
- Extract all embedded original sources to disk
What it does
- Source position lookup
- Maps a generated line and column in a minified bundle back to the original file and location, with source context.
- Reverse position lookup
- Finds the generated position in a bundle for a given position in an original source file.
- Bundle and map fetching
- Downloads a production bundle and its associated source map from a URL.
- Embedded source extraction
- Writes all original sources embedded in a source map to a local directory for browsing.
- Source map inspection
- Reports metadata and statistics, validates map files, and lists sources and paginated mappings.
- Selectable toolsets
- Enables only the inspection, lookup or fetch tools through a configuration variable.
- Configurable caching
- Keeps fetched results in cache for a set time-to-live, which can be disabled.
Good for
- Translate a minified stack trace from an error tracker into readable file and line references
- Find the original source file behind an error at a specific position in a production bundle
- Extract the full original project tree from a deployed website to explore its code
- Check whether a source map file is valid and inspect its contents before debugging
- Locate where a function in an original source file appears in the generated bundle
Pricing
Open source
Free and MIT licensed
Source Map Debugger FAQ
Which client applications can use Source Map Debugger?
Setup instructions are given for Claude Code, Codex CLI, Gemini CLI, VS Code, Claude Desktop, Windsurf, Cline, Zed and Docker.
What needs to be installed besides the server?
Node.js version 20 or later and the srcmap CLI, which is installed with cargo install srcmap-cli.
Can I turn off some of the tools?
Yes. The SRCMAP_TOOLSETS variable takes a comma-separated list of inspection, lookup and fetch to enable only those groups.
What is the default cache duration?
Results are cached for 300 seconds by default, and setting SRCMAP_CACHE_TTL to 0 disables caching.
Is Source Map Debugger free?
Yes. Source Map Debugger is open source, so you can use and self-host it for free.
How do I add Source Map Debugger to Claude Code?
Run this command in your terminal: claude mcp add srcmap-mcp -- npx -y srcmap-mcp
What are the best alternatives to Source Map Debugger?
The closest alternatives to Source Map Debugger are Source Map Parser MCP, Sourcemap Retrace MCP, MCP Debugger, Mapnostics and Mind Map.
Where this comes from
- Description: written from the project's README and its MCP Registry entry.
- Install steps: from the official MCP Registry entry.