Walkthrough Agent

Walkthrough Agent

An MCP server that reads app source code, generates contextually valid dummy data, and drives a browser through pages with narrated steps, error correction, and output reports.

Category
Visit Server

README

Walkthrough Agent

An agentic MCP server that reads your app's source code, generates contextually valid dummy data, and drives a browser through your pages — narrating every step.

What it does

Developer runs agent
       ↓
Agent reads source folder → understands page structure
       ↓
Gemini generates contextually valid dummy inputs
       ↓
Playwright opens localhost URL + fills inputs + navigates
       ↓
On validation error → extract error from DOM → Gemini corrects inputs → retry (up to 3x)
       ↓
Output: terminal narration + screenshots + markdown report + Playwright trace

Setup

git clone <this repo>
cd walkthrough-agent
npm install
npx playwright install chromium
cp .env.example .env
# Add your GEMINI_API_KEY to .env

Get a free Gemini API key at aistudio.google.com.

Usage

Standalone CLI (fastest)

# Analyze + generate inputs + run browser walkthrough
npx walkthrough-agent --url http://localhost:3000/signup --folder ./src/app/signup

# DOM-only mode (no source folder needed)
npx walkthrough-agent --url http://localhost:3000/login

# Analyze only — print PageAnalysis + InputMap, no browser
npx walkthrough-agent --url http://localhost:3000/signup --folder ./src --analyze-only

# Override entry file detection
npx walkthrough-agent --url http://localhost:3000 --folder ./src --entry App.tsx

# Adjust max retries
npx walkthrough-agent --url http://localhost:3000/signup --folder ./src --retries 5

Output

Each run creates a timestamped directory:

output/run-2026-01-15-143022/
  report.md           ← walkthrough narrative
  trace.zip           ← Playwright trace (open at trace.playwright.dev)
  screenshots/
    01-page-load.png
    02-fill-email.png
    03-submit.png
    04-result.png

As an MCP Server (Gemini CLI)

  1. Build first: npm run build
  2. Add to your Gemini CLI config:
{
  "mcpServers": {
    "walkthrough-agent": {
      "command": "node",
      "args": ["/path/to/walkthrough-agent/dist/server.js"],
      "env": { "GEMINI_API_KEY": "your-key-here" }
    }
  }
}
  1. Tools available in Gemini CLI:
    • analyze_page — extract form structure from source + live DOM
    • generate_inputs — generate valid dummy data
    • run_walkthrough — drive Playwright through the page
    • generate_report — write markdown report

Example terminal output

Walkthrough Agent
──────────────────────────────────────────────────

Analyzing ./src/app/signup ...
   Entry file: page.tsx
   Found: email, password, confirm-password, submit
   Validation rules: valid email, min 8 chars, must match password

Generating inputs...
   email                → alex.morgan@testmail.dev
   password             → Walkthrough#42
   confirm-password     → Walkthrough#42

Output directory: output/run-2026-01-15-143022

   Opening http://localhost:3000/signup
    Page loaded
    email filled
    password filled
    confirm-password filled

   Submitting...
    Error detected: "Password must contain a special character"
    Retry 1/3 — correcting inputs...
    Submission successful

──────────────────────────────────────────────────
Screenshot(s) saved: 6 files in output/run-.../screenshots
Report saved:        output/run-.../report.md
Trace saved:         output/run-.../trace.zip

Known concerns (before shipping v1)

See PLAN.md for items to address before implementation:

  • FormElement stable key algorithm
  • Error selector → fieldId mapping
  • analyze_page Playwright lifecycle in DOM-only mode
  • TypeScript build tooling verified above
  • Gemini free-tier quota — verify before heavy use
  • Report schema — implemented in src/tools/report.ts

v2 roadmap

  • Auth support (--session-cookie flag)
  • Multi-page flow chaining
  • Negative test case generation
  • CI/CD — GitHub Action that posts walkthrough report as PR comment
  • Claude Desktop MCP support

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured