DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowHalloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk6 min

How to Connect an AI Agent to a Live Cypress Test Session

Connect an agent to Cypress Open mode by matching Chrome’s remote debugging port, or use cypress tap to run specs and inspect live failure context.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To let an AI agent inspect a live Cypress browser with Chrome DevTools MCP, point the MCP client at the same Chrome remote debugging port Cypress uses, then launch Cypress with CYPRESS_REMOTE_DEBUGGING_PORT set to that port. For Cypress-specific test results and failure context, Cypress’s newer cypress tap CLI is another option. Both are local-session workflows; Cypress Cloud MCP is for recorded Cloud runs.

Connect Chrome DevTools MCP to Cypress with a matching port

Cypress’s documented Chrome DevTools MCP setup works by attaching the agent’s browser tooling to the Chrome instance Cypress launched. Configure the MCP client to connect to Chrome’s remote debugging port, and start Cypress with that exact port in CYPRESS_REMOTE_DEBUGGING_PORT. The example below uses 59210; it is an example value, not a required or reserved port. See Cypress’s May 22, 2026 walkthrough.

As an Amazon Associate I earn from qualifying purchases.

  1. Configure Chrome DevTools MCP. In the MCP client’s server configuration, set the Chrome DevTools MCP connection to the remote debugging port you plan to use. The exact configuration fields and syntax depend on the MCP client; follow its current instructions.
  2. Start Cypress Open mode from the project directory. In the same terminal, set the environment variable to the identical port. For macOS or Linux, the documented pattern is:
    CYPRESS_REMOTE_DEBUGGING_PORT=59210 cypress open --e2e --browser=chrome
  3. Run the test in the opened Cypress app. The agent’s browser tools should now attach to that Cypress-controlled Chrome instance, where it can inspect the runner and application page.
  4. Ask the agent to inspect the live failure. Give it the failing test and the question you need answered, such as whether the application state or the test expectation explains a failed interaction.

The port match is the essential connection: if the MCP server starts a separate Chrome instance instead, that browser does not contain the Cypress session. Cypress’s example describes using live runner, DOM, and app state to investigate a failing to-do deletion test; it is an illustration from the vendor article, not a guarantee that an agent will diagnose every failure correctly.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Windows shell note

The inline NAME=value command form above is for POSIX shells. In Windows PowerShell, set the variable in the current terminal before launching Cypress:

$env:CYPRESS_REMOTE_DEBUGGING_PORT = "59210"
npx cypress open --e2e --browser=chrome

In Command Prompt, the equivalent is set CYPRESS_REMOTE_DEBUGGING_PORT=59210 followed by npx cypress open --e2e --browser=chrome in that same window. Keep the MCP client pointed at the same port in either case.

Use cypress tap for Cypress-specific live context

cypress tap is a Cypress CLI extension that lets an agent run a spec and read live Cypress context from the terminal, including reporter information, Command Log details, errors, and the application-under-test DOM associated with a command. It is a good fit when the agent needs Cypress test context rather than general browser inspection. Cypress documents the tool at cypress tap: live Cypress app context in your terminal.

  1. Start cypress open and select a test type and browser.
  2. From another terminal in the project, use cypress tap to run the target spec.
  3. Poll the run status until it completes, then inspect the reporter, Command Log, error, or DOM context for a failure.

For example, the documented command shape is:

npx cypress tap run --spec "cypress/e2e/example.cy.js"

Use the command reference in the Cypress documentation for the current syntax and available options; cypress tap is beta and its commands or output may change. The Cypress CLI ships with the Cypress App, so the tool does not require a separate install or Cypress Cloud account. Cypress’s AI Skills guide lists Cypress 15.21.0 or later as the requirement for the cypress-tap skill, along with a supported browser and running cypress open session: Cypress AI Skills.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Session and browser requirements

  • Live inspection requires an open-mode Cypress session; cypress tap does not attach to a headless cypress run session.
  • Most interactive inspection commands require a Chromium-family browser in that session: Chrome, Chromium, Edge, or Electron.
  • Commands such as status, specs, and run can be used without an open browser, but that does not make headless run sessions available for live interactive inspection.
  • JSON output is available when requested, which makes the results practical for agents and scripts.

Choose the right workflow

Workflow Where the context lives What the agent can inspect Main prerequisite
Chrome DevTools MCP with Cypress Local, live Chrome instance controlled by Cypress Open mode Browser-level page and application state, plus the Cypress runner visible in that browser MCP client and Cypress must use the same Chrome remote debugging port
cypress tap Local, live Cypress Open session and CLI Cypress reporter, Command Log, test errors, and application DOM context Supported Cypress setup; live interactive inspection needs open mode and a supported Chromium-family browser
Cypress Cloud MCP Recorded Cypress Cloud runs Cloud run status, failures, and Test Replay information Cypress Cloud run data and an AI client configured for Cloud MCP

Cypress Cloud MCP is not the way to attach an agent to a local, currently running browser. Cypress documents Cloud MCP as generally available since May 20, 2026, on every Cypress Cloud plan at no additional cost; see Cypress Cloud MCP: Agentic debugging. Cypress also distinguishes agent debugging tools from features intended to help write tests, such as Studio and cy.prompt; see its AI in Cypress overview.

Or skip the browser setup

ScreenshotNeo is a website screenshot API, not a bridge to a live Cypress runner: it can capture a URL, but it does not give an agent Cypress’s reporter, Command Log, or live test-session context. If you only need a screenshot of a publicly reachable page, one GET request can return an image or PDF. The API accepts configurable capture options; see the ScreenshotNeo API documentation.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools to take screenshots, get page information, and capture PDFs. The free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots.

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot connection and inspection problems

The agent opens a blank or unrelated browser

It is likely attached to a different Chrome instance. Check the MCP server’s debugging-port configuration and the CYPRESS_REMOTE_DEBUGGING_PORT value used to launch Cypress; make them identical, then restart the Cypress session so it launches Chrome with that port.

The port is unavailable or Chrome will not start

Another process may already be using the chosen port, or the browser may not have been launched with the expected debugging configuration. Choose an available port and update both sides to that same value. Do not assume the example port 59210 is always free.

cypress tap cannot find an open session

Start Cypress with cypress open and keep that session running while invoking the tap command from another terminal in the project. A headless cypress run session is not an attach target for live inspection.

Interactive inspection commands are unavailable

Confirm that the open session uses Chrome, Chromium, Edge, or Electron. Some tap commands can run without an open browser, but commands that inspect live session context need the supported browser session.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The agent receives unexpected tap output

Because cypress tap is beta, confirm the installed Cypress version and consult the current tap documentation for command names and output formats. If an agent integration expects machine-readable data, request JSON output where supported and ensure the agent is using the current schema rather than assuming output is fixed.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently asked questions

Can an AI agent both run Cypress tests and read their results?

Yes. Cypress documents cypress tap as a way for an agent to run specs and read Cypress test context. Chrome DevTools MCP instead provides access to the browser session at the matching debugging port.

Does the Chrome DevTools MCP method require Cypress Cloud?

No. It attaches browser tooling to a local Chrome instance; Cloud MCP is the separate workflow for recorded Cloud runs.

Does connecting an agent change or fix a failing test automatically?

No. The connection makes evidence available to the agent. Whether to change the test or application remains a debugging decision for the developer and team.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.