Sourcemap MCP Server

MCP server that decodes minified production stack traces back to original TypeScript source files, lines, and columns using source maps.

Local serverstdioTypeScript

What is the Sourcemap MCP server?

Most file and storage access work still happens through a UI a human drives. Sourcemap MCP server moves it into the conversation instead. MCP server that decodes minified production stack traces back to original TypeScript source files, lines, and columns using source maps.

The tools it exposes

The server publishes 3 tools. What each one is for:

  • 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

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client. The configuration blocks on this page cover the common clients.

How it compares

This sits in the file and storage access group, where several servers overlap in what they claim to do but differ sharply once you actually set them up. Sourcemap's toolset — retrace_stack, retrieve_code_context, audit_sourcemap_match — is a fair guide to whether it matches your workflow. It is maintained by vola-trebla; worth a glance at recent repository activity before you build anything load-bearing on it.

We check each listing at SyncDev against the project's documentation before it goes live — if something here drifts out of date, it is a bug worth reporting.

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

Available tools

ToolWhat it does
retrace_stackDecode 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_contextShow the original source lines surrounding a mapped error location — with line numbers and a column pointer.
audit_sourcemap_matchValidate 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.

How to install the Sourcemap MCP server

{
  "mcpServers": {
    "sourcemap-retrace": {
      "command": "npx",
      "args": ["-y", "sourcemap-retrace-mcp"]
    }
  }
}

Configuration as documented by the project. Restart the client after saving.

Example prompts to try

  • Use Sourcemap to retrace stack.
  • Use Sourcemap to retrieve code context.
  • Use Sourcemap to audit sourcemap match.

Frequently asked questions

It connects Sourcemap to MCP-compatible AI assistants such as Claude and Cursor, exposing 3 tools (retrace_stack, retrieve_code_context, audit_sourcemap_match) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Sourcemap directly.