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
-
Install dependencies
npm install -
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. -
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:
-
Check the configuration path Ensure the path in
claude_desktop_config.jsonis absolute and correct. -
Verify JSON format The configuration must be valid JSON (proper quotes, commas, etc.).
-
Check logs
tail -f ai_browser_unified.log -
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 implementationcleanup.sh- Removes logs and temporary filescleanup_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