
Browser CTL MCP Server
Anthropic based MCP server built on Python Playwright , enable AI agents to control web browsers.
What is Browser CTL MCP Server?
Browser CTL MCP Server is an Anthropic-based server built on Python Playwright that enables AI agents to control and interact with web browsers in real-time.
How to use Browser CTL MCP Server?
To use the Browser CTL MCP Server, install the required dependencies, set up your Python environment, and run the server using the provided commands. You can then interact with the server through its API endpoints.
Key features of Browser CTL MCP Server?
- Execute JavaScript code in real-time using Playwright.
- Navigate to specified URLs in a browser.
- Control browser sleep duration.
- Open and close the browser programmatically.
- Capture screenshots of the current browser page.
Use cases of Browser CTL MCP Server?
- Automating web testing and interactions.
- Creating AI agents that can browse and gather information.
- Developing tools for web scraping and data extraction.
FAQ from Browser CTL MCP Server?
- What programming language is used for Browser CTL?
The Browser CTL MCP Server is built using Python.
- Is it necessary to have Playwright installed?
Yes, Playwright is required to run the Browser CTL MCP Server.
- Can I use this server for any web browser?
This version is designed to work with the Chrome browser.
Browser CTL MCP Server
SSE Anthropic based MCP server built on Python Playwright, providing a suite of tools that enable AI agents to control and interact with web browsers , this simple version use chrome browser.
Exposed Tools:
1. execute_javascript
Execute JavaScript code in real-time browser using Playwright's evaluate method and return the script's result.
2. go_to_url
Visit a target url in real-time browser.
3. sleep_for
Browser sleep for a random seconds between begin and end .
4. close_browser
Close the opened browser.
5. open_browser
Open browser in real-time.
6. take_browser_screenshot
Capture a screenshot of the current browser page and return a base64-encoded image.
Default log
This MCP server start with info log level by default:
#Configure logging
logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
)
Default End Point
http://127.0.0.1:8001/sse
INSTALL
First, let’s install uv and set up our Python project and environment:
Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows:
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
Clone the repo:
git clone https://github.com/biteval/browser_ctl.git
Go to the project dir:
cd browser_ctl
Create virtual environment and activate it
uv init
uv venv
Linux:
source .venv/bin/activate
Windows:
.venv\Scripts\activate
Install dependencies
Linux
uv add "mcp[cli]" httpx playwright
Windows
uv add mcp[cli] httpx playwright
Download playwright browser binaries
python -m playwright install
Start the Browser CTL MCP Server
python browser_ctl.py
Contributions Are Welcome!
Your expertise and ideas can make a significant impact on this project. Thanks!
Learn More
Visit our YouTube channel to learn how to create AI agents: