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.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。