home / mcp / selenium mcp server
Provides MCP-compliant endpoints and local runtime for managing Selenium browser instances in Docker or Kubernetes
Configuration
View docs{
"mcpServers": {
"catchnip-mcp-selenium-grid": {
"url": "http://localhost:8000/mcp",
"headers": {
"AUTH_ENABLED": "false",
"ALLOWED_ORIGINS": "[\"http://127.0.0.1:8000\"]",
"DEPLOYMENT_MODE": "docker",
"SELENIUM_GRID__PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__USERNAME": "USER",
"SELENIUM_GRID__VNC_PASSWORD": "CHANGE_ME",
"SELENIUM_GRID__VNC_VIEW_ONLY": "false",
"SELENIUM_GRID__SE_NODE_MAX_SESSIONS": "1",
"SELENIUM_GRID__MAX_BROWSER_INSTANCES": "4"
}
}
}
}You can manage Selenium Grid browser instances through an MCP server that supports both HTTP API endpoints and a local stdio-driven command flow. This server enables you to create, scale, and supervise Chrome, Firefox, and Edge browser instances in Docker or Kubernetes environments, with token-based security and MCP-compliant endpoints for automation workflows.
You interact with the MCP Selenium Grid server through its HTTP API endpoints or via a local runtime command flow. Use the HTTP endpoints to programmatically create and manage browser instances, monitor status, and retrieve results. Use the stdio flow when you run the MCP server directly on your machine or in scripts to start and control the server process.
Prerequisites you need before starting: install uv, which is the Python dependency manager. Install Docker if you plan to run in Docker deployment mode. Install K3s if you plan to run in Kubernetes deployment mode.
# Install uv (Python dependency manager) if not already present
pip install uv
# Optional: install Docker for Docker deployment mode
# Follow your platform's instructions at https://www.docker.com/get-started
# Optional: install K3s for Kubernetes deployment mode (local development)
curl -sfL https://get.k3s.io | sh -MCP server endpoints run on http://localhost:8000 with MCP HTTP transport at /mcp and Server-Sent Events at /sse. You can use either the root URL (which redirects to the appropriate endpoint) or directly target /mcp for HTTP transport or /sse for streaming updates.
Security is managed via token-based authentication. When you enable authentication, you will use an authorization header like Authorization: Bearer YOUR_TOKEN for HTTP requests. You can run the server with authentication off or on depending on your security needs.
Deployment options include Docker and Kubernetes. The server can be started in Docker mode or Kubernetes mode, and you can pass configuration through environment variables to tailor authentication, origins, max browser instances, and node session limits.
If you intend to clean up resources when using STDIO transport, you can run the cleanup command to remove containers or pods created by the server.
Create a new browser instance across available browsers (Chrome, Firefox, Edge) with the requested capabilities.
Query and list all active browser instances and their statuses.
Terminate a specific browser instance by its ID.
Validate a provided API token and establish a session for subsequent requests.
Adjust the number of browser nodes to accommodate load, up or down.