mcp-selenium-grid
[DEV PRE-RELEASE, NOT READY, TESTING IN MCP CLIENTS] A Model Context Protocol (MCP) server that enables AI Agents to request and manage Selenium browser instances through a secure API. Perfect for your automated browser testing needs! π [In development]
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
βCITATION.cff file
Found CITATION.cff file -
βcodemeta.json file
Found codemeta.json file -
β.zenodo.json file
Found .zenodo.json file -
βDOI references
-
βAcademic publication links
-
βCommitters with academic emails
-
βInstitutional organization owner
-
βJOSS paper metadata
-
βScientific vocabulary similarity
Low similarity (11.7%) to scientific vocabulary
Keywords
Scientific Fields
Repository
[DEV PRE-RELEASE, NOT READY, TESTING IN MCP CLIENTS] A Model Context Protocol (MCP) server that enables AI Agents to request and manage Selenium browser instances through a secure API. Perfect for your automated browser testing needs! π [In development]
Basic Info
Statistics
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 5
Topics
Metadata Files
README.md
π€ MCP Selenium Grid
A Model Context Protocol (MCP) server for managing Selenium Grid browser instances. Useful for browser automation and testing workflows.
The MCP Selenium Grid provides a MCP Server for creating and managing browser instances in both Docker and Kubernetes environments. It's designed to work with AI agents and automation tools that need browser automation capabilities.
Key Features
- Multi-browser support: Chrome, Firefox and Edge
- Dual backend support: Docker and Kubernetes deployment modes
- Secure API: Token-based authentication for browser management
- Scalable architecture: Support for multiple browser instances
- MCP compliance: Follows Model Context Protocol standards
π Quick Start
Prerequisites
- uv (Python dependency manager)
- Docker (for Docker deployment mode)
- K3s (for Kubernetes deployment mode, optional)
π Usage
The MCP Selenium Grid provides a Web API for creating and managing browser instances. The server runs on localhost:8000 and exposes MCP endpoints at /mcp (Http Transport) and /sse (Server Sent Events).
Note: All requests to the server root
http://localhost:8000will be redirected to either/mcpor/sseendpoints, depending on the request.
MCP Client Configuration
π³ Docker Deployment
For Docker-based deployment, ensure Docker is running and use the Docker configuration in your MCP client setup.
json
{
"mcpServers": {
"mcp-selenium-grid": {
"command": "uvx",
"args": ["mcp-selenium-grid", "server", "run",
"--host", "127.0.0.1",
"--port", "8000"
],
"env": {
"API_TOKEN": "SERVER_AUTH_DISABLED",
"ALLOWED_ORIGINS": "[\"http://127.0.0.1:8000\"]",
"DEPLOYMENT_MODE": "docker",
"SELENIUM_GRID__USERNAME": "USER",
"SELENIUM_GRID__PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__VNC_PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__VNC_VIEW_ONLY": "false",
"SELENIUM_GRID__MAX_BROWSER_INSTANCES": "4",
"SELENIUM_GRID__SE_NODE_MAX_SESSIONS": "1"
}
}
}
}
The server will be available at
http://localhost:8000with interactive API documentation athttp://localhost:8000/docs.
βΈοΈ Kubernetes Deployment
3. Kubernetes Setup (Optional)
This project supports Kubernetes deployment for scalable browser instance management. We use K3s for local development and testing.
Install K3s (https://docs.k3s.io/quick-start)
```bash
Install K3s
curl -sfL https://get.k3s.io | sh -
Verify installation
k3s --version
Start if not running
sudo systemctl start k3s ```
Create K3s Kubernetes Context (Optional)
After installing K3s, you might want to create a dedicated kubectl context for it:
```bash
Copy K3s kubeconfig
mkdir -p ~/.kube sudo cp /etc/rancher/k3s/k3s.yaml ~/.kube/config-local-k3s sudo chown $USER:$USER ~/.kube/config-local-k3s chmod 600 ~/.kube/config-local-k3s
Create context
KUBECONFIG=~/.kube/config-local-k3s \ kubectl config set-context k3s-selenium-grid \ --cluster=default \ --user=default ```
Deploy Selenium Grid
Please run for help to get to know the available commands and parameters:
bash
uvx mcp-selenium-grid helm --help
uvx mcp-selenium-grid helm deploy --help
uvx mcp-selenium-grid helm uninstall --help
Deploy using default parameters:
bash
uvx mcp-selenium-grid helm deploy
Uninstall using default parameters:
```bash
using default parameters
uvx mcp-selenium-grid helm uninstall --delete-namespace ```
json
{
"mcpServers": {
"mcp-selenium-grid": {
"command": "uvx",
"args": ["mcp-selenium-grid", "server", "run",
"--host", "127.0.0.1",
"--port", "8000"
],
"env": {
"API_TOKEN": "SERVER_AUTH_DISABLED",
"ALLOWED_ORIGINS": "[\"http://127.0.0.1:8000\"]",
"DEPLOYMENT_MODE": "kubernetes",
"SELENIUM_GRID__USERNAME": "USER",
"SELENIUM_GRID__PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__VNC_PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__VNC_VIEW_ONLY": "false",
"SELENIUM_GRID__MAX_BROWSER_INSTANCES": "4",
"SELENIUM_GRID__SE_NODE_MAX_SESSIONS": "1",
"KUBERNETES__KUBECONFIG": "~/.kube/config-local-k3s",
"KUBERNETES__CONTEXT": "k3s-selenium-grid",
"KUBERNETES__NAMESPACE": "selenium-grid-dev",
"KUBERNETES__SELENIUM_GRID_SERVICE_NAME": "selenium-grid"
}
}
}
}
```json { "mcpServers": { "mcp-selenium-grid": { "command": "docker", "args": [ "run", "-i", "--rm", "--init", "-p", "8000:80", "-e", "APITOKEN=SERVERAUTHDISABLED", "-e", "ALLOWEDORIGINS=[\"http://127.0.0.1:8000\"]", "-e", "DEPLOYMENTMODE=kubernetes", // required for docker "-e", "SELENIUMGRIDUSERNAME=USER", "-e", "SELENIUM_GRIDPASSWORD=CHANGEME", "-e", "SELENIUMGRIDVNCPASSWORD=CHANGEME", "-e", "SELENIUM_GRIDVNCVIEWONLY=false", "-e", "SELENIUMGRIDMAXBROWSERINSTANCES=4", "-e", "SELENIUMGRIDSENODEMAX_SESSIONS=1", "-e", "KUBERNETESKUBECONFIG=/kube/config-local-k3s", "-e", "KUBERNETESCONTEXT=k3s-selenium-grid", "-e", "KUBERNETESNAMESPACE=selenium-grid-dev", "-e", "KUBERNETES_SELENIUMGRIDSERVICENAME=selenium-grid", "ghcr.io/falamarcao/mcp-selenium-grid:latest" ] } } }
```
The server will be available at
http://localhost:8000with interactive API documentation athttp://localhost:8000/docs.
Server with auth enabled
UVX
Using default args
bash
uvx mcp-selenium-grid server run
Custom args
bash
API_TOKEN=CHANGE_ME uvx mcp-selenium-grid server run --host 127.0.0.1 --port 8000
Docker
Default args
bash
docker run -i --rm --init -p 8000:80 ghcr.io/falamarcao/mcp-selenium-grid:latest
Custom args
bash
docker run -i --rm --init -p 8000:80 \
-e API_TOKEN=CHANGE_ME \
-e ALLOWED_ORIGINS='["http://127.0.0.1:8000"]' \
-e DEPLOYMENT_MODE=kubernetes \
-e SELENIUM_GRID__USERNAME=USER \
-e SELENIUM_GRID__PASSWORD=CHANGE_ME \
-e SELENIUM_GRID__VNC_PASSWORD=CHANGE_ME \
-e SELENIUM_GRID__VNC_VIEW_ONLY=false \
-e SELENIUM_GRID__MAX_BROWSER_INSTANCES=4 \
-e SELENIUM_GRID__SE_NODE_MAX_SESSIONS=1 \
-e KUBERNETES__KUBECONFIG=/kube/config-local-k3s \
-e KUBERNETES__CONTEXT=k3s-selenium-grid \
-e KUBERNETES__NAMESPACE=selenium-grid-dev \
-e KUBERNETES__SELENIUM_GRID_SERVICE_NAME=selenium-grid \
ghcr.io/falamarcao/mcp-selenium-grid:latest
MCP Server configuration (mcp.json)
json
{
"mcpServers": {
"mcp-selenium-grid": {
"url": "http://localhost:8000",
"headers": {
"Authorization": "Bearer CHANGE_ME"
}
}
}
}
json
{
"mcpServers": {
"mcp-selenium-grid": {
"url": "http://localhost:8000/mcp",
"headers": {
"Authorization": "Bearer CHANGE_ME"
}
}
}
}
json
{
"mcpServers": {
"mcp-selenium-grid": {
"url": "http://localhost:8000/sse",
"headers": {
"Authorization": "Bearer CHANGE_ME"
}
}
}
}
π€ Contributing
For development setup, testing, and contribution guidelines, please see CONTRIBUTING.md.
π License
MIT
Owner
- Name: CatchNip
- Login: CatchNip
- Kind: organization
- Repositories: 1
- Profile: https://github.com/CatchNip
Citation (CITATION.cff)
# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!
cff-version: 1.2.0
title: MCP Selenium Grid
message: "If you use this software, please cite it as below."
type: software
authors:
- given-names: Marco
email: falamarcao@gmail.com
repository-code: "https://github.com/Falamarcao/mcp-selenium-grid"
abstract: " enables AI Agents to request and manage Selenium browser instances through a secure API. Perfect for your automated browser testing needs! "
keywords:
- selenium grid
- browser automation
- mcp server
- webscraping
- docker
- kubernetes
- fastapi
license: MIT
GitHub Events
Total
- Release event: 5
- Watch event: 1
- Delete event: 6
- Member event: 1
- Issue comment event: 1
- Push event: 47
- Pull request event: 6
- Create event: 3
Last Year
- Release event: 5
- Watch event: 1
- Delete event: 6
- Member event: 1
- Issue comment event: 1
- Push event: 47
- Pull request event: 6
- Create event: 3
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 5
- Total maintainers: 1
pypi.org: mcp-selenium-grid
MCP Server for managing Selenium Grid
- Documentation: https://mcp-selenium-grid.readthedocs.io/
- License: MIT License Copyright (c) 2025 [falamarcao](https://github.com/Falamarcao) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
Latest release: 0.1.0
published 7 months ago
Rankings
Maintainers (1)
Dependencies
- actions/setup-python v5 composite
- actions/cache v4 composite
- docker/setup-buildx-action v3 composite
- actions/checkout v4 composite
- actions/setup-python v5 composite
- ./.github/actions/setup-python-uv * composite
- actions/checkout v4 composite
- python 3.13-slim-bullseye build
- docker >=7.1.0
- fastapi [standard]>=0.111.0
- fastapi-mcp >=0.3.4
- kubernetes >=30.2.0
- prometheus-client >=0.20.0
- prometheus-fastapi-instrumentator >=7.1.0
- pydantic [email]>=2.7.3
- pydantic-settings >=2.2.1
- python-dotenv >=1.0.1