I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

MCP_PY_SSE_BROWSER_CONTROL
Il s'agit d'une conception de référence pour un serveur MCP qui héberge une page Web qui se connecte au serveur via SSE et permet à Claude d'exécuter JavaScript sur la page.
1
Github Watches
1
Github Forks
0
Github Stars
Browser JavaScript Evaluator
This project provides a way to execute JavaScript code in a browser from Python using MCP (Model Control Protocol).
⚠️ WARNING ⚠️
This MCP server can execute arbitrary JavaScript in your browser. This can be dangerous. Be aware of the implications of this before using this plugin. Use at your own risk.
Architecture
The project is split into two main components:
-
Web Server (
web_server.py
):- Handles browser connections via Server-Sent Events (SSE)
- Provides a REST API endpoint for executing JavaScript
- Returns results synchronously
-
MCP Server (
mcp_server.py
):- Manages the lifecycle of the web server
- Provides MCP tools for executing JavaScript
- Communicates with the web server via REST API calls
How It Works
- The MCP server starts the web server during its lifecycle initialization
- A browser connects to the web server via SSE
- When an MCP tool is called, it makes a REST API call to the web server
- The web server sends the JavaScript code to the browser via SSE
- The browser executes the code and sends the result back to the web server
- The web server returns the result to the MCP server
- The MCP server returns the result to the caller
Usage
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"
]
}
}
...
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.
Using the MCP Tools
The MCP server provides two tools:
-
execute_javascript
: Execute arbitrary JavaScript code in the browser -
add_numbers
: Add two numbers together using JavaScript in the browser
These tools can be called from any MCP client.
Development
To run the web server independently (for testing):
python web_server.py
This will start only the web server without the MCP integration.
相关推荐
Evaluator for marketplace product descriptions, checks for relevancy and keyword stuffing.
I find academic articles and books for research and literature reviews.
Confidential guide on numerology and astrology, based of GG33 Public information
Advanced software engineer GPT that excels through nailing the basics.
Take an adjectivised noun, and create images making it progressively more adjective!
Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.
Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX
Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.
L'application tout-en-un desktop et Docker AI avec chiffon intégré, agents AI, constructeur d'agent sans code, compatibilité MCP, etc.
Reviews

user_68wg2nnk
I've been using Z3 Theorem Prover with Functional Programming for several months now, and it has significantly improved my workflow. The integration of functional programming paradigms with theorem proving is seamless, enabling complex logical verifications more intuitively. Javergar has done an exceptional job in creating a tool that is both powerful and user-friendly. Highly recommended for anyone serious about functional programming and formal verification.