vola-trebla avatar

Playwright Trace Decoder Mcp

vola-trebla/playwright-trace-decoder-mcp

When Playwright tests fail in CI, you get a trace.zip that's too large for LLM context windows and full of binary data agents can't parse. This server unpacks those archives into 16 focused tools that expose exactly what you need for root cause analysis. You can map locators to source code lines, extract ARIA trees as compressed YAML, filter network logs to only 4xx/5xx responses, correlate DOM mutations with in-flight requests, and pull screenshots from the moment of failure. It handles both local paths and HTTPS URLs, supports pagination to control token costs, and includes a trim operation that strips non-critical screenshots to shrink archives by 70-80%. Reach for this when you're tired of manually copying Playwright logs into ChatGPT and want an agent to diagnose flaky selectors, race conditions, and timing issues automatically.

GitHub stars
1
tools
19
transport
STDIO
last updated
May 19, 2026

Tools

19 tools

Public tool metadata for what this MCP can expose to an agent.

get_test_metadataBrowser, platform, viewport, test title, wall-clock start time

Browser, platform, viewport, test title, wall-clock start time

No parameter schema in public metadata yet.

get_trace_summaryFailing action + top-level error + total action count

Failing action + top-level error + total action count

No parameter schema in public metadata yet.

get_action_timelinePaginated list of all actions with API names, locators, and timings

Paginated list of all actions with API names, locators, and timings

No parameter schema in public metadata yet.

get_filtered_network_logsOnly 4xx/5xx responses — static assets (CSS, JS, fonts, images) stripped

Only 4xx/5xx responses — static assets (CSS, JS, fonts, images) stripped

No parameter schema in public metadata yet.

get_console_errorsJS exceptions and warnings from the browser console

JS exceptions and warnings from the browser console

No parameter schema in public metadata yet.

get_element_state_at_failureFailing locator, error message, and raw before/after metadata

Failing locator, error message, and raw before/after metadata

No parameter schema in public metadata yet.

extract_trace_metadata_strictFormat version, retry session breakdown, HAR payload mode (embed/attach/omit)

Format version, retry session breakdown, HAR payload mode (embed/attach/omit)

No parameter schema in public metadata yet.

get_aria_accessibility_treeARIA accessibility tree as compact YAML (~90% fewer tokens than raw HTML). Defaults to the snapshot at the failed action.

ARIA accessibility tree as compact YAML (~90% fewer tokens than raw HTML). Defaults to the snapshot at the failed action.

No parameter schema in public metadata yet.

get_dom_mutation_deltaSet-diff of ARIA lines before vs after a specific action — added/removed elements only, not two full DOM dumps

Set-diff of ARIA lines before vs after a specific action — added/removed elements only, not two full DOM dumps

No parameter schema in public metadata yet.

get_screenshot_at_failureBase64 JPEG screenshot closest to the moment of failure. Use when ARIA tree is empty (captcha, blank page).

Base64 JPEG screenshot closest to the moment of failure. Use when ARIA tree is empty (captcha, blank page).

No parameter schema in public metadata yet.

analyze_race_conditionsNetwork requests that were in-flight when an interaction or assertion fired

Network requests that were in-flight when an interaction or assertion fired

No parameter schema in public metadata yet.

correlate_dom_and_networkFor each action where a fetch completed and the DOM mutated within ±100ms: triggering URL, response status, body snippet, and exact nodes added/removed

For each action where a fetch completed and the DOM mutated within ±100ms: triggering URL, response status, body snippet, and exact nodes added/removed

No parameter schema in public metadata yet.

extract_critical_framesExtracts key screencast screenshots (base64) from a temporal window around failure, resolved with step titles

Extracts key screencast screenshots (base64) from a temporal window around failure, resolved with step titles

No parameter schema in public metadata yet.

get_causal_chain_for_failureChronological chain of preceding actions, network errors, and console errors leading to the failure (default window: 5 s)

Chronological chain of preceding actions, network errors, and console errors leading to the failure (default window: 5 s)

No parameter schema in public metadata yet.

generate_error_signatureStable 12-char SHA-1 hash of the normalized error — use to group duplicate failures across parallel CI runs

Stable 12-char SHA-1 hash of the normalized error — use to group duplicate failures across parallel CI runs

No parameter schema in public metadata yet.

compare_tracesLCS-aligned action sequence between a passing and failing run: structural divergence, timing anomalies (>500 ms), unmatched actions, network delta

LCS-aligned action sequence between a passing and failing run: structural divergence, timing anomalies (>500 ms), unmatched actions, network delta

No parameter schema in public metadata yet.

map_locator_to_sourceMaps a failing browser interaction (or specific action index) to the exact line of test code via runner execution stack

Maps a failing browser interaction (or specific action index) to the exact line of test code via runner execution stack

No parameter schema in public metadata yet.

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

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.

No parameter schema in public metadata yet.

trim_trace_archiveShrinks trace zip by deleting screenshots outside critical failure window (t_fail - 5s to t_fail + 1s). Returns trimmed path & size delta.

Shrinks trace zip by deleting screenshots outside critical failure window (t_fail - 5s to t_fail + 1s). Returns trimmed path & size delta.

No parameter schema in public metadata yet.

Sponsors

Readme

🎭 playwright-trace-decoder-mcp

npm version npm downloads CI License: MIT

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.

🤔 The Problem

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.


View the full README on GitHub

Details

Repository
github.com/vola-trebla/playwright-trace-decoder-mcp
Categories
Web & Browser Automation, Monitoring & Observability
Package
playwright-trace-decoder-mcp
Transport
STDIO
Registry
MCP registry, active

More from vola-trebla

Related Web & Browser Automation MCP servers

View all
1aj-ua avatarWordPress Headlessaj-ua/wp-headless-mcpRead WordPress content, ACF fields, and Yoast SEO data, and safely edit drafts.0stars
2apexflowlabsllc avatarApex Flow 3D Scraperapexflowlabsllc/apex-flow-web-scraperScrape, crawl and monitor public pages as Markdown with change tracking and source receipts.0stars
3hubertgajewski avatarPlaywright Report Mcphubertgajewski/playwright-report-mcpRun Playwright tests and surface structured results for AI agents doing test failure analysis.0stars
4br0ski777 avatarWeb Scraper to Markdown APIbr0ski777/web-scraper-x402Extract clean markdown from any URL. Removes boilerplate. For RAG pipelines. x402.0stars
5k11-software-solutions avatark11 Playwright QAk11-software-solutions/k11techlab-playwright-qa-mcpUser stories to verified Playwright tests, and self-healing locators with an audit trail.0stars
6k11-software-solutions avatark11 Selenium QAk11-software-solutions/k11techlab-selenium-qa-mcpSelenium tests from user stories (Python or Java) and self-healing locators with an audit trail.0stars