Browser JavaScript Evaluator
About
This is a reference design for a MCP server that hosts a web page that connects back to the server via sse and allows Claude to execute javascript on the page.
Explore
- Executes arbitrary JavaScript in a connected browser
- Provides two MCP tools: execute_javascript and add_numbers
- Uses SSE for real-time communication with the browser
- Returns results synchronously via REST API
- Web server and MCP server are split into separate components
Setting up with Highlight
This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:
- Download and install Highlight from highlightai.com/download
- Navigate to the plugins tab and select "Add Custom Plugin"
-
Configure the plugin with the settings below
Plugin Name
Browser JavaScript EvaluatorCommand (node, npx, python, etc.)Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.
- Enable "Start Automatically" if you want the plugin to start when Highlight launches
From the repository
...
"browser-js-evaluator": {
"command": "uv",
"args": [
"--directory",
"/path/to/this/repo/mcp_py_sse_browser_control",
"run",
"browser_server.py"
]
}
}
...
When you launch Claude Desktop this will start both the MCP server and the web server. Then open a browser and navigate to http://127.0.0.1:8000 to connect to the web server.
The MCP server provides two tools:
1. execute_javascript: Execute arbitrary JavaScript code in the browser
2. add_numbers: Add two numbers together using JavaScript in the browser
These tools can be called from any MCP client.
Claude Desktop / Cursor
Paste into your MCP client config file to install this server.
{
"mcpServers": {
"browser javascript evaluator": {
"mcp_py_sse_browser_control": {
"command": "python",
"args": [
"web_server.py"
]
}
}
}
}
McpServers
{
"mcp_py_sse_browser_control": {
"command": "python",
"args": [
"web_server.py"
]
}
}
This project provides a way to execute JavaScript code in a browser from Python using MCP (Model Control Protocol).
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.



