sourcemap-retrace-mcp
Click on "Install 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., "@sourcemap-retrace-mcpRetrace this stack trace and show code context: TypeError at main.a3f2c1.js:1:47821"
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.
πΊοΈ sourcemap-retrace-mcp
Your app crashed in production. The stack trace is useless. Your AI agent has no idea where the bug is.
MCP server that decodes minified production stack traces back to original TypeScript source files, lines, and columns β using source maps. Before your agent spends 20 minutes guessing at obfuscated code.
π€ The problem
Your monitoring tool sends you this:
TypeError: Cannot read properties of undefined (reading 'userId')
at e.<anonymous> (main.a3f2c1.js:1:47821)
at h (vendor.d4e5f6.js:1:12045)
at processQueue (main.a3f2c1.js:1:89234)You ask your agent to debug it. The agent reads main.a3f2c1.js. It's 40,000 characters of minified JavaScript. It has no idea what e.<anonymous> at column 47821 means.
sourcemap-retrace-mcp maps that back to:
at validateSession (src/auth/session.ts:142:8)
at handleRequest (src/api/middleware.ts:67:3)Now the agent knows exactly where to look.
Related MCP server: butter-code-health
π οΈ Tools
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.
Retrace Results
Frames mapped: 3 | Unmapped: 1
TypeError: Cannot read properties of undefined (reading 'userId')
at validateSession (src/auth/session.ts:142:8)
at handleRequest (src/api/middleware.ts:67:3)
at processQueue (src/queue/processor.ts:28:12)
at Module._compile (node:internal/modules/cjs/loader:1376:14)retrieve_code_context
Show the original source lines surrounding a mapped error location β with line numbers and a column pointer.
Code Context
File: src/auth/session.ts
Target: line 142, column 8
139 β const session = await getSession(token);
140 β if (!session) throw new AuthError("invalid token");
141 β
> 142 β return session.userId;
β ^
143 β }
144 β
145 β export async function refreshSession(token: string) {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 before deployment.
Sourcemap Audit
Directory: dist/
Files checked: 4
OK: 3 | Missing maps: 0 | Broken sources: 1
β main.a3f2c1.js β 47 source(s) mapped
β vendor.d4e5f6.js β 312 source(s) mapped
β worker.b1c2d3.js β 8 source(s) mapped
β legacy.e7f8a9.js β 2 source(s) not found on disk:
../src/utils/deprecated.ts
../src/utils/compat.tsβ‘ Setup
{
"mcpServers": {
"sourcemap-retrace": {
"command": "npx",
"args": ["-y", "sourcemap-retrace-mcp"]
}
}
}π Usage
"I have a production error. Here's the stack trace: [paste]. My dist files are in /path/to/dist. Retrace it, show me the code around the error, and tell me what's wrong."
The agent runs retrace_stack, then retrieve_code_context on the mapped location, and can finally read the actual TypeScript that crashed.
Works great alongside:
env-secret-exposure-analyzer-mcp β scan for secrets before deploying
release-readiness-triage-mcp β CI health check before release
π¦ Links
License
MIT
Available Tools
7 toolsaudit_sourcemap_matchB
Validate that .map files in a dist directory align with their compiled .js counterparts.
| Name | Required | Description | Default |
|---|---|---|---|
| distDir | Yes | Path to the dist/build directory containing .js and .js.map files |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden of disclosing behavior. It states the validation intent but doesn't disclose whether the operation is read-only, what output it produces, or how misalignment is reported. This is a significant gap for a validation tool.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, focused sentence that directly conveys the core purpose. It avoids unnecessary detail and is well-structured for quick comprehension.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite the tool's relative simplicity, the description lacks key contextual details. It doesn't clarify what 'align' means in practical terms, what happens on failure, or how results are returned. With no output schema and no annotations, users are left without a complete picture of the tool's behavior.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already fully describes distDir as the path to the dist/build directory containing .js and .js.map files. The description adds no additional meaning beyond what the schema provides, so a baseline score of 3 is appropriate given the 100% schema coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function: validating that .map files align with their compiled .js counterparts. It uses a specific verb ('validate') and precise resource ('map files in a dist directory'), which distinguishes it from sibling tools focused on retracing or debug ID integrity.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like verify_debug_id_integrity or retrace_stack. It doesn't mention specific scenarios that warrant this validation or exclude cases handled by sibling tools, leaving the agent without decision support.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
ingest_telemetry_payloadA
Directly ingest Sentry, Bugsnag, or Datadog crash dumps and return fully retraced stack frames.
| Name | Required | Description | Default |
|---|---|---|---|
| payload | Yes | The raw JSON string of the crash telemetry event | |
| inAppOnly | No | Only return frames marked as part of the application source code | |
| sourcemapDir | Yes | Directory containing corresponding .map files |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description bears full responsibility. It states the core behavior but does not disclose whether data is persisted, what happens on invalid input, or any side effects. This is insufficient for a tool with no annotation support.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately leads with the action and resource. It is concise, front-loaded, and contains no redundant information.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, so the description must cover return values and workflow context. It mentions 'fully retraced stack frames' as the return, but lacks details about the processing pipeline, failure modes, or how it fits among siblings. It is minimally complete but not rich.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so all parameters are already documented. The description adds no extra parameter semantics or context beyond what the schema provides. The baseline of 3 is appropriate.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('ingest'), names concrete resources (Sentry, Bugsnag, Datadog crash dumps), and states the output ('fully retraced stack frames'). This clearly distinguishes it from sibling tools like retrace_stack, which likely operates on already-parsed stacks.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage for raw crash dumps from specific providers, but provides no explicit when-to-use vs. alternatives, no exclusions, and no mention of sibling tools. The context is clear but not actionable for choosing this over retrace_stack or others.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
normalize_bundler_pathsA
Resolve dynamic bundle references (like webpack://, ng://, or Vite /@fs/ paths) to raw files.
| Name | Required | Description | Default |
|---|---|---|---|
| rawPath | Yes | The raw source path reference from the source map | |
| sourceRoot | No | Source root configuration from the source map | |
| projectRoot | No | Root directory of the project |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the action ('resolve...to raw files') but does not mention important behaviors such as failure modes for unresolvable paths, whether the operation is read-only, or any required permissions. This is a significant gap for a tool with no annotation safety net.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single sentence that immediately conveys the core purpose and examples, with no redundant or filler content. Every word contributes value.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has moderate complexity (3 parameters, no output schema) and the description provides a clear high-level purpose. However, with no annotations, it lacks critical behavioral context (e.g., error handling, when to call it relative to sibling tools) that an agent would need to select and invoke it correctly. The schema fills parameter semantics, but overall guidance remains thin.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds relevant examples of path prefixes that map to rawPath, but it does not explain how sourceRoot and projectRoot interact with resolution beyond what the schema already states. It adds minimal value over the schema.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's function with a specific verb ('Resolve') and resource ('dynamic bundle references'), including concrete path examples (webpack://, ng://, Vite /@fs/) and the output ('raw files'). This distinguishes it from sibling tools like retrace_stack, which focus on stack traces rather than path normalization.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies the tool is for resolving source map path references, reinforced by the schema's rawPath description, but it does not explicitly state when to use this tool versus alternatives like retrieve_code_context or audit_sourcemap_match. No exclusions or alternative tool names are mentioned.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
retrace_stackA
Decode a minified production stack trace back to original TypeScript source files, lines, and columns.
| Name | Required | Description | Default |
|---|---|---|---|
| stackTrace | Yes | The raw minified error stack trace (multi-line string) | |
| sourcemapDir | Yes | Directory containing .map files (or the dist directory where .js.map files live) |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the transparency burden. It conveys a non-mutating decode operation, but doesn't disclose error behavior, prerequisites (e.g., sourcemap existence), or limitations (e.g., only TypeScript). The core behavior is clear, but edge-case behavior is absent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
A single, front-loaded sentence that states exactly what the tool does with no extraneous words. Every part adds value, and the structure is immediately scannable.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a two-parameter tool with no output schema, the description adequately conveys the return content (original file/line/column) and required inputs. It could mention failure modes (e.g., missing sourcemap) or return format details, but overall it is sufficient for an agent to understand the tool's role.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both required parameters, so the baseline is 3. The tool description doesn't add parameter-level detail beyond the schema; it only hints at the outcome (TypeScript files) rather than explaining how the parameters interact or expected formats.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb 'Decode' with a clear resource ('minified production stack trace') and outcome ('original TypeScript source files, lines, and columns'). It distinctly differentiates from sibling tools that focus on context retrieval, sourcemap auditing, or path normalization.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly implies the use case: when you have a minified production stack trace and need to map it to original source. However, it does not explicitly mention alternatives or exclusions, so it stops short of full guidance on when not to use or which sibling tool to prefer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
retrieve_code_contextA
Show the original source code lines surrounding a mapped error location.
| Name | Required | Description | Default |
|---|---|---|---|
| line | Yes | 1-based line number in the original source | |
| column | No | 0-based column number | |
| contextLines | No | Number of lines to show before and after the target line | |
| originalFile | Yes | Absolute path to the original TypeScript source file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries the full burden. The verb 'Show' indicates a read-only operation, and 'surrounding' clarifies context scope. However, it omits details such as file system prerequisites, handling of invalid paths, or return format, leaving some behavioral ambiguity.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, front-loaded sentence with no filler. Every word contributes meaning, achieving maximum clarity with minimal length.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a simple read tool with fully documented parameters and no output schema, the description sufficiently explains what the tool does and what it returns (source lines). It is complete for the tool's complexity, though not as rich as a 5 would require.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the baseline is 3. The description adds some context by linking 'mapped error location' to the parameters, but it does not provide additional semantic detail beyond what the schema already documents.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('Show') and resource ('original source code lines') with a clear scope ('surrounding a mapped error location'). It distinguishes this tool from siblings like retrace_stack (which maps stack traces) and audit_sourcemap_match (which validates sourcemap integrity).
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description clearly conveys when to use the tool: when you have a mapped error location and need surrounding source lines. It does not explicitly mention alternatives or exclusions, so it stops short of a 5, but the use case is well implied.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
surface_async_causalityA
Detect and trace across async boundaries (e.g. await, processTicksAndMicrotasks) to locate scheduling origins.
| Name | Required | Description | Default |
|---|---|---|---|
| stackTrace | Yes | The minified stack trace with async boundary markers | |
| sourcemapDir | Yes | Directory containing corresponding .map files |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full responsibility for behavioral transparency. It discloses the core operation (tracing across async boundaries) but does not disclose expected output format, side effects, prerequisites, or read-only nature. The description is accurate but lacks depth about what happens when the tool is invoked.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence, front-loaded with the action and including a concrete example. Every word contributes meaning, with no redundancy or fluff.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, so the description must explain what the tool returns or provides. It does not mention return values, result format, or failure conditions. For an async tracing tool, an agent needs to know what the output looks like to interpret it, making this a significant gap.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters, so the baseline is 3. The description does not add additional parameter-specific meaning, but it does clarify the domain of the stackTrace and sourcemapDir through the async boundary focus. This is sufficient given the schema already explains each field.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses specific action verbs 'Detect and trace' with a clear resource ('async boundaries') and a defined goal ('locate scheduling origins'). It distinguishes itself from sibling tools like retrace_stack and retrieve_code_context by focusing on async scheduling behavior rather than general stack retracing or code lookup.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies usage when async boundary tracing is needed, but provides no explicit guidance on when to use it over alternatives. It does not mention exclusions or contrast with sibling tools, leaving the agent to infer applicability from the tool's name and purpose.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
verify_debug_id_integrityB
Validate that a minified production bundle matches its source map using embedded Debug IDs.
| Name | Required | Description | Default |
|---|---|---|---|
| jsPath | Yes | Absolute path to the compiled JS file | |
| mapPath | Yes | Absolute path to the .map file |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description must fully disclose behavioral traits. It only states the validation intent without mentioning read-only behavior, error handling, return format, or side effects. The agent is left guessing what 'validate' produces or whether files are modified.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single concise sentence that states the tool's core function without unnecessary words. It is well-structured and immediately comprehensible.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The tool has no output schema and no annotations, yet the description does not explain what the validation result looks like (e.g., boolean, success/failure, exception). The agent lacks essential context to interpret the tool's outcome, making the description incomplete for practical use.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100% for both parameters (jsPath and mapPath), so the schema already adequately documents their meaning. The description adds no extra parameter-level detail beyond the tool's purpose, which is fine given the coverage.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action (Validate) and the specific resource (minified production bundle vs source map) using a distinctive mechanism (embedded Debug IDs). This distinguishes it from sibling tools like audit_sourcemap_match, which may use a different validation approach.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies use for verifying bundle-map integrity after minification, but provides no explicit when-to-use guidance or mention of alternative tools. It does not state when this tool should be preferred over sibling tools like audit_sourcemap_match.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
7 tool updates
v0.2.0- First observed
audit_sourcemap_match - First observed
ingest_telemetry_payload - First observed
normalize_bundler_paths - First observed
retrace_stack - First observed
retrieve_code_context - First observed
surface_async_causality - First observed
verify_debug_id_integrity
TDQS
Scored across 7 tools
Most tools have clearly distinct purposes, but retrace_stack and ingest_telemetry_payload both produce retraced frames, and audit_sourcemap_match and verify_debug_id_integrity both validate sourcemap integrity, which could cause some confusion. However, descriptions clarify the differences well.
All tool names follow a consistent verb_noun pattern with underscores, e.g., retrace_stack, audit_sourcemap_match, surface_async_causality. The verbs are specific and the nouns clearly indicate the target, making the set predictable and readable.
With 7 tools, the server is well-scoped for sourcemap retracing and analysis. Each tool addresses a meaningful aspect of the workflow without excessive overlap or unnecessary bloat.
The tool set covers core retracing, context retrieval, validation, path normalization, telemetry ingestion, and async tracing. Minor gaps such as direct support for sourcemap generation or batch processing are not essential for the stated purpose, so the surface is largely complete.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Ship production-ready TypeScript code in half the time, at half the cost.
Deterministic context layer for your codebase: change impact, blast radius, answers with receipts.
Investigate errors, track deployments, analyze performance, and manage application monitoring
- FixterOAuthdev.fixter
Monitoring for small teams. Logs, traces, metrics, live issue tracking, API/MCP uptime.
Related MCP Servers
- AlicenseAqualityCmaintenanceEnables mapping JavaScript error stack traces back to original source code, extracting context information to help developers locate and fix issues.3552MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI assistants to analyze code health in TypeScript/JavaScript projects, providing tools to run analysis, start a dashboard, and get summaries.223MIT
- AlicenseNot gradedqualityCmaintenanceEnables querying a TypeScript codebase's graph for call flows, type relationships, and symbol locations without reading file bodies.-
- AlicenseAqualityBmaintenanceProvides deep structural analysis of TypeScript and JavaScript code via the TypeScript Compiler API, offering 20 tools for functions, types, call graphs, code quality, dead code detection, and IDE integration.2011MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/vola-trebla/sourcemap-retrace-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server