Web Agent Protocol

v1.0.0Browser Automationstable

🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support

ai-agentsai-toolsbrowser-automationbrowser-usellm
Share:
496
Stars
0
Downloads
0
Weekly
0/5

What is Web Agent Protocol?

Web Agent Protocol is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to 🌐web agent protocol (wap) - record and replay user interactions in the browser with mcp support

🌐Web Agent Protocol (WAP) - Record and replay user interactions in the browser with MCP support

This server falls under the Browser Automation category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • 🌐Web Agent Protocol (WAP) - Record and replay user interacti

Use Cases

User interaction recording and replay
Browser automation with MCP
Agentic web control
OTA-Tech-AI

Maintainer

LicenseMIT
Languagepython
Versionv1.0.0
UpdatedMay 21, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx web-agent-protocol

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Web Agent Protocol

Web Agent Protocol (WAP) is a standardized browser automation framework that lets you record real user interactions in Chrome via a browser extension, then convert those recordings into exact-replay or smart-replay action lists, and finally package them as MCP servers that any AI agent can call. The workflow separates recording from execution: a human performs an action once, WAP captures the full DOM context, and the resulting MCP server lets Claude or any other agent replay that workflow reliably. Developers use it to capture complex authenticated workflows that are too brittle for pure AI navigation and expose them as reusable agent tools.

Prerequisites

  • Python 3.11 (create a conda env or use a virtualenv)
  • conda or venv for environment isolation
  • The OTA-WAP Chrome extension installed in Chrome for recording sessions
  • An OpenAI API key (OPENAI_API_KEY) or DeepSeek API key (DEEPSEEK_API_KEY) for smart replay generation
  • Playwright installed in the Python environment for replay execution
1

Set up the Python environment

Create and activate a conda environment with Python 3.11, then install the project dependencies.

conda create -n WAP python=3.11
conda activate WAP
pip install -r requirements.txt
2

Set environment variables and PYTHONPATH

Create a .env file with your LLM API key and export the repo root as PYTHONPATH so all modules resolve correctly.

# Create .env file:
# OPENAI_API_KEY=sk-proj-...
# DEEPSEEK_API_KEY=sk-...

# Set PYTHONPATH (Linux/macOS):
export PYTHONPATH=/path/to/webagentprotocol
# Windows:
# set PYTHONPATH=C:/path/to/webagentprotocol
3

Record a browser session

Start the data collection server, then use the OTA-WAP Chrome extension to record your workflow. Each session is saved as a JSON file under data/YYYYMMDD/<taskid>/.

python action_collect_server.py
# The server listens on http://localhost:4934/action-data
# Start recording from Chrome using the WAP extension
4

Generate a replay list from the recording

Convert the raw recording into a smart replay list (goal-oriented, condensed steps) or an exact replay list (reproduces every action verbatim).

# Smart replay (recommended for agents)
python wap_replay/generate_smart_replay_list.py \
  --data_dir_path data/<YYYYMMDD>/<task_id> \
  --output_dir_path data_processed/smart_replay

# Exact replay
python wap_replay/generate_exact_replay_list.py \
  --data_dir_path data/<YYYYMMDD>/<task_id> \
  --output_dir_path data_processed/exact_replay
5

Convert the replay list to an MCP server

Generate an MCP server from your recorded task. The server will be placed in the mcp_servers/ folder and can be added to any MCP client.

python wap_replay/generate_mcp_server.py --task_id <task_id>
6

Run the MCP service and connect a client

Start the WAP service in one terminal and the MCP client in another. You can then send natural language prompts to replay your recorded workflows.

# Terminal 1:
python wap_service.py

# Terminal 2:
python mcp_client.py
# Then enter a prompt like:
# find a top rated keyboard on amazon.ca using smart replay

Web Agent Protocol Examples

Client configuration

Example MCP server configuration for a generated WAP MCP server. The actual command depends on the generated server in mcp_servers/<task_id>/.

{
  "mcpServers": {
    "wap-workflow": {
      "command": "python",
      "args": ["mcp_servers/<task_id>/server.py"],
      "cwd": "/path/to/webagentprotocol",
      "env": {
        "OPENAI_API_KEY": "sk-proj-your-key-here",
        "PYTHONPATH": "/path/to/webagentprotocol"
      }
    }
  }
}

Prompts to try

After converting a recorded workflow to an MCP server, use these types of prompts to replay it.

- "Find a top rated mechanical keyboard on amazon.ca using smart replay"
- "Run the recorded checkout workflow for the item in my cart"
- "Use the saved login workflow to authenticate and navigate to my dashboard"
- "Replay the data export workflow and save the results to a file"

Troubleshooting Web Agent Protocol

ModuleNotFoundError when running WAP scripts

Run all commands from the project root directory with PYTHONPATH set to the repo root. On Linux/macOS: 'export PYTHONPATH=.' or 'export PYTHONPATH=/path/to/webagentprotocol'. On Windows: 'set PYTHONPATH=.'.

generate_smart_replay_list.py fails with 'no task-start file' error

The generators require exactly one task-start and one task-finish event record in the session data. Ensure the Chrome extension recorded a complete session — start the recording before the first action and stop it after the final action on the page.

Replay fails midway through a workflow due to DOM changes or dynamic content

Use smart replay mode instead of exact replay. Smart replay generates goal-oriented steps that are more resilient to minor DOM changes. If failures persist, re-record the specific failing segment and regenerate the replay list.

Frequently Asked Questions about Web Agent Protocol

What is Web Agent Protocol?

Web Agent Protocol is a Model Context Protocol (MCP) server that 🌐web agent protocol (wap) - record and replay user interactions in the browser with mcp support It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Web Agent Protocol?

Follow the installation instructions on the Web Agent Protocol GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Web Agent Protocol?

Web Agent Protocol works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Web Agent Protocol free to use?

Yes, Web Agent Protocol is open source and available under the MIT license. You can use it freely in both personal and commercial projects.

Browse More Browser Automation MCP Servers

Explore all browser automation servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "web-agent-protocol": { "command": "npx", "args": ["-y", "web-agent-protocol"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide →

Ready to use Web Agent Protocol?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides