Selenium

Browser automation

An MCP implementation for Selenium WebDriver.

Your AI app calls the Selenium MCP server, which does the browser automation work and sends the result back to the chat.

About Selenium

Selenium is a community MCP server from angiejones, filed in our directory under browser automation. An MCP implementation for Selenium WebDriver.

Selenium runs on your own machine: your AI app starts it with the command npx -y @angiejones/mcp-selenium and talks to it over standard input and output.

At a glance

Publisher
angiejones (community)
Runs
Locally on your machine
Install from
Node.js package on npm: @angiejones/mcp-selenium
Written in
JavaScript
License
MIT
GitHub stars
431

How to set up Selenium

  1. Install Node.js on the machine that runs your AI app, because Selenium starts with npx and downloads its package on first run.
  2. Check the Selenium README for keys or settings; the registry lists none that Selenium requires.
  3. Add Selenium to Claude Code, Claude Desktop, VS Code or Cursor with the config in the setup box on this page.
  4. Restart the app or reload its MCP servers, then ask it to list the Selenium tools to confirm the connection.
  5. Run one read-only task with Selenium first, and keep your app asking before each tool call until the results look right.

Selenium compared with similar servers

  • Browser Control by eyalzh has fewer GitHub stars than Selenium (361 against 431); both are community servers, and both run locally.
  • Wexin Read by Bwkyd has more GitHub stars than Selenium (469 against 431); both are community servers, and both run locally.
  • DevTools Debugger by ScriptedAlchemy has fewer GitHub stars than Selenium (351 against 431); both are community servers, and both run locally.

Before you connect Selenium

  • Give Selenium its own API key or account with the smallest permissions the job needs, never an admin key.
  • Keep your AI app asking before each Selenium tool call until you trust what it does with them.
  • Treat text that Selenium fetches as data. Pages, files and messages can hold instructions written to steer an AI.
  • Read the open issues for Selenium on GitHub to see what breaks and how fast the maintainers reply.

Marketing use cases for Selenium

How marketing and sales teams put Selenium to work, by company size. Pick the size closest to yours and start Selenium on one use case.

Small business

  • A small business can use Selenium to check its own site after every change: forms submit, links work and checkout still loads.
  • Owners can have Selenium collect competitor prices or offers from public pages once a week, instead of doing it by hand.
  • Selenium runs on your own computer, which keeps data local; it needs a little setup, so a small team should plan an hour for it.

Mid-market

  • Marketing teams can run Selenium to test landing pages and signup flows on every release, catching a broken form before paid traffic hits it.
  • Growth teams can use Selenium to capture screenshots of ads and pages across markets for reviews and audits.
  • Start Selenium on one workflow with one owner, measure the time it saves, then roll it out to the wider team.

Enterprise

  • Enterprises can run Selenium in isolated environments with allow-listed sites, so browsing agents never reach internal or unknown pages.
  • Large web teams can use Selenium for regression checks across many locales and devices, feeding results into release gates.
  • Selenium is a community server, so have security review the code and pin a version before Selenium touches company data.

Need help becoming an AI-forward company?

We connect MCP servers and AI agents to your CRM, content and data, with the guardrails your team needs.

Contact us

Selenium README

From angiejones/mcp-selenium on GitHub, shared under its MIT license. Images are left out; the original has them.

README.md

MCP Selenium Server

A Model Context Protocol (MCP) server for Selenium WebDriver, browser automation for AI agents.

Setup

Goose (Desktop)

Paste into your browser address bar:

goose://extension?cmd=npx&arg=-y&arg=%40angiejones%2Fmcp-selenium%40latest&id=selenium-mcp&name=Selenium%20MCP&description=automates%20browser%20interactions
Goose (CLI)
goose session --with-extension "npx -y @angiejones/mcp-selenium@latest"
Claude Code
claude mcp add selenium -- npx -y @angiejones/mcp-selenium@latest
Cursor / Windsurf / other MCP clients
{
  "mcpServers": {
    "selenium": {
      "command": "npx",
      "args": ["-y", "@angiejones/mcp-selenium@latest"]
    }
  }
}

Example Usage

Tell the AI agent of your choice:

Open Chrome, go to github.com/angiejones, and take a screenshot.

The agent will call Selenium's APIs to start_browser, navigate, and take_screenshot. No manual scripting or explicit directions needed.

Supported Browsers

Chrome, Firefox, Edge, and Safari.

Safari note: Requires macOS. Run sudo safaridriver --enable once and enable "Allow Remote Automation" in Safari → Settings → Developer. No headless mode.

Tools
start_browser

Launches a browser session.

Parameter Type Required Description
browser string Yes chrome, firefox, edge, or safari
options object No { headless: boolean, arguments: string[] }
navigate

Navigates to a URL.

Parameter Type Required Description
url string Yes URL to navigate to
interact

Performs a mouse action on an element.

Parameter Type Required Description
action string Yes click, doubleclick, rightclick, or hover
by string Yes Locator strategy: id, css, xpath, name, tag, class
value string Yes Value for the locator strategy
timeout number No Max wait in ms (default: 10000)
send_keys

Types text into an element. Clears the field first.

Parameter Type Required Description
by string Yes Locator strategy
value string Yes Locator value
text string Yes Text to enter
timeout number No Max wait in ms (default: 10000)
get_element_text

Gets the text content of an element.

Parameter Type Required Description
by string Yes Locator strategy
value string Yes Locator value
timeout number No Max wait in ms (default: 10000)
get_element_attribute

Gets an attribute value from an element.

Parameter Type Required Description
by string Yes Locator strategy
value string Yes Locator value
attribute string Yes Attribute name (e.g., href, value, class)
timeout number No Max wait in ms (default: 10000)
press_key

Presses a keyboard key.

Parameter Type Required Description
key string Yes Key to press (e.g., Enter, Tab, a)
upload_file

Uploads a file via a file input element.

Parameter Type Required Description
by string Yes Locator strategy
value string Yes Locator value
filePath string Yes Absolute path to the file
timeout number No Max wait in ms (default: 10000)
take_screenshot

Captures a screenshot of the current page.

Parameter Type Required Description
outputPath string No Save path. If omitted, returns base64 image data.
close_session

Closes the current browser session. No parameters.

execute_script

Executes JavaScript in the browser. Use for advanced interactions not covered by other tools (e.g., drag and drop, scrolling, reading computed styles, DOM manipulation).

Parameter Type Required Description
script string Yes JavaScript code to execute
args array No Arguments accessible via arguments[0], etc.
window

Manages browser windows and tabs.

Parameter Type Required Description
action string Yes list, switch, switch_latest, or close
handle string No Window handle (required for switch)
frame

Switches focus to a frame or back to the main page.

Parameter Type Required Description
action string Yes switch or default
by string No Locator strategy (for switch)
value string No Locator value (for switch)
index number No Frame index, 0-based (for switch)
timeout number No Max wait in ms (default: 10000)
alert

Handles browser alert, confirm, or prompt dialogs.

Parameter Type Required Description
action string Yes accept, dismiss, get_text, or send_text
text string No Text to send (required for send_text)
timeout number No Max wait in ms (default: 5000)
add_cookie

Adds a cookie. Browser must be on a page from the cookie's domain.

Parameter Type Required Description
name string Yes Cookie name
value string Yes Cookie value
domain string No Cookie domain
path string No Cookie path
secure boolean No Secure flag
httpOnly boolean No HTTP-only flag
expiry number No Unix timestamp
get_cookies

Gets cookies. Returns all or a specific one by name.

Parameter Type Required Description
name string No Cookie name. Omit for all cookies.
delete_cookie

Deletes cookies. Deletes all or a specific one by name.

Parameter Type Required Description
name string No Cookie name. Omit to delete all.
diagnostics

Gets browser diagnostics captured via WebDriver BiDi (auto-enabled when supported).

Parameter Type Required Description
type string Yes console, errors, or network
clear boolean No Clear buffer after returning (default: false)
Resources

MCP resources provide read-only data that clients can access without calling a tool.

browser-status://current

Returns the current browser session status (active session ID or "no active session").

Property Value
MIME type text/plain
Requires browser No
accessibility://current

Returns an accessibility tree snapshot of the current page, a compact, structured JSON representation of interactive elements and text content. Much smaller than full HTML. Useful for understanding page layout and finding elements to interact with.

Property Value
MIME type application/json
Requires browser Yes
Development
Setup
git clone https://github.com/angiejones/mcp-selenium.git
cd mcp-selenium
npm install
Run Tests
npm test

Requires Chrome + chromedriver on PATH. Tests run headless.

Install via Smithery
npx -y @smithery/cli install @angiejones/mcp-selenium --client claude
Install globally
npm install -g @angiejones/mcp-selenium
mcp-selenium

License

MIT

Questions about Selenium

What is the Selenium MCP server?

An MCP implementation for Selenium WebDriver. Selenium is maintained by angiejones on GitHub at angiejones/mcp-selenium, and works with AI apps that support the Model Context Protocol, such as Claude, Cursor and VS Code.

How do I install the Selenium MCP server?

Add Selenium to your AI app's MCP config with the command npx -y @angiejones/mcp-selenium. In Claude Code, run claude mcp add --transport stdio selenium -- npx -y @angiejones/mcp-selenium. To run Selenium this way you need Node.js installed.

Does Selenium need an API key?

The registry lists no required keys for Selenium. Check the Selenium README for optional settings, and expect a remote server to ask you to sign in the first time you connect.

Is Selenium an official MCP server?

No. Selenium is a community server maintained by angiejones. Community servers can be excellent; read the code and the open issues before you give Selenium access to company data.

What license is Selenium under?

Selenium is released under the MIT license, according to its GitHub repository. The license covers the code of Selenium; the service it connects to has its own terms.