Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteTo let a coding agent debug a failing Cypress test from live evidence, start Cypress in open mode with Chrome, choose a remote debugging port, and point Chrome DevTools MCP at that same port. Cypress reads the port from the CYPRESS_REMOTE_DEBUGGING_PORT environment variable. When the two values match, the agent can read the runner’s results and the browser’s DOM, console and network state directly, instead of depending on a developer’s paraphrase of what went wrong.
Cypress also offers a terminal-based route, cypress tap, which gives an agent runner status without a browser connection. It has tighter version and browser limits. Cypress Cloud MCP is a third tool, aimed at recorded CI runs rather than your local browser. The sections below cover setup first, then the alternatives and where each one stops.
What you need before you connect
- A Cypress project with at least one test that you can reproduce locally in open mode.
- Google Chrome installed on the same machine as Cypress and your coding agent.
- Chrome DevTools MCP installed and configured in the MCP client your agent uses.
- An unused local port number to use as the remote debugging port. Cypress’s own example uses 59210.
The whole setup depends on one rule: the port Chrome exposes and the port Cypress is told to use must be identical. If they differ, the MCP server can start a fresh browser that knows nothing about your Cypress session, and the agent will be looking at the wrong window.
Connect Chrome DevTools MCP to the Cypress browser
- Pick a port. Choose one free port, for example 59210, and use it everywhere below.
- Point Chrome DevTools MCP at an existing Chrome instance on that port. In your MCP client’s configuration, set Chrome DevTools MCP to attach to a running Chrome on that remote debugging port rather than launching a new browser. The exact option name depends on the Chrome DevTools MCP version and your client, so follow that package’s current documentation for the connection setting.
- Start Cypress open mode with the same port. From the project root, run:
CYPRESS_REMOTE_DEBUGGING_PORT=59210 cypress open --e2e --browser=chrome
Cypress describes this environment variable as supported across many versions, so an older install is unlikely to lack it, but confirm the behavior against the version you have installed. - Run a spec from the Cypress window. Cypress should open its own Chrome window in the headed runner. Confirm the test appears in the runner before you involve the agent.
- Ask the agent to inspect the latest run. Once the connection is live, the agent can read the browser state from the same session Cypress is driving.
What the agent can see
According to Cypress’s documentation, a connected agent can access the following evidence:
#1 Best Overall
- Test pass and fail state, along with error messages.
- DOM state at the point of failure.
- Browser console logs.
- Network request data.
- Cypress command logs, which show each command the test issued and its outcome.
Cypress’s documented debugging loop is to have the agent review that evidence together with your code and git history, decide whether the application or the test is wrong, make a change, and then let Cypress rerun or reload. Cypress’s illustrative example is a failure after deleting a to-do item. That example shows how the workflow is meant to run; it is not a measured result, and Cypress does not publish outcome figures for it.
Option two: cypress tap for terminal-based runner context
cypress tap is a Cypress CLI extension that attaches to an open-mode Cypress session. Instead of a browser connection, the agent works through terminal commands. Cypress’s documentation states: “An AI agent can run a Cypress spec and get back pass or fail.”
Rank #2
From the agent’s side, cypress tap can run a spec, poll its status, and inspect the failing test’s Command Log, the error and code frame, and the application’s DOM at the moment each command ran. Cypress says it is included with the Cypress App and requires no Cypress Cloud account or paid subscription.
A documented flow looks like this:
- In one terminal, run
cypress open, then select a testing type and a Chromium-based browser. - In a second terminal, in the same project directory, issue
cypress tapcommands. - Use the
--jsonoutput option when the agent or a script is parsing results.
Limits of cypress tap
- It requires Cypress v15.21.0 or later.
- It attaches only to
cypress open. It does not attach to headlesscypress run. - It supports Chromium browsers only: Chrome, Chromium, Edge and Electron.
- It is in beta, and its commands and output may change in a future release.
Because cypress tap reads Cypress’s own runner state, it does not expose a general browser debugging session. If you need arbitrary DOM, console or network inspection in a browser you control, the Chrome DevTools MCP connection described above is the better fit.
Rank #3
Choosing between the three tools
| Option | Best fit | Setup and access | Important limits |
|---|---|---|---|
| Chrome DevTools MCP attached to Cypress | Live browser state alongside the Cypress runner: DOM, console, network and command logs | Match the Chrome remote debugging port in the MCP configuration with CYPRESS_REMOTE_DEBUGGING_PORT |
Requires an open-mode session and a correctly matched port. Treat as privileged browser access. |
cypress tap |
Agent-readable runner status, Command Log, error details and failure-time DOM from the terminal | Run cypress open, then issue CLI commands from a terminal in the same project |
Cypress v15.21.0 or later; open mode only; Chromium browsers only; beta |
| Cypress Cloud MCP | Triage of recorded CI runs: run status, flaky tests, failure details and Test Replay links | An organization admin enables the integration; each user authenticates | Covers Cypress Cloud and CI runs, not your local live browser |
Cypress Cloud MCP is for CI triage
Cypress Cloud MCP answers a different question. It lets an agent query runs that already happened in Cypress Cloud: which tests failed, which ones are flaky, what the failure details were, and where the Test Replay is for a given run. It does not connect to the browser on your machine, so it will not help with a test you are currently running in open mode.
Cypress states that Cloud MCP reached general availability on May 20, 2026, and that it is included on every Cypress Cloud plan at no additional cost. Access works in two parts. An organization admin must enable the integration, and each user must authenticate. Cypress recommends OAuth, and documents personal access tokens as an alternative. Plan inclusion and authentication options are service terms that can change, so check Cypress’s current plan and documentation pages before you rely on them.
Rank #4
A practical split: use the local Chrome DevTools connection while you are writing or fixing a test, and use Cloud MCP when a test fails only on CI and you need the recorded run to work out why.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Security and privacy
Chrome for Developers describes the risk plainly: “Because your agent will be able to view and interact with the pages it accesses, it can effectively act on your behalf if you connect it to a browser with an active, authenticated session.” A connected agent can read, inspect, debug and modify browser and DevTools data.
Recommended Free Tools
Two practical rules follow from this:
- Use a test account, not your personal or work account, and avoid pages that show sensitive personal or production data while the connection is active.
- Remember that Cypress launches its own browser profile, separate from your everyday browser. Your normal cookies, logins and extensions do not automatically carry over into the Cypress window, and the session is not your everyday browser.
Cypress documents cypress open as headed and interactive, and cypress run as headless by default. A connection set up for open mode therefore does not apply to CI-style headless runs.
Quick Recap
Troubleshooting
- The agent sees a blank or unrelated browser. The port is probably mismatched. Confirm that the MCP configuration and
CYPRESS_REMOTE_DEBUGGING_PORTuse the same number, then restart both Cypress and the MCP server. - The agent can’t find any Cypress session. Cypress must be running in open mode with
--browser=chrome. A headlesscypress rundoes not provide this session. cypress tapreturns no results or errors on startup. Check the installed version withcypress version. Anything before v15.21.0 does not support the command, andcypress openmust already be running in the project.cypress tapfails against a Firefox run. The command supports Chromium browsers only. Switch the open-mode session to Chrome, Chromium, Edge or Electron.- Cloud MCP returns nothing for a run you expect. Confirm your organization admin has enabled the integration and that you have authenticated as yourself, since access is per user.
“
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

