MCP server for unpacking and analyzing Playwright trace.zip archives
Copy the AI prompt to install this server into Claude Code, Cursor, or another agent β or use 1-click editor setup below.
π‘ Paste the JSON block into your client's configuration file under mcpServers, then restart the application.
An MCP server that unpacks and structures Playwright trace.zip archives so AI agents can perform root-cause analysis on CI failures β without drowning in raw JSON or blowing up the context window.
When a Playwright test fails in CI, you get a trace.zip. It's a binary blob. LLMs can't read it natively, and dumping the raw contents exceeds the context window. Engineers end up copying log snippets into ChatGPT manually like it's 2022.
This MCP server solves that: 16 focused tools that expose exactly the signal an agent needs to diagnose a failure, with pagination and ARIA compression to keep token costs low.
Here is a quick look at how an AI agent uses the new tools in v0.3.0 to instantly find and inspect a failure:
Locate the exact source code bug via map_locator_to_source:
No more guessing! The agent knows exactly which file, line, and column caused the timeout.
Extract critical visual frames around the failure via extract_critical_frames:
Allows the agent to visual-verify page state immediately before/after failure without pulling massive image lists.
Trim the trace to save CI storage / transfer costs via trim_trace_archive:
Shrinks large traces by deleting screenshots outside the critical failure window. Saved 79% of disk space!
Tools are grouped by how an agent should sequence them when diagnosing a failure.
| Tool | Arguments | What it returns |
|---|---|---|
get_test_metadata | trace_path | Browser, platform, viewport, test title, wall-clock start time |
get_trace_summary | trace_path | Failing action + top-level error + total action count |
get_action_timeline | trace_path, limit, offset | Paginated list of all actions with API names, locators, and timings |
get_filtered_network_logs | trace_path, limit, offset | Only 4xx/5xx responses β static assets (CSS, JS, fonts, images) stripped |
get_console_errors | trace_path, limit, offset | JS exceptions and warnings from the browser console |
get_element_state_at_failure | trace_path | Failing locator, error message, and raw before/after metadata |
extract_trace_metadata_strict | trace_path | Format version, retry session breakdown, HAR payload mode (embed/attach/omit) |
All list-returning tools support limit (1β500, default 50) and offset pagination with a has_more flag.
trace_path accepts either an absolute local path or an HTTPS URL β the server downloads the file automatically and caches it for the session.
| Tool | Arguments | What it returns |
|---|---|---|
get_aria_accessibility_tree | trace_path, action_index? | ARIA accessibility tree as compact YAML (~90% fewer tokens than raw HTML). Defaults to the snapshot at the failed action. |
get_dom_mutation_delta | trace_path, action_index | Set-diff of ARIA lines before vs after a specific action β added/removed elements only, not two full DOM dumps |
get_screenshot_at_failure | trace_path, screenshot_index? | Base64 JPEG screenshot closest to the moment of failure. Use when ARIA tree is empty (captcha, blank page). screenshot_index lets you walk the full visual timeline. |
analyze_race_conditions | trace_path | Network requests that were in-flight when an interaction or assertion fired |
correlate_dom_and_network | trace_path | For each action where a fetch completed and the DOM mutated within Β±100ms: triggering URL, response status, body snippet, and exact nodes added/removed |
extract_critical_frames | trace_path, lookback_ms?, lookforward_ms?, limit? | Extracts key screencast screenshots (base64) from a temporal window around failure, resolved with step titles |
| Tool | Arguments | What it returns |
|---|---|---|
get_causal_chain_for_failure | trace_path, lookback_ms? | Chronological chain of preceding actions, network errors, and console errors leading to the failure (default window: 5 s) |
generate_error_signature | trace_path | Stable 12-char SHA-1 hash of the normalized error β use to group duplicate failures across parallel CI runs |
compare_traces | passing_trace_path, failing_trace_path | LCS-aligned action sequence between a passing and failing run: structural divergence, timing anomalies (>500 ms), unmatched actions, network delta |
map_locator_to_source | trace_path, action_index? | Maps a failing browser interaction (or specific action index) to the exact line of test code via runner execution stack |
| Tool | Arguments | What it returns |
|---|---|---|
detect_performance_anomalies | trace_path, slow_action_threshold_ms?, frame_drop_threshold_ms? | Ranked list of slow actions and frame drops with suspected_cause (main thread blocked / network saturation / navigation timeout). Also reports p50/p95 action duration and a memory leak flag. |
trim_trace_archive | trace_path, divergence_only? | Shrinks trace zip by deleting screenshots outside critical failure window (t_fail - 5s to t_fail + 1s). Returns trimmed path & size delta. |
No reviews yet β be the first to share how this listing worked for you.
Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.
[](https://allmcps.com/mcp/playwright-trace-decoder-mcp)<a href="https://allmcps.com/mcp/playwright-trace-decoder-mcp"><img src="https://allmcps.com/api/badge/playwright-trace-decoder-mcp?style=directory" alt="Playwright Trace Decoder MCP on AllMCPs" /></a>