# browser-use/vibetest-use architecture

> Architecture diagram of the GitHub repository browser-use/vibetest-use, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/browser-use/vibetest-use
- Repository: https://github.com/browser-use/vibetest-use

## Overview

##### Project type and purpose
- This is a Python-based automated QA testing tool that integrates with the MCP (Model-Control-Plugin) protocol used by Claude Code or Cursor.
- It consists of:
- An MCP server (`vibetest-mcp`) that listens to commands from Claude or Cursor
- A pool of “Browser-Use” agents that drive headless or headed browsers via Playwright
- Integration with external services like Google API (for advanced checks)

##### File structure
- Top-level files:
- `pyproject.toml` – Python packaging and dependency metadata
- `README.md` – project description and usage
- `.gitignore` – excluded files
- Package directory `vibetest/`:
- `mcp_server.py` – main entry point for the MCP server component
- `agents.py` – logic for spawning and orchestrating Browser-Use agents
- `__init__.py` – package initializer
- Generated packaging info under `vibetest.egg-info/` – not relevant to runtime architecture

##### README for additional insights
- Describes how to install and register the MCP server with Claude Code or Cursor UI
- Mentions dependencies: Playwright, Python≥3.11, Google API key

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% UI Layer
    User["User\n(Claude Code/Cursor UI)"]:::ui
    ClientUI["Client UI\n(Claude/Cursor)"]:::ui

    %% Core Logic
    MCPServer["MCP Server\n(vibetest-mcp)\n(mcp_server.py)"]:::core
    AgentOrchestrator["Agent Orchestrator\n(agents.py)"]:::core
    Agents["Browser-Use Agents\n(Playwright & API calls)\n(vibetest/agents.py)"]:::core

    %% External Services
    TargetWebsite["Target Website\n(Under Test)"]:::external
    GoogleAPI["Google API\n(External Service)"]:::external

    %% Project Config
    subgraph "Project Configuration"
        PyProject["pyproject.toml"]:::config
        README["README.md"]:::config
    end

    %% Flows
    User -->|"issues prompt"| ClientUI
    ClientUI -->|"JSON-RPC / CLI"| MCPServer
    MCPServer -->|"parse params & spawn"| AgentOrchestrator
    AgentOrchestrator -->|"parallel spawn (headless/headed)"| Agents
    Agents -->|"HTTP / Playwright commands"| TargetWebsite
    Agents -->|"API calls"| GoogleAPI
    Agents -->|"stream results/status"| AgentOrchestrator
    AgentOrchestrator -->|"aggregate results"| MCPServer
    MCPServer -->|"responses / logs"| ClientUI

    %% Click Events
    click MCPServer "https://github.com/browser-use/vibetest-use/blob/main/vibetest/mcp_server.py"
    click AgentOrchestrator "https://github.com/browser-use/vibetest-use/blob/main/vibetest/agents.py"
    click Agents "https://github.com/browser-use/vibetest-use/blob/main/vibetest/agents.py"
    click PyProject "https://github.com/browser-use/vibetest-use/blob/main/pyproject.toml"
    click README "https://github.com/browser-use/vibetest-use/blob/main/README.md"

    %% Styles
    classDef ui fill:#ccefff,stroke:#333,stroke-width:1px
    classDef core fill:#c8e6c9,stroke:#333,stroke-width:1px
    classDef external fill:#ffe0b2,stroke:#333,stroke-width:1px
    classDef config fill:#e0e0e0,stroke:#333,stroke-width:1px
```
