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.
Execute JavaScript code in real-time browser using Playwright's evaluate method and return the script's result.
Visit a target url in real-time browser.
Browser sleep for a random seconds between begin and end .
Close the opened browser.
Open browser in real-time.
Capture a screenshot of the current browser page and return a base64-encoded image.
This MCP server start with info log level by default:
#Configure logging
logging.basicConfig(
level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s"
)
http://127.0.0.1:8001/sse
First, let’s install uv and set up our Python project and environment:
curl -LsSf https://astral.sh/uv/install.sh | sh
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
uv init
uv venv
source .venv/bin/activate
.venv\Scripts\activate
uv add "mcp[cli]" httpx playwright
uv add mcp[cli] httpx playwright
python -m playwright install
python browser_ctl.py
Your expertise and ideas can make a significant impact on this project. Thanks!
Visit our YouTube channel to learn how to create AI agents: