Using peek with your AI coding agent
Once peek is wired into my agent, I want to know when it'll actually help and which of its tools to ask for — without guessing.
When to reach for peek
Ask your agent to use peek when you mention:
- “what happened in my last session” / “show my recent sessions”
- “investigate this error” right after you reproduced it
- “what was I doing when X failed” / “what action triggered X”
- “what did the DOM look like when Y happened”
- “turn what I just did into a Playwright test”
- (with consent) “click / fill this on the page open in my browser”
Don’t reach for peek for: production/remote data, a live debugger at the current moment (peek replays what was already captured), or test-runner failure capture (use the tracelane reporters).
The tools, by job
peek exposes 18 MCP tools across six tiers.
- Read — session forensics (no consent needed):
list_recent_sessions,search_sessions,get_session_summary,get_session_console_errors,get_session_network_errors,get_user_action_before_error,get_dom_snapshot,query_dom_history,generate_playwright_repro. - Read — live page (Level 1+, non-mutating):
get_page_view,get_element_detail. - Act — browser actions (Level 3+, consented):
request_authorization,execute_action. - Suggest — non-mutating overlays (Level 2+):
suggest_element,clear_highlight. - Control — supervised assist (Level 4):
set_intent,request_user_input. - Audit — integrity check (read-only, no consent):
verify_audit_log.
How it works
peek runs entirely on your machine: a Chrome extension records masked rrweb sessions to a local SQLite store (~/.peek/sessions.db); a stdio MCP server exposes the tools above. If ~/.peek/sessions.db is absent, peek isn’t installed — run npx @peekdev/cli init first.
Set peek up for your client
Trust & data handling
Local-first: peek uploads nothing — what your MCP client does with the data is up to you. Captured values are masked at record time; read tools are non-mutating, and write tools require per-origin consent.