Browser AI MCP Server
Enables natural language browser automation through Claude, wrapping Playwright to execute commands like navigation, clicking, form filling, and screenshots.
README
Browser AI MCP Server
An AI-powered MCP (Model Context Protocol) server that provides a natural language interface to browser automation. This server acts as an intelligent wrapper around the official Playwright MCP server, allowing you to control browsers using plain English commands through Claude.
Features
- Natural Language Browser Control: Execute browser automation tasks using plain English commands
- Claude Integration: Leverages Claude's AI capabilities through OAuth (using your Claude Code subscription)
- Intelligent Tool Mapping: AI automatically translates your commands into appropriate Playwright tool calls
- Session Management: Maintain context across multiple browser automation commands
- Error Recovery: Smart error handling with helpful feedback
Installation
Installing via Smithery
To install Browser AI for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install @qckfx/browser-ai --client claude
Manual Installation
npm install -g @qckfx/browser-ai
Or use directly with npx:
npx @qckfx/browser-ai
Setup
1. Authentication
The Browser AI MCP server requires Anthropic API access. You have two authentication options:
Option 1: OAuth Authentication (Recommended for Claude Subscribers)
If you have a Claude subscription, authenticate with your Claude account to use your subscription credits:
npx @qckfx/browser-ai --auth
This will open a browser window for OAuth authentication. After authorizing, the token will be saved securely and your API usage will be charged to your Claude subscription rather than requiring separate API credits.
Option 2: API Key Authentication
Alternatively, you can use an Anthropic API key by setting the environment variable:
export ANTHROPIC_API_KEY="your-api-key-here"
2. Configure with Claude Code
After authentication, add the server to Claude Code:
claude mcp add browser-ai -- npx --yes @qckfx/browser-ai@latest
If using API key authentication, you can pass it as an environment variable:
claude mcp add browser-ai --env ANTHROPIC_API_KEY="your-api-key-here" -- npx --yes @qckfx/browser-ai@latest
3. Configure Claude Desktop (Alternative)
If using Claude Desktop instead, add the following to your Claude Desktop configuration file (claude_desktop_config.json):
{
"mcpServers": {
"browser-ai": {
"command": "npx",
"args": ["@qckfx/browser-ai"],
"env": {
"PLAYWRIGHT_MCP_PATH": "@playwright/mcp@latest"
}
}
}
}
Usage
Once configured, you can use natural language commands in Claude to control browser automation:
Example Commands
- Navigation: "Go to example.com and wait for the page to load"
- Clicking: "Click the login button"
- Form Filling: "Fill the username field with 'john.doe@example.com'"
- Screenshots: "Take a screenshot of the current page"
- Complex Tasks: "Fill out the registration form with test data and submit it"
How It Works
- You provide a natural language command to Claude
- The AI interprets your intent and breaks it down into Playwright tool calls
- The server executes these tools via the Playwright MCP server
- Results are returned in a user-friendly format
Development
Project Structure
browser-ai/
├── src/
│ ├── auth/ # OAuth authentication
│ ├── mcp/ # MCP server and client
│ ├── ai/ # AI agent and tool mapping
│ ├── provider/ # Custom AI SDK provider
│ └── index.ts # CLI entry point
Building from Source
git clone <repository>
cd browser-ai
npm install
npm run build
Testing
Run the integration test:
npm test
Debug Mode
Enable debug logging:
npx browser-ai --debug
Architecture
User Command → Claude → Browser AI MCP → AI Agent → Playwright MCP → Browser
↓
Claude (via OAuth)
The server exposes a single browser_ai tool that accepts natural language commands. It then:
- Uses Claude to interpret the command
- Generates a sequence of Playwright tool calls
- Executes them via the Playwright MCP client
- Returns a human-friendly summary
Troubleshooting
Authentication Issues
If you encounter authentication errors:
- Run
npx browser-ai --authto re-authenticate - Ensure you have an active Claude Code subscription
- Check that the token hasn't expired
Connection Issues
If the server fails to connect to Playwright MCP:
- Ensure Playwright MCP is installed:
npm install -g @playwright/mcp - Check the
PLAYWRIGHT_MCP_PATHenvironment variable - Enable debug mode to see detailed logs
Tool Execution Errors
If commands fail to execute:
- Ensure the browser is in the expected state
- Try breaking complex commands into simpler steps
- Check the debug logs for specific error messages
Requirements
- Node.js 18 or higher
- Active Claude Code subscription
- Playwright MCP server
License
MIT
Contributing
Contributions are welcome! Please read our contributing guidelines before submitting PRs.
Support
For issues and feature requests, please use the GitHub issue tracker.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.