Enables deployment of browser-use as an MCP server on Heroku with automatic configuration of buildpacks, Chrome, and AI add-on integration for browser automation in the cloud.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Browser Use Herokusearch for the latest iPhone prices on Amazon and Best Buy"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
🌐 Browser-use is the easiest way to connect your AI agents with the browser.
💡 See what others are building and share your projects in our Discord! Want Swag? Check out our Merch store.
🌤️ Skip the setup - try our hosted version for instant browser automation! Try the cloud ☁︎.
Quick start
With pip (Python>=3.11):
Install the browser:
Spin up your agent:
Add your API keys for the provider you want to use to your .env file.
For other settings, models, and more, check out the documentation 📕.
Test with UI
You can test browser-use using its Web UI or Desktop App.
Test with an interactive CLI
You can also use our browser-use interactive CLI (similar to claude code):
MCP Integration
Browser-use supports the Model Context Protocol (MCP), enabling integration with Claude Desktop and other MCP-compatible clients.
Deploy to Heroku
Browser-use can be easily deployed to Heroku. This will set up a Heroku application with all the necessary configurations to run Browser-use as an MCP server.
Using the Heroku Button
The simplest way to deploy is by clicking the Heroku Button at the top of this README. This will:
Create a new Heroku app with the Browser-use code
Configure the necessary buildpacks for Python, APT dependencies, and Chrome
Set up the Heroku AI add-on for MCP integration
Deploy the application automatically
Manual Deployment
If you prefer to deploy manually, follow these steps:
Connecting to the MCP Server
Once deployed to Heroku, your Browser-use application will function as an MCP server that can be connected to from various clients. The MCP server process is named mcp-browser in the Procfile to comply with Heroku's MCP naming requirements.
Important: The MCP server is configured to scale to 0 dynos by default, as recommended by Heroku for MCP servers. When you need to use it, you'll need to scale it up using the Heroku CLI or dashboard:
heroku ps:scale mcp-browser=1 -a your-app-name
Using with Claude Desktop or Other MCP-Compatible Clients
Add your Heroku-deployed browser-use instance to your Claude Desktop configuration:
Replace your-app-name with your actual Heroku app name and your_heroku_ai_token with the authentication token from your Heroku AI add-on settings.
Using the MCP Server Programmatically
You can also connect to your Heroku-deployed Browser-use MCP server programmatically. Here's an example Python script that demonstrates how to do this:
A full working example can be found in the examples/heroku_mcp_client.py file.
Getting Your Heroku AI Token
To get your Heroku AI token for MCP integration:
Deploy your application using the Heroku Button or CLI
Go to your Heroku Dashboard and select your application
Navigate to the "Resources" tab and click on "Heroku AI" add-on
Find your API key/token in the add-on dashboard
Alternatively, use the Heroku CLI:
heroku config:get INFERENCE_KEY -a your-app-name
MCP Server Environment Variables
The following environment variables can be configured for your MCP server:
Variable | Description | Default |
| Your OpenAI API key | - |
| Your Anthropic API key | - |
| Your Azure OpenAI endpoint | - |
| Your Azure OpenAI API key | - |
| Your Google API key | - |
| Your Deepseek API key | - |
| Your Grok API key | - |
| Your Novita API key | - |
| Enable/disable anonymous telemetry |
|
| Logging level (result, debug, info) |
|
| Enable cost calculations |
|
| Optimize Chrome for Docker environments |
|
| Number of concurrent web workers |
|
| Use only STDIO mode, disable HTTP server |
|
| Security key for API authentication | Auto-generated |
You can set these environment variables in the Heroku dashboard after deployment or include them in the deployment process.
Keeping Your Deployment Updated
Automatic Updates via GitHub Actions
This repository includes a GitHub Actions workflow that automatically syncs with the upstream repository on a daily basis while preserving all Heroku-specific configurations. The workflow:
Runs daily at 00:00 UTC (can also be triggered manually)
Fetches the latest changes from the upstream repository
Preserves all Heroku-specific files during the update
Commits and pushes the merged changes to the main branch
No manual intervention is needed to keep your repository updated with the latest features and fixes from the original repository.
Manual Updates
If you prefer to update manually, this repository also includes a script to sync with the upstream repository. To update your deployment with the latest changes:
The script automatically preserves your Heroku configuration files while pulling in the latest updates from the original repository.
Use as MCP Server with Claude Desktop
Add browser-use to your Claude Desktop configuration:
This gives Claude Desktop access to browser automation tools for web scraping, form filling, and more.
Connect External MCP Servers to Browser-Use Agent
Browser-use agents can connect to multiple external MCP servers to extend their capabilities:
See the MCP documentation for more details.
Demos
Task: Add grocery items to cart, and checkout.
Prompt: Add my latest LinkedIn follower to my leads in Salesforce.
Prompt: Read my CV & find ML jobs, save them to a file, and then start applying for them in new tabs, if you need help, ask me.'
https://github.com/user-attachments/assets/171fb4d6-0355-46f2-863e-edb04a828d04
Prompt: Write a letter in Google Docs to my Papa, thanking him for everything, and save the document as a PDF.
Prompt: Look up models with a license of cc-by-sa-4.0 and sort by most likes on Hugging face, save top 5 to file.
https://github.com/user-attachments/assets/de73ee39-432c-4b97-b4e8-939fd7f323b3
More examples
For more examples see the examples folder or join the Discord and show off your project. You can also see our awesome-prompts repo for prompting inspiration.
Vision
Tell your computer what to do, and it gets it done.
Roadmap
Agent
Improve agent memory to handle +100 steps
Enhance planning capabilities (load website specific context)
Reduce token consumption (system prompt, DOM state)
DOM Extraction
Enable detection for all possible UI elements
Improve state representation for UI elements so that all LLMs can understand what's on the page
Workflows
Let user record a workflow - which we can rerun with browser-use as a fallback
Make rerunning of workflows work, even if pages change
User Experience
Create various templates for tutorial execution, job application, QA testing, social media, etc. which users can just copy & paste.
Improve docs
Make it faster
Parallelization
Human work is sequential. The real power of a browser agent comes into reality if we can parallelize similar tasks. For example, if you want to find contact information for 100 companies, this can all be done in parallel and reported back to a main agent, which processes the results and kicks off parallel subtasks again.
Contributing
We love contributions! Feel free to open issues for bugs or feature requests. To contribute to the docs, check out the /docs folder.
🧪 How to make your agents robust?
We offer to run your tasks in our CI—automatically, on every update!
Add your task: Add a YAML file in
tests/agent_tasks/(see theREADME therefor details).Automatic validation: Every time we push updates, your task will be run by the agent and evaluated using your criteria.
Local Setup
To learn more about the library, check out the local setup 📕.
main is the primary development branch with frequent changes. For production use, install a stable versioned release instead.
Swag
Want to show off your Browser-use swag? Check out our Merch store. Good contributors will receive swag for free 👀.
Citation
If you use Browser Use in your research or project, please cite: