mcp_py_sse_browser_control
This project provides a way to execute JavaScript code in a browser from Python using MCP (Model Control Protocol).
The Browser JavaScript Evaluator is a project designed to execute JavaScript code in a browser environment from a Python-based MCP server. It consists of two main components: a web server and an MCP server. The web server handles browser connections via Server-Sent Events (SSE) and provides a REST API for executing JavaScript, returning results synchronously. The MCP server manages the lifecycle of the web server, provides MCP tools for executing JavaScript, and communicates with the web server through REST API calls. The process involves the MCP server starting the web server, a browser connecting via SSE, and the execution of JavaScript code through REST API calls, with results being returned to the caller.
Features
- Execute JavaScript code in a browser from Python using MCP.
- Web server handles browser connections via Server-Sent Events (SSE).
- REST API endpoint for executing JavaScript and returning results synchronously.
- MCP server manages the lifecycle of the web server and provides MCP tools.
- Communication between MCP server and web server via REST API calls.
MCP Tools
- {'execute_javascript': 'Execute arbitrary JavaScript code in the browser.'}
- {'add_numbers': 'Add two numbers together using JavaScript in the browser.'}
Usage with Different Platforms
Add the MCP server to your Claude config
...
"browser-js-evaluator": {
"command": "uv",
"args": [
"--directory",
"/path/to/this/repo/mcp_py_sse_browser_control",
"run",
"browser_server.py"
]
}
...
Run the web server independently
bash
python web_server.py
Related MCP Servers
View all browser_automation servers →Fetch
by modelcontextprotocol
A Model Context Protocol server that provides web content fetching capabilities, enabling LLMs to retrieve and process content from web pages.
markdownify-mcp
by zcaceres
Markdownify is a Model Context Protocol (MCP) server that converts various file types and web content to Markdown format.
mcp-playwright
by executeautomation
A Model Context Protocol server that provides browser automation capabilities using Playwright.
playwright-mcp
by microsoft
Playwright MCP is a Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots.
mcp-server-weibo
by Selenium39
The Weibo MCP Server (TypeScript Version) is designed for scraping Weibo user information, feeds, and search functionality using the Model Context Protocol.
web-eval-agent
by Operative-Sh
operative.sh's MCP Server is a tool for autonomous debugging of web applications directly from your code editor.
browser-tools-mcp
by AgentDeskAI
BrowserTools MCP is a browser monitoring and interaction tool that enhances AI applications by capturing and analyzing browser data through a Chrome extension.