What is Selenium Mcp?
Selenium Mcp is a Python server that bridges AI assistants or custom MCP clients with Selenium Webdrivers by exposing Selenium webdriver functionalities as MCP tools, enabling web automation, web testing, and web scraping.
How to use Selenium Mcp?
Clone the repository, create a Python virtual environment, install dependencies from requirements.txt, then run python server.py. Optionally set a Google GenAI API key in a .env file as GEMINI_API_KEY and use the built-in lightweight MCP client for testing.
Key features of Selenium Mcp
- Humanised error handling for LLM reconfiguration
- Comprehensive element interaction with visibility checks
- Full navigation control: open URLs, forward, backward, refresh
- Supports creating and quitting browser sessions
- Manages cookies (add, delete, get, clear)
- Performs clicks (left, right, double, drag‑and‑drop)
- Scrolls and resizes browser windows
Use cases of Selenium Mcp
- Automate web form filling and submission
- Perform web scraping and capture page content as Markdown, HTML, or screenshots
- Execute JavaScript to interact dynamically with webpages
- Upload and download files through browser automation
- Handle browser alerts and dialogs programmatically
コメント