browser-use MCP server
浏览器使用的 MCP 服务器
项目说明:此 MCP 服务器实现基于浏览器使用/Web UI基础。核心浏览器自动化逻辑和配置模式均改编自原始项目。
人工智能驱动的浏览器自动化服务器,实现模型上下文协议 (MCP),用于自然语言浏览器控制。
特征
🧠 MCP 集成- AI 代理通信的完整协议实现
🌐浏览器自动化- 页面导航、表单填写和元素交互
👁️视觉理解- 屏幕截图分析和基于视觉的交互
🔄状态持久化- 在任务之间维护浏览器会话
🔌多 LLM 支持- OpenAI、Anthropic、Azure、DeepSeek 集成
Related MCP server: Cloudflare Playwright MCP
快速入门
先决条件
Python 3.11 或更高版本
uv(快速 Python 包安装程序)
Chrome/Chromium浏览器
安装
克劳德桌面
在 MacOS 上: ~/Library/Application\ Support/Claude/claude_desktop_config.json在 Windows 上: %APPDATA%/Claude/claude_desktop_config.json
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": [
"mcp-server-browser-use",
],
"env": {
"OPENROUTER_API_KEY": "",
"OPENROUTER_ENDPOINT": "https://openrouter.ai/api/v1",
"OPENAI_ENDPOINT": "https://api.openai.com/v1",
"OPENAI_API_KEY": "",
"ANTHROPIC_ENDPOINT": "https://api.anthropic.com",
"ANTHROPIC_API_KEY": "",
"GOOGLE_API_KEY": "",
"AZURE_OPENAI_ENDPOINT": "",
"AZURE_OPENAI_API_KEY": "",
"DEEPSEEK_ENDPOINT": "https://api.deepseek.com",
"DEEPSEEK_API_KEY": "",
"MISTRAL_API_KEY": "",
"MISTRAL_ENDPOINT": "https://api.mistral.ai/v1",
"OLLAMA_ENDPOINT": "http://localhost:11434",
"ANONYMIZED_TELEMETRY": "true",
"BROWSER_USE_LOGGING_LEVEL": "info",
"CHROME_PATH": "",
"CHROME_USER_DATA": "",
"CHROME_DEBUGGING_PORT": "9222",
"CHROME_DEBUGGING_HOST": "localhost",
"CHROME_PERSISTENT_SESSION": "false",
"BROWSER_HEADLESS": "false",
"BROWSER_DISABLE_SECURITY": "false",
"BROWSER_WINDOW_WIDTH": "1280",
"BROWSER_WINDOW_HEIGHT": "720",
"BROWSER_TRACE_PATH": "trace.json",
"BROWSER_RECORDING_PATH": "recording.mp4",
"RESOLUTION": "1920x1080x24",
"RESOLUTION_WIDTH": "1920",
"RESOLUTION_HEIGHT": "1080",
"VNC_PASSWORD": "youvncpassword",
"MCP_MODEL_PROVIDER": "anthropic",
"MCP_MODEL_NAME": "claude-3-5-sonnet-20241022",
"MCP_TEMPERATURE": "0.3",
"MCP_MAX_STEPS": "30",
"MCP_USE_VISION": "true",
"MCP_MAX_ACTIONS_PER_STEP": "5",
"MCP_TOOL_CALL_IN_CONTENT": "true"
}
}本地开发
"browser-use": {
"command": "uv",
"args": [
"--directory",
"/path/to/mcp-browser-use",
"run",
"mcp-server-browser-use"
],
"env": {
...
}
}发展
# Install dev dependencies
uv sync
# Run with debugger
npx @modelcontextprotocol/inspector uv --directory . run mcp-server-browser-use故障排除
浏览器冲突:启动前关闭所有 Chrome 实例。
API 错误:验证环境变量中的 API 密钥是否与您的 LLM 提供商匹配。
视觉支持:确保
MCP_USE_VISION=true进行屏幕截图分析。
提供程序配置
服务器通过环境变量支持多个 LLM 提供程序。以下是MCP_MODEL_PROVIDER的可用选项:
提供者 | 价值 | 必需的环境变量 |
人择 |
|
|
OpenAI |
|
|
Azure OpenAI |
|
|
DeepSeek |
|
|
双子座 |
|
|
米斯特拉尔 |
|
|
奥拉马 |
|
|
OpenRouter |
|
|
笔记:
对于标记为可选的端点,如果未指定,则将使用默认值
可以使用
MCP_TEMPERATURE配置温度(默认值:0.3)可以使用
MCP_MODEL_NAME指定模型对于 Ollama 模型,可以配置其他上下文设置,例如
num_ctx和num_predict
致谢
本项目在 MIT 许可证下扩展了browser-use/web-ui 。特别感谢原作者提供的浏览器自动化框架。
执照
MIT——详情请参阅许可证。
Available Tools
1 toolrun_browser_agentD
Handle run-browser-agent tool calls.
Inputs: task (required), add_infos.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 1 tool
With only one tool, there is no possibility of ambiguity or overlap between tools. The single tool 'run_browser_agent' has a distinct purpose that cannot be confused with any other tool in this set.
The naming pattern cannot be inconsistent with only one tool. The tool name 'run_browser_agent' follows a clear verb_noun pattern, and there are no other tools to create naming conflicts or mixed conventions.
A single tool is generally too few for most server purposes, as it limits functionality and may not cover the domain adequately. For a browser automation server, one tool feels thin and restrictive compared to typical expectations of multiple actions like navigation, clicking, or form filling.
The tool surface is severely incomplete for browser automation. With only one tool to run an agent, there are obvious gaps in core operations such as navigating to URLs, interacting with page elements, extracting data, or managing browser sessions, which will likely cause agent failures in practical use.
Maintenance
Related MCP Connectors
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
AI-powered browser automation — navigate, click, fill forms, and extract data from any website.
Control a real browser from AI agents: navigate, click, type, screenshot, read the page.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.19Apache 2.0
- AlicenseNot gradedqualityNot gradedmaintenanceA Model Control Protocol server that enables AI assistants to control a browser, allowing them to perform web automation tasks like navigation, typing, clicking, and taking screenshots.Apache 2.0
- AlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables AI assistants to interact with web pages through browser automation, supporting web scraping, form filling, navigation, and other browser-based tasks using Playwright.1MIT
- AlicenseAqualityDmaintenanceA Model Context Protocol server that enables AI assistants to perform web automation tasks by connecting to remote Playwright/browserless instances, supporting navigation, screenshots, HTML extraction, and element interaction.104MIT