stacktrace MCP server
Commit Nov 13, 2026Converts raw crash output from multiple languages into compact root-cause reports and maps them to your local source code.
Also known as 0xmortuex/stacktrace-mcp
- Stars
- 0
- Tools
- —
- Downloads, 30 days
- —
- Latest version
- —
- Last commit
- Nov 13, 2026
- License
- MIT
What is stacktrace MCP?
stacktrace converts raw crash output from multiple languages into compact root-cause reports and maps them to your local source code.
Summary generated from the project's README
About stacktrace MCP server
Converting raw crash output from multiple programming languages into actionable root-cause reports is what stacktrace-mcp enables for developers. It processes error logs from Python, Node/V8, Java/Kotlin, Go, Rust, and .NET to identify the specific line in your local source code responsible for a failure. By distinguishing between application code and library frames, it highlights the innermost part of your project that triggered the exception.
Users can run this server locally using Claude Code or Claude Desktop via uvx. It requires a directory flag to establish a secure sandbox for mapping traces to your files. The server operates with zero external dependencies and includes built-in redaction to strip sensitive information like passwords, emails, and IP addresses from the output. It is designed to handle complex structures like Python ExceptionGroups or Go goroutine dumps while maintaining linear-time parsing for safety.
What you can do with it
- 1Identify root causes from CI crashesAsk the AI to analyze a pasted crash from a continuous integration pipeline to find the responsible file.
- 2Map production traces to local codeProvide a production traceback to see the exact offending lines within your local repository.
- 3Group and count recurring bugsScan large log files to find every stack trace and group them by a unique fingerprint to see which bug occurs most often.
- 4Compare two different error reportsDetermine if two different stack traces represent the same underlying bug using a per-frame diff.
- 5Sanitize logs for public ticketsRemove sensitive tokens, passwords, and personal identifiers from a trace before sharing it.
Written from the project's README. Every use case is checked against a quote from it.
Automated checks
Ran Nov 15, 2026Full report →Not verified yet. A server needs a score of 80, no serious finding, and enough data for us to check. How checks work · What to fix for more points
- Source repository linked and reachable0xmortuex/stacktrace-mcp is public and reachablegithub.com/0xmortuex/stacktrace-mcp ↗Pass
- Package names this repository as its sourceNot checked
- Build provenance (Sigstore attestation)Not checked
- Open source license (OSI)MITspdx.org/licenses/MIT.html ↗Pass
- Commit or release in the last yearLast commit or release 2026-11-13github.com/0xmortuex/stacktrace-mcp ↗Pass
- OpenSSF ScorecardNot checked
- Package name not close to a popular packageNot checked
- No critical advisory in the package or its dependenciesNot checked
- No hidden instructions to the model0 tool descriptions and the README read; no override phrases, credential paths or hidden charactersPass
- Destructive tools are labelledNot checked
- Remote endpoint answers the MCP handshakeNot checked
README
View on GitHubstacktrace-mcp
Paste a crash. Get the root cause, the line of your code that matters, and a hash that tells you whether you have seen it before.
stacktrace-mcp is an MCP server that turns raw crash output (Python, Node/V8, Java/Kotlin, Go, Rust, .NET) into a compact, correct report, and maps it onto the code in your project.
Why another stack trace tool?
Existing MCP servers in this space are either narrow or lossy: a paid hosted "log fingerprint" service (Apify Log Fingerprint & Triage), regex-based log analysers that read three languages (log-analyzer-mcp), or crash-dump tooling tied to WinDbg (mcp-windbg). What this one does differently:
- Six hand-written parsers, one model. Python chains and ExceptionGroup trees, Node
[cause]/AggregateError, JavaCaused by:with... N morereconstructed, Go goroutine dumps and race reports, RustRUST_BACKTRACE, .NET inner exceptions. Every trace gets a root cause, not just a first line. - Application vs library frames per language (site-packages, node_modules, JDK/framework packages, Go module cache, rustc std, .NET framework), so the innermost frame that is yours is highlighted.
- Maps frames onto your checkout even when the trace came from a container (
/app/src/x.pyvs./src/x.py), a Windows box, or a webpack bundle, with strict directory-sandbox protection. - Honest about bad input: truncated or garbled traces are parsed as far as possible and flagged PARTIAL with a reason.
- Local, free, zero dependencies beyond
mcp, linear-time parsing, and every output is redacted (secrets, emails, IPs, home-directory user names) by default.
Install
Needs uv. Nothing to clone.
Claude Code
claude mcp add stacktrace -- uvx stacktrace-mcp --dir .
Claude Desktop (claude_desktop_config.json)
{
"mcpServers": {
"stacktrace": {
"command": "uvx",
"args": ["stacktrace-mcp", "--dir", "C:\\path\\to\\your\\project"]
}
}
}
--dir is the sandbox for map_to_code and find_traces_in_file (repeat it for several
directories). Without it, the pure-text tools (parse_trace, fingerprint, compare_traces,
explain_exception, redact_trace) still work.
Try asking
- "Here is the crash from CI: (paste). What is the root cause and which of my files is responsible?"
- "Map this production traceback onto my repo and show me the offending lines."
- "Scan
logs/app.logand group every stack trace by fingerprint. Which bug happens most, and when did it first appear?" - "Are these two tracebacks the same bug?"
- "What does
ECONNREFUSEDusually mean, and what do I check first?" - "Redact this trace so I can paste it into a ticket."
Tools
| Tool | What it does |
|---|---|
parse_trace(text) |
Auto-detects the language; returns exception chain with the root cause, frames classified app/library/stdlib/framework/runtime, innermost application frame, fingerprint, PARTIAL notes. format="json" for the full structure. |
find_traces_in_file(path) |
Streams a big log (cap 256 MB), finds every trace among normal lines, groups by fingerprint with counts and first/last seen. |
fingerprint(text) |
Stable hash over language + exception types + innermost application frames. Ignores messages, addresses, ids, path prefixes, generated class names and (by default) line numbers. Shows its components. |
map_to_code(text) |
Resolves frames to files under --dir, verifies the line exists, shows the line with context, warns when the source changed since the crash. |
compare_traces(a, b) |
SAME / LIKELY SAME / POSSIBLY related / DIFFERENT with a per-frame diff. |
explain_exception(type, language?) |
About 80 common exceptions: meaning, three most common causes, what to check first. |
redact_trace(text) |
Removes tokens, passwords, JWTs, emails, IPs and home-directory user names. |
All tools except explain_exception take redact (default true).
What it understands
- Python: 3.8-3.13 tracebacks including
^^^^/~~~~caret ranges,__cause__/__context__chains,ExceptionGroup/TaskGroupboxes (nested),SyntaxErrorwith caret lines,KeyboardInterrupt,[Previous line repeated N more times],add_note()lines. - Node/V8 and browsers:
at fn (file:line:col),at async,eval at,[cause],AggregateError[errors], webpack-internal and Vite URLs, minified frames (flagged), props such ascode: 'ENOENT'. - Java/Kotlin/Scala:
Exception in thread,Caused by:,Suppressed:,... 23 more(the elided frames are copied from the enclosing trace),Native Method, module prefixes (java.base/,app//), logback~[jar:ver]suffixes. - Go:
panic:(including[recovered]re-panics),fatal error:withruntime stack:, goroutine dumps withcreated by, the race detector'sWARNING: DATA RACE. - Rust:
thread 'x' panicked atin the old and the 1.73+ message layout,RUST_BACKTRACEshort and full forms, std/core frames marked, cargo registry frames marked as library. - .NET:
at Ns.Class.Method() in file:line N,--->inner exceptions,AggregateExceptioninner exception lists, async state-machine frames.
Security
Trace text is untrusted data.
- Nothing in a trace is executed, imported or evaluated.
- Input is capped at 5,000,000 characters and 4,000 characters per line; every parser is single-pass and linear time. The test suite feeds each parser pathological shapes (a million open parentheses, 100k repeated headers, quadratic-regex bait) with a time limit.
- Paths in traces are data.
map_to_codenever opens a path taken from a trace: it indexes the files that actually exist under--dirand matches frames against that index by trailing path components, so../../etc/passwdcan only ever select a file already inside the sandbox. Symlinks are resolved withrealpathbefore every read and refused when they leave the sandbox; symlinked directories are not followed. find_traces_in_fileandmap_to_code(project_dir=...)only accept paths inside--dir.- Output is redacted by default. Redaction is pattern based (see
redact_trace); it is a safety net, not a guarantee, so review before publishing. IPv6 coverage is partial (full 8-group,fe80::, and bracketed forms).
Limits
Heuristics decide app vs library: a project vendored into site-packages or node_modules
looks like a library, and a library copied into your tree looks like your code. Minified
JavaScript frames cannot be mapped without a source map. Trace formats evolve; if a real trace
parses wrongly, please open an issue with the (redacted) text.
Development
uv sync --extra test
uv run pytest
uv run ruff check src tests
uv run mypy --strict src
MIT licensed. See also the companion course, stacktrace-mcp-the-hard-way.
stacktrace MCP questions
Which programming languages are supported?
The server supports Python, Node/V8, Java/Kotlin, Go, Rust, and .NET traces.
How does the tool handle sensitive information in logs?
All outputs are redacted by default, removing secrets, emails, IPs, and home-directory usernames.
Can it map traces from a container to my local code?
Yes, it can map frames onto your checkout even when the trace came from a container, a Windows box, or a webpack bundle.