Get the FREE Ultimate OpenClaw Setup Guide →

selenium

MCP server from PhungXuanAnh/selenium-mcp-server

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio phungxuananh-selenium-mcp-server python -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug

How to use

This Selenium MCP Server exposes web automation capabilities via a Python-based MCP server backed by Selenium WebDriver. It offers tools for navigating web pages, discovering and interacting with elements, taking full-page screenshots, executing JavaScript in the browser, retrieving browser and network logs, and managing local storage. AI assistants can use these tools to automate complex web tasks such as form filling, clicking elements, verifying page content, and capturing visual state through screenshots. You can run the server either from a Python package installation or from source, then connect your MCP client to the server endpoint (by default on port 9222) to begin issuing tool calls like navigate, click_to_element, set_value_to_input_element, take_screenshot, and run_javascript_in_console.

How to install

Prerequisites:\n- Python 3.10 or higher\n- Google Chrome (or Chromium) installed\n\nOption A: Install as Python Package (Recommended)\n1) Install the package:\nbash\npip install mcp-server-selenium\n\n2) Run the MCP server:\nbash\npython -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug\n\n\nOption B: Run from Source Code\n1) Clone the repository and install dependencies:\nbash\ngit clone https://github.com/PhungXuanAnh/selenium-mcp-server.git\ncd selenium-mcp-server\nuv sync\n\n2) Run the server from source:\nbash\nPYTHONPATH=src python -m mcp_server_selenium --port 9222 --user_data_dir /tmp/chrome-debug\n\n\nChrome setup:\n- Connect to an existing Chrome instance with debugging enabled:\nbash\ngoogle-chrome --remote-debugging-port=9222 --user-data-dir=/tmp/chrome-debug\n\n- Or let the server auto-start Chrome if no instance is found.\n

Additional notes

Tips:\n- The server listens on port 9222 by default; you can customize the port using --port.\n- The --user_data_dir path is used to store Chrome user data when launching a new browser instance; ensure the directory is writable.\n- If you run from source, ensure your PYTHONPATH includes the src folder as shown in the example.\n- For debugging, Inspector tooling can help test MCP calls against the server.\n- When using from installed package, ensure the environment has access to Chrome and the required permissions for launching browser processes.

Related MCP Servers

Sponsor this space

Reach thousands of developers