themindmod_selenium-mcp-server

themindmod_selenium-mcp-server

3.5

An MCP server that uses Selenium to interact with a WebDriver instance.

The Selenium MCP Server is designed to allow AI agents to control a web browser session via Selenium WebDriver. This enables tasks such as web scraping, automated testing, and form filling through the Model Context Protocol. Built using the MCP-Server-Starter template, it exposes Selenium WebDriver actions as MCP tools, allowing integration with various AI hosts like Cursor and Claude Desktop. The server requires Node.js, npm, a WebDriver executable, and a compatible web browser to function. It provides a set of tools for browser navigation, element interaction, and page source retrieval, all implemented in TypeScript using the @modelcontextprotocol/sdk and selenium-webdriver libraries.

Features

  • Exposes Selenium WebDriver actions as MCP tools.
  • Allows AI agents to control web browser sessions.
  • Supports web scraping, automated testing, and form filling.
  • Integrates with AI hosts like Cursor and Claude Desktop.
  • Implemented in TypeScript for type safety and validation.

MCP Tools

  • {'selenium_navigate': 'Navigates the browser to a specific URL.'}
  • {'selenium_findElement': 'Finds an element on the page using a CSS selector.'}
  • {'selenium_click': 'Clicks an element.'}
  • {'selenium_sendKeys': 'Sends keystrokes to an element.'}
  • {'selenium_getPageSource': 'Retrieves the current page source HTML.'}

Usage with Different Platforms

Cursor Integration

bash
1. Build your server: `npm run build`
2. In Cursor: `Settings` > `Features` > `MCP`: Add a new MCP server.
3. Register your server:
   * Select `stdio` as the transport type.
   * Name: `Selenium Server` (or similar).
   * Command: `node /path/to/selenium-mcp-server/build/index.js`.
4. Save.

Claude Desktop Integration


1. Build your server: `npm run build`
2. Modify `claude_desktop_config.json`:
   {
     "mcpServers": {
       "selenium-mcp-server": {
         "command": "node",
         "args": [
           "/path/to/selenium-mcp-server/build/index.js"
         ]
       }
     }
   }
3. Restart Claude Desktop.