GenClass is open source.Star on GitHub

MCP servers for frontend debugging: what each one can see.

A coding agent sees only your source files and terminal output. A browser MCP server (Chrome DevTools MCP or Playwright MCP) lets it read the console, the network and the page, and Sentry's server lets it read errors from real users. When a bug depends on the order responses arrive in, GenClass's server records that order on your development build.

Which MCP server to use for frontend debugging

Without one of these, a bug in the running page leaves the agent guessing. GenClass's server can also replay or vary the response order on your development build.

MCP, the Model Context Protocol, is an open-source standard for connecting AI applications to outside systems. What each server gives the agent:

What Chrome DevTools MCP, Playwright MCP, Sentry MCP and GenClass MCP let a coding agent see
What the agent getsChrome DevTools MCPPlaywright MCPSentry MCPGenClass MCP
ConsoleMessages, with source-mapped stack tracesMessages, filtered by levelBreadcrumbs before an error; console errors in a replayUncaught errors and unhandled rejections, with the click and request before them; not console.log or console.error
NetworkRequests, with headers and bodiesRequests, with headers and bodiesHTTP breadcrumbs, failed requests in a replay, tracesEach fetch and XHR request, its status and the state its response wrote; no headers or full bodies
DOMAccessibility-tree snapshot, CSS styles; runs scripts in the pageAccessibility snapshot; runs scripts in the pageNo live pageNo DOM tree; explore compares page text between runs, and genclass_scan lists visual problems by selector
ScreenshotsPage or elementPage or elementOnly images already in Sentry, such as event attachmentsNone
Response orderNot described; throttling slows the whole pageNot described; its mocks take no delayNot describedThe delivery order, responses that overwrote newer data, seeded reorders and exact replays
Production errorsOnly from the browser it drivesOnly from the browser it drivesIssues, events, stack traces and replays from your projectsNot an error tracker; with your dashboard linked, detection counts from a live site that runs GenClass
Clicks and typingYesYesNoNo; a browser server or a test does the steps
RunsOn your machine, in its own Chrome or yoursOn your machine; its own browser, or your Chrome or Edge through an extensionHosted with OAuth, or locally through the Sentry CLIOn your machine; bridge on 127.0.0.1:47357

"Not described" means the server's docs do not describe it, not that it is impossible. Checked on 5 December 2026 against Chrome DevTools MCP 1.15.0, Playwright MCP 0.0.86, Sentry's MCP tool definitions and @genclass/mcp 0.2.4.

Chrome DevTools MCP or Playwright MCP

Both drive a browser on your machine: the agent opens your dev server, repeats the steps and reads what the page logged and requested.

Chrome DevTools MCP automates Chrome through Puppeteer and officially supports Google Chrome and Chrome for Testing only. Its tool reference lists list_console_messages, list_network_requests and get_network_request (headers and bodies), take_snapshot (the accessibility tree as text) and performance_start_trace (Core Web Vitals). With --autoConnect it attaches to a running Chrome 144 or later that has remote debugging on. Google collects usage statistics from it unless you pass --no-usage-statistics.

Microsoft's Playwright MCP works from accessibility snapshots rather than screenshots, so the agent needs no vision model. browser_console_messages, browser_network_requests and browser_snapshot cover the console, the network and the page, and --browser takes chrome, firefox, webkit or msedge.

Pick Chrome DevTools MCP for performance traces and Lighthouse audits, and Playwright MCP if your tests use Playwright or you need Firefox or WebKit. The Claude Code lines from each project's docs:

claude mcp add chrome-devtools --scope user npx chrome-devtools-mcp@latest
claude mcp add playwright npx @playwright/mcp@latest

Errors from production: Sentry MCP and others

Sentry's MCP server lets an agent search and read your Sentry issues, events, traces and replays. It is hosted at mcp.sentry.dev with OAuth sign-in, or runs locally as the Sentry CLI's sentry mcp command.

Its tool definitions include search_issues, get_issue_details (stack trace, suspect commit, replays), get_issue_breadcrumbs (the navigation, console, HTTP and user actions before an error) and get_replay_details (a replay's clicks, console errors and failed requests). Sentry recommends scoping the address to one project.

claude mcp add --transport http sentry https://mcp.sentry.dev/mcp/{organizationSlug}/{projectSlug}

PostHog's official server can triage its error tracking issues and read session recordings, and Replay.io's inspects recordings from the Replay Browser or a Playwright run. See also GenClass and Sentry.

Why a race hides from browser and error servers

Type "pa", then "paris" into a search box: if the answer for "pa" arrives second, the list shows results for a query the user already left, and no error is thrown. A local dev server usually answers fast and in order, so an agent watching through a browser server sees the right list.

Chrome DevTools MCP can slow the network, but for the whole page (its emulate tool takes presets such as Slow 3G), and both browser servers have an opt-in tool that mocks a response. Neither tool reference describes holding one response back until another has landed, which is what this bug needs. Sentry has no error to report, because the wrong list raises none.

In a Playwright test, page.route() holds each matching request until your handler continues, fulfills or aborts it (Playwright docs), so the test can let the older search answer last; testing race conditions with Playwright has the code. The race condition simulator shows a stale search result in your browser.

GenClass MCP: response order, replays and tests

@genclass/mcp is built for that case. It is a free MCP server with no dependencies that runs on your machine; its bridge listens on 127.0.0.1:47357 only. Your development build connects to it through @genclass/runtime/agent, and through its 11 tools the agent gets each click, request and response, the order the responses were delivered and what each one wrote into the app's state. When the agent or a test repeats your steps, genclass_explore delivers the responses in seeded orders and reports what ended differently from in-order runs. genclass_replay delivers one recorded order again, before and after a fix, and genclass_explain writes a Playwright test that fails while the bug is there. Findings stay on your machine by default.

It is set up for Claude Code, Cursor, Codex, Gemini CLI, Windsurf and other MCP clients; the MCP server page has each client's lines. Run npx genclass in your app's folder and its coding agent step writes the MCP config and the genclass skill. By hand:

# Claude Code
claude mcp add --scope project genclass -- npx -y @genclass/mcp@0.2.4
# Codex CLI
codex mcp add genclass -- npx -y @genclass/mcp@0.2.4
# Gemini CLI
gemini mcp add genclass npx -- -y @genclass/mcp@0.2.4

Then connect your development build once, after npm install @genclass/runtime. A production build drops these lines (measured with Vite, esbuild and Next.js 15):

import { GenClass } from "@genclass/runtime";
import { connectAgent } from "@genclass/runtime/agent";

// Next.js: process.env.NODE_ENV === "development"
if (import.meta.env.DEV) {
  const rt = GenClass.init();
  connectAgent(rt);
}

Where GenClass fits

In GenClass's MCP, a response written over newer data is a stale-write finding, the same request sent by two clicks a duplicate-request finding, and an explore report names each race with a seed that replays it. On the package's end-to-end test page (one search page, headless Chromium), explore reported a stale-results race in 5 of 6 reordered runs, and 0 of 6 runs differed on the fixed page: one page and one bug class, not a detection rate. It does not click through your app, so pair it with a browser server or a Playwright test. Explore and replay run on your development build, not your live site, and there connectAgent only delays responses (to set their order, or for up to 600 ms while a page connects) and never changes them. Explore records WebSocket and EventSource messages but does not reorder them, and GenClass is not an error tracker.

To try it, run npx genclass in your app's folder, then follow debug race conditions with MCP.

Questions

Can Claude Code read my browser console logs?

Yes, through a browser MCP server: Chrome DevTools MCP has list_console_messages and Playwright MCP has browser_console_messages. Both read the console of the browser they drive.

Should I use Chrome DevTools MCP or Playwright MCP?

Chrome DevTools MCP for performance traces and Lighthouse audits in Chrome. Playwright MCP if your tests are in Playwright or you need Firefox or WebKit.

Can an AI agent find a race condition with a browser MCP server?

Only if the wrong order happens while it watches, and a fast local server rarely produces it. The responses must arrive in another order, set by hand in a Playwright test or by genclass_explore.

Is a CLI better than an MCP server for a coding agent?

Playwright's README says a CLI with skills uses fewer tokens, because the agent skips loading large tool schemas and accessibility trees. It still suggests MCP for long-running loops that need the browser's state kept between steps.

Talk to sales

Tell us about your team and what you need. A person writes back, usually within a day.