# Source Map Debugger

> Source Map Debugger is an open-source MCP server for developer tools. MCP server to trace minified production errors back to original source files. It runs locally on your machine and is started by your AI client.

- **Kind:** MCP server
- **Pricing:** Open source
- **Platforms:** CLI, API, macOS, Linux, Windows, VS Code, Self-hosted
- **Repository:** https://github.com/bartwaardenburg/srcmap-mcp
- **MCP Registry name:** io.github.BartWaardenburg/srcmap-mcp
- **Categories:** [developer tools](https://ai-powered.com/categories/developer-tools)
- **Listing updated:** 2026-11-28

## About

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.

## Features

- **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

## Install

### Claude Code: Add with the CLI (Terminal)

```sh
claude mcp add srcmap-mcp -- npx -y srcmap-mcp
```

Add --scope user to use it in every project, or --scope project to share it in .mcp.json.

### Claude Code: Or share it with your project (.mcp.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Settings → Developer → Edit Config, then quit and reopen Claude Desktop.

### Cursor (~/.cursor/mcp.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Use .cursor/mcp.json in a project to share it with the project.

### VS Code (~/.copilot/mcp-config.json)

```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.

### Codex: Add with the CLI (Terminal)

```sh
codex mcp add srcmap-mcp -- npx -y srcmap-mcp
```

### Codex: Or add to config.toml (~/.codex/config.toml)

```toml
[mcp_servers.srcmap-mcp]
command = "npx"
args = ["-y", "srcmap-mcp"]
```

### Gemini CLI and Antigravity: Gemini CLI (~/.gemini/settings.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Or run: gemini mcp add -s user srcmap-mcp npx -- -y srcmap-mcp

### Gemini CLI and Antigravity: Antigravity (~/.gemini/config/mcp_config.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Use .agents/mcp_config.json to add it to one workspace only.

### Devin Desktop (~/.config/devin/mcp_config.json)

```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 (cline_mcp_settings.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Open it from the MCP Servers icon → Configure → Configure MCP Servers.

### Zed (Zed settings.json)

```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 (Settings → Tools → AI Assistant → Model Context Protocol (MCP) → Add)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

### JetBrains AI Assistant and Junie: Junie (~/.junie/mcp/mcp.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Use .junie/mcp/mcp.json to share it with a project.

### Kiro (~/.kiro/settings/mcp.json)

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

Use .kiro/settings/mcp.json to add it to one workspace only.

### Other clients (your client's MCP settings (most use this shape))

```json
{
  "mcpServers": {
    "srcmap-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "srcmap-mcp"
      ]
    }
  }
}
```

## Tools

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_validate` (name 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_lookup` (name suggests: reads): Find original position for a generated position, with source context
- `sourcemap_resolve`: Reverse lookup: find generated position for an original position
- `sourcemap_fetch` (name suggests: reads): Download a bundle and its source map from a URL
- `sourcemap_extract_sources`: Extract all embedded original sources to disk

## 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.

## Alternatives

- [Source Map Parser MCP](https://ai-powered.com/mcp/source-map-parser-mcp): Source Map Parser MCP is an open-source MCP server for developer tools.
- [Sourcemap Retrace MCP](https://ai-powered.com/mcp/sourcemap-retrace-mcp): Sourcemap Retrace MCP is an open-source MCP server for developer tools.
- [MCP Debugger](https://ai-powered.com/mcp/mcp-debugger): MCP Debugger is an open-source MCP server for developer tools.
- [Mapnostics](https://ai-powered.com/mcp/mapnostics): Mapnostics is a freemium MCP server for developer tools.
- [Mind Map](https://ai-powered.com/mcp/mind-map): Mind Map is an open-source MCP server for developer tools.
- [Ast Impact Mapper MCP](https://ai-powered.com/mcp/ast-impact-mapper-mcp): Ast Impact Mapper MCP is an open-source MCP server for developer tools.

---
Source: https://ai-powered.com/mcp/source-map-debugger
