← Recipes

Let Claude Code reproduce a bug on your authenticated staging dashboard

When my agent can't see my staging dashboard because it's behind SSO, I want it to look at the broken page I'm already on and fix it.
claude-codechrome 2026-06-15

What you’ll end up with

A Claude Code conversation where you describe a bug (“the Place Order button does nothing”) and the agent inspects the page you’re already on — same SSO session, same cookies, same in-flight network calls — to find the broken call and propose a fix in your codebase.

Claude Code reading a peek session and proposing a fix

Prerequisites

  • A recent install of Claude Code (CLI or VS Code extension)
  • Chrome with the peek extension installed — from the Chrome Web Store, or loaded unpacked from packages/peek-extension/chrome-mv3/ for local builds
  • An authenticated session on a staging environment you want to debug

Steps

1. Install peek and wire it into Claude Code

npm i -g @peekdev/cli
peek init

peek init writes the MCP server entry into ~/.claude.json for you. The block it adds is exactly:

{
  "peek": {
    "command": "npx",
    "args": ["-y", "@peekdev/mcp@latest"]
  }
}

No manual config edit needed for Claude Code.

2. Capture the broken page

Open your staging app in Chrome with the peek extension active. Reproduce the bug once. Click the peek toolbar icon and choose Capture this tab — the session is written to peek’s local SQLite store under ~/.peek/.

3. Ask Claude Code

In Claude Code, point at the captured session:

The Place Order button on this page does nothing. Use peek to look at what’s happening and find the broken call.

Claude Code calls peek’s MCP tools — list_recent_sessions, get_session_summary, get_session_console_errors, get_session_network_errors, get_user_action_before_error — reads the captured state, and proposes a fix.

Why this works

peek records the page you’re already on — authenticated cookies, network responses, DOM mutations, console errors — into a local SQLite store and exposes it to your agent over MCP. Your agent reads what you read. No separate login flow, no copying URLs around, no cloud round-trip.

Next steps