How to use RegressionBot with Claude Code
Claude Code is an incredibly powerful CLI agent, but it has one major blind spot: it cannot physically "see" the UI it builds. When Claude refactors a shared CSS utility or updates a React component, it has no idea if it just broke the layout on 5 other pages.
Traditional visual regression tools like Percy or Chromatic aren't built for agents. They require manual human review to look at red pixel diffs. By the time a human reviews the PR, Claude's context is gone.
The Agent-Native Solution
RegressionBot bridges this gap. When you run RegressionBot against a preview deployment, it doesn't just generate a visual diff. Our AI review analyzes the changes and generates a plain-English regressionbotSummary.
What Claude Code sees:
{
"status": "COMPLETED",
"regressionbotSummary": "The hero section's CTA button 'Start for free' shifted 40px to the left, breaking alignment with the subheadline. The navigation bar background changed from transparent to solid black."
}Claude can read this JSON output directly and immediately realize, "Ah, I must have accidentally removed the justify-center class from the hero flex container." It can then fix the code autonomously without you ever having to open a browser.
Step 1: Set up the MCP Server
To give Claude Code access to RegressionBot, you simply need to configure our production-ready MCP (Model Context Protocol) server.
# Add the RegressionBot MCP server to Claude Code
claude mcp add --transport http regressionbot https://mcp.regressionbot.com/ --header "Authorization: Bearer YOUR_API_KEY"Provide your API key to Claude when prompted, or export it in your environment:
export REGRESSIONBOT_API_KEY="sk_live_your_key_here"Step 2: Instruct Claude to Test
Once configured, you can simply tell Claude Code to test your deployments. You don't need to write any Playwright scripts or maintain a Storybook instance.
"Claude, I just deployed my branch to Vercel preview. Please use RegressionBot to run a visual regression test against https://my-preview-url.vercel.app and fix any layout issues it finds."
A quick check before every push
For a change to copy, links or page structure, Claude Code can check its own work in a few seconds a page, before it says it is done. Put a temporary tunnel in front of your dev server (Internal Environments), then ask for a quick check against production:
"Run a RegressionBot quick check of https://my-tunnel.trycloudflare.com against https://myapp.com (fidelity low) on the pages you changed, and tell me any content change I didn't ask for."
A quick check takes no screenshots: it reports changed words, links and structure, and its scopeNote says layout, color and images were not checked. If the change touches CSS, run the full check instead.
How it works under the hood
- Zero Code: Claude simply calls the
run_regression_jobtool via MCP, providing the URL. - Parallel Crawling: RegressionBot crawls the sitemap and takes screenshots across desktop and mobile viewports in parallel.
- Change report: If the page changed, RegressionBot lists each changed element and quotes its old and new text, read from the page itself.
- Autonomous Fixes: Claude reads the resulting
regressionbotSummaryand applies code fixes immediately.
By combining Claude Code with RegressionBot, you achieve a fully autonomous loop: Code → Deploy → Visual QA → Fix. Stop reviewing red pixels and let your agent do the work.