- Home
- MCP servers
- Browser-use
Browser-use
- python
1
GitHub Stars
python
Language
4 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Browser-use lets your AI agents control a browser through an MCP server, enabling seamless web automation, data collection, and task execution across clients. It provides a standard way for agents to discover and use browser actions via MCP, making browser automation scalable and reusable across tools and workflows.
How to use
Connect to an MCP server from your client or controller and start automating browser tasks. When you connect, you gain access to browser automation tools exposed by the MCP server, such as navigating pages, filling forms, extracting content, and running parallel actions. Use an MCP-enabled client to register the server’s tools with your controller, then create an agent that describes your task and lets the controller orchestrate actions in the browser.
How to install
Prerequisites: ensure you have Python 3.11+ installed.
pip install browser-use
Install the browser driver for automation. This example uses Chromium with Playwright.
playwright install chromium --with-deps --no-shell
Run a simple agent to test the setup. Create a Python script that instantiates an Agent and runs a task with a suitable LLM.
import asyncio
from dotenv import load_dotenv
load_dotenv()
from browser_use import Agent
from browser_use.llm import ChatOpenAI
async def main():
agent = Agent(
task="Compare the price of gpt-4o and DeepSeek-V3",
llm=ChatOpenAI(model="o4-mini", temperature=1.0),
)
await agent.run()
asyncio.run(main())
Environment and configuration basics
Add your API keys for the providers you plan to use. You’ll typically place them in a .env file or your environment, then load them at runtime.
OPENAI_API_KEY=
ANTHROPIC_API_KEY=
AZURE_OPENAI_ENDPOINT=
AZURE_OPENAI_API_KEY=
GOOGLE_API_KEY=
DEEPSEEK_API_KEY=
GROK_API_KEY=
NOVITA_API_KEY=
Deploy or run MCP server locally
You can run an MCP server instance like browser-use and expose it for MCP clients. The following config demonstrates an HTTP-based MCP server entry you can connect to from clients that support MCP.
{
"mcpServers": {
"browser-use": {
"type": "http",
"name": "browser-use",
"url": "https://your-app-name.herokuapp.com/mcp",
"args": []
}
}
}
Connecting from an MCP-compatible client
From your MCP-compatible client, add the server URL to your MCP configuration and supply any required token if your client uses authenticated MCP servers. Once connected, the client can discover the browser-use tools and you can start issuing tasks to be executed in the browser.
{
"mcpServers": {
"browser-use": {
"url": "https://your-app-name.herokuapp.com/mcp",
"token": "your_heroku_ai_token"
}
}
}
Using Claude Desktop or other MCP clients
You can configure Claude Desktop to access the MCP server and run browser automation tools from there. Provide the server URL and authentication as shown.
{
"mcpServers": {
"browser-use": {
"command": "uvx",
"args": ["browser-use[cli]", "--mcp"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
}
}
}