AI Browser - Browser Automation Tool for Claude Desktop

April 22, 2025 ยท View on GitHub

A lightweight MCP (Model Context Protocol) server that gives Claude Desktop the ability to browse the web, take screenshots, and interact with webpages.

Features

  • ๐ŸŒ Browse any website through Claude
  • ๐Ÿ“ธ Automatic screenshot capture
  • ๐Ÿ–ฑ๏ธ Web interaction (click, type, wait)
  • ๐Ÿ”Œ Simple Claude Desktop integration
  • ๐Ÿ“ Full MCP protocol compliance
  • ๐Ÿš€ Single file, zero configuration

Quick Start

  1. Install dependencies

    npm install
    
  2. Configure Claude Desktop

    Copy this configuration to ~/Library/Application Support/Claude/claude_desktop_config.json:

    {
      "mcpServers": {
        "ai-browser": {
          "command": "node",
          "args": [
            "/path/to/ai_browse/ai_browser.js"
          ]
        }
      }
    }
    

    Replace /path/to/ with your actual installation path.

  3. Restart Claude Desktop

That's it! The AI Browser tools are now available in Claude.

Available Tools

browse_web

Browse a webpage and receive a screenshot.

"Can you browse to https://example.com and show me what you see?"

web_action

Interact with webpages by clicking buttons, filling forms, etc.

"Go to https://example.com and click the login button"

Architecture

The AI Browser runs as a single Node.js process (ai_browser.js) that:

  • Manages a headless Chromium browser in the background
  • Communicates via MCP protocol through stdin/stdout
  • Ensures all logging goes to stderr or files (never stdout)

This streamlined architecture means no separate HTTP servers or background processes.

Testing

To verify the installation:

./test.sh

This will test the MCP protocol implementation and ensure the browser is working correctly.

Troubleshooting

If Claude doesn't show the AI Browser tools:

  1. Check the configuration path Ensure the path in claude_desktop_config.json is absolute and correct.

  2. Verify JSON format The configuration must be valid JSON (proper quotes, commas, etc.).

  3. Check logs

    tail -f ai_browser_unified.log
    
  4. Restart Claude Desktop completely Quit and relaunch the application.

Development

The project follows MCP protocol strictly:

  • Only valid JSON-RPC messages on stdout
  • All debugging/logging to stderr or log files
  • Clean shutdown handling

See the source code in ai_browser.js for implementation details.

Scripts

  • test.sh - Tests the MCP protocol implementation
  • cleanup.sh - Removes logs and temporary files
  • cleanup_processes.sh - Kills any running AI Browser processes

Project Structure

ai_browse/
โ”œโ”€โ”€ ai_browser.js           # Main MCP server implementation
โ”œโ”€โ”€ package.json           # Dependencies
โ”œโ”€โ”€ test.sh               # Test script
โ”œโ”€โ”€ cleanup.sh            # Clean temporary files
โ”œโ”€โ”€ cleanup_processes.sh  # Stop running processes
โ”œโ”€โ”€ INSTALL.md           # Installation guide
โ”œโ”€โ”€ README.md            # This file
โ”œโ”€โ”€ MCP_Server_Guide.md  # Development guide
โ””โ”€โ”€ storage/             # Screenshot storage

License

MIT