Skip to content

Open-source Python library for AI browser agents, plus Browser Use Cloud: stealth browsers and a hosted agent API.

fix uvx browser-use examples to use cli optionals

Nick Sweeting6445a746aa8a
diff --git a/README.md b/README.md
index 31e7527b6..4389407bc 100644
--- a/README.md
+++ b/README.md
@@ -94,7 +94,7 @@ Add browser-use to your Claude Desktop configuration:
"mcpServers": {
"browser-use": {
"command": "uvx",
- "args": ["browser-use", "--mcp"],
+ "args": ["browser-use[cli]", "--mcp"],
"env": {
"OPENAI_API_KEY": "sk-..."
}
diff --git a/browser_use/mcp/server.py b/browser_use/mcp/server.py
index 55d35ee82..3d18c0dfb 100644
--- a/browser_use/mcp/server.py
+++ b/browser_use/mcp/server.py
@@ -14,7 +14,7 @@ Or as an MCP server in Claude Desktop or other MCP clients:
"mcpServers": {
"browser-use": {
"command": "uvx",
- "args": ["browser-use", "--mcp"],
+ "args": ["browser-use[cli]", "--mcp"],
"env": {
"OPENAI_API_KEY": "sk-proj-1234567890",
}
diff --git a/docs/cli.mdx b/docs/cli.mdx
index e21b79dbf..d3bf2c2f1 100644
--- a/docs/cli.mdx
+++ b/docs/cli.mdx
@@ -13,7 +13,7 @@ The `browser-use` command-line interface provides multiple modes of operation fo
Get started with browser-use immediately using `uvx`:
```bash
-uvx browser-use --help
+uvx 'browser-use[cli]' --help
```
Or install it globally:
@@ -29,7 +29,7 @@ uv tool install 'browser-use[cli]'
Launch an interactive terminal UI where you can chat with the browser automation agent:
```bash
-uvx browser-use
+uvx 'browser-use[cli]'
```
This opens a chat interface where you can:
@@ -55,7 +55,7 @@ Options:
Run browser-use as a Model Context Protocol server:
```bash
-uvx browser-use --mcp # exoects MCP JSON RPC over stdio
+uvx 'browser-use[cli]' --mcp # exoects MCP JSON RPC over stdio
```
This mode exposes browser automation capabilities as MCP tools that can be used by:
@@ -166,36 +166,36 @@ Each profile directory contains Chrome user data, allowing you to:
```bash
# Interactive mode
-uvx browser-use
+uvx 'browser-use[cli]'
# One-shot task
-uvx browser-use -p "Go to github.com and search for browser-use"
+uvx 'browser-use[cli]' -p "Go to github.com and search for browser-use"
# Headless one-shot
-uvx browser-use --headless -p "Extract prices from example.com/products"
+uvx 'browser-use[cli]' --headless -p "Extract prices from example.com/products"
```
### With Configuration
```bash
# Use specific config file
-BROWSER_USE_CONFIG_PATH=~/my-config.json uvx browser-use
+BROWSER_USE_CONFIG_PATH=~/my-config.json uvx 'browser-use[cli]'
# Override settings via environment
-BROWSER_USE_HEADLESS=true OPENAI_API_KEY=sk-... uvx browser-use -p "Check my email"
+BROWSER_USE_HEADLESS=true OPENAI_API_KEY=sk-... uvx 'browser-use[cli]' -p "Check my email"
# Use different LLM model
-BROWSER_USE_LLM_MODEL=gpt-4-turbo uvx browser-use
+BROWSER_USE_LLM_MODEL=gpt-4-turbo uvx 'browser-use[cli]'
```
### MCP Server Usage
```bash
# Start MCP server
-uvx browser-use --mcp
+uvx 'browser-use[cli]' --mcp
# With custom settings
-BROWSER_USE_HEADLESS=false OPENAI_API_KEY=sk-... uvx browser-use --mcp
+BROWSER_USE_HEADLESS=false OPENAI_API_KEY=sk-... uvx 'browser-use[cli]' --mcp
```
For Claude Desktop integration, add to your Claude Desktop config:
@@ -205,7 +205,7 @@ For Claude Desktop integration, add to your Claude Desktop config:
"mcpServers": {
"browser-use": {
"command": "uvx",
- "args": ["browser-use", "--mcp"],
+ "args": ["browser-use[cli]", "--mcp"],
"env": {
"OPENAI_API_KEY": "sk-...",
"BROWSER_USE_HEADLESS": "false"
@@ -228,7 +228,7 @@ For Claude Desktop integration, add to your Claude Desktop config:
Enable debug logging for troubleshooting:
```bash
-BROWSER_USE_LOGGING_LEVEL=debug uvx browser-use
+BROWSER_USE_LOGGING_LEVEL=debug uvx 'browser-use[cli]'
```
## See Also
diff --git a/docs/customize/mcp-server.mdx b/docs/customize/mcp-server.mdx
index f42822a20..497b6923a 100644
--- a/docs/customize/mcp-server.mdx
+++ b/docs/customize/mcp-server.mdx
@@ -320,7 +320,7 @@ Test the MCP server without Claude Desktop:
```bash
# Run server (reads from stdin, writes to stdout)
-uvx browser-use --mcp
+uvx 'browser-use[cli]' --mcp
# The server communicates via JSON-RPC on stdio
```
@@ -364,8 +364,8 @@ uvx browser-use --mcp
2. **Verify Python installation:**
```bash
- uvx browser-use --version
- uvx browser-use --mcp --help
+ uvx 'browser-use[cli]' --version
+ uvx 'browser-use[cli]' --mcp --help
```
3. **Check Claude logs:**
@@ -388,7 +388,7 @@ If you see "MCP server connection failed":
1. Test the server directly:
```bash
- uvx browser-use --mcp
+ uvx 'browser-use[cli]' --mcp
```
2. Check all dependencies:
diff --git a/examples/mcp/advanced_server.py b/examples/mcp/advanced_server.py
index 7383bd8df..7e3518568 100644
--- a/examples/mcp/advanced_server.py
+++ b/examples/mcp/advanced_server.py
@@ -12,7 +12,7 @@ Prerequisites:
pip install 'browser-use[cli]'
2. Start the browser-use MCP server:
- uvx browser-use --mcp
+ uvx 'browser-use[cli]' --mcp
3. Run this example:
python advanced_server.py
@@ -241,7 +241,7 @@ async def main():
try:
# Connect to browser-use MCP server
- await assistant.connect_server(name='browser', command='uvx', args=['browser-use', '--mcp'])
+ await assistant.connect_server(name='browser', command='uvx', args=['browser-use[cli]', '--mcp'])
# Optionally connect to filesystem server
# Note: Uncomment to enable file operations
diff --git a/examples/mcp/simple_server.py b/examples/mcp/simple_server.py
index 018d68db7..db39f09ba 100644
--- a/examples/mcp/simple_server.py
+++ b/examples/mcp/simple_server.py
@@ -131,7 +131,7 @@ async def main():
except Exception as e:
print(f'\n❌ Error: {e}')
print('\nMake sure the browser-use MCP server is running:')
- print(' uvx browser-use --mcp')
+ print(" uvx 'browser-use[cli]' --mcp")
if __name__ == '__main__':