Selenium

Selenium

angiejones

Automates web browsers through Selenium WebDriver, allowing AI agents to click buttons, fill forms, navigate pages, and interact with websites programmatically.

Automates web browser actions with Selenium WebDriver.

3731,191 views115Local (stdio)

What it does

  • Launch Chrome, Firefox, Edge, or Safari browsers
  • Navigate to URLs and click elements on web pages
  • Fill forms and type text into input fields
  • Extract text content from web page elements
  • Perform drag-and-drop and hover interactions
  • Execute right-clicks and double-clicks on elements

Best for

AI agents performing web-based tasks and workflowsAutomated testing of web applicationsWeb scraping and data extraction from interactive sitesBrowser-based automation without manual scripting
Works with major browsers including SafariNo manual scripting required - just tell the AI what to do10+ browser interaction tools

About Selenium

Selenium is a community-built MCP server published by angiejones that provides AI assistants with tools and capabilities via the Model Context Protocol. Automate web browser actions efficiently using Selenium WebDriver for robust testing with Selenium on Python and seamles It is categorized under browser automation. This server exposes 14 tools that AI clients can invoke during conversations and coding sessions.

How to install

You can install Selenium in your AI client of choice. Use the install panel on this page to get one-click setup for Cursor, Claude Desktop, VS Code, and other MCP-compatible clients. This server runs locally on your machine via the stdio transport.

License

Selenium is released under the MIT license. This is a permissive open-source license, meaning you can freely use, modify, and distribute the software.

Tools (14)

start_browser

launches browser

navigate

navigates to a URL

find_element

finds an element

click_element

clicks an element

send_keys

sends keys to an element, aka typing

MCP Selenium Server

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

Watch the video

Selenium MCP server

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.

ParameterTypeRequiredDescription
browserstringYeschrome, firefox, edge, or safari
optionsobjectNo{ headless: boolean, arguments: string[] }

navigate

Navigates to a URL.

ParameterTypeRequiredDescription
urlstringYesURL to navigate to

interact

Performs a mouse action on an element.

ParameterTypeRequiredDescription
actionstringYesclick, doubleclick, rightclick, or hover
bystringYesLocator strategy: id, css, xpath, name, tag, class
valuestringYesValue for the locator strategy
timeoutnumberNoMax wait in ms (default: 10000)

send_keys

Types text into an element. Clears the field first.

ParameterTypeRequiredDescription
bystringYesLocator strategy
valuestringYesLocator value
textstringYesText to enter
timeoutnumberNoMax wait in ms (default: 10000)

get_element_text

Gets the text content of an element.

ParameterTypeRequiredDescription
bystringYesLocator strategy
valuestringYesLocator value
timeoutnumberNoMax wait in ms (default: 10000)

get_element_attribute

Gets an attribute value from an element.

ParameterTypeRequiredDescription
bystringYesLocator strategy
valuestringYesLocator value
attributestringYesAttribute name (e.g., href, value, class)
timeoutnumberNoMax wait in ms (default: 10000)

press_key

Presses a keyboard key.

ParameterTypeRequiredDescription
keystringYesKey to press (e.g., Enter, Tab, a)

upload_file

Uploads a file via a file input element.

ParameterTypeRequiredDescription
bystringYesLocator strategy
valuestringYesLocator value
filePathstringYesAbsolute path to the file
timeoutnumberNoMax wait in ms (default: 10000)

take_screenshot

Captures a screenshot of the current page.

ParameterTypeRequiredDescription
outputPathstringNoSave 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).

ParameterTypeRequiredDescription
scriptstringYesJavaScript code to execute
argsarrayNoArguments accessible via arguments[0], etc.

window

Manages browser windows and tabs.

ParameterTypeRequiredDescription
actionstringYeslist, switch, switch_latest, or close
handlestringNoWindow handle (required for switch)

frame

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

ParameterTypeRequiredDescription
actionstringYesswitch or default
bystringNoLocator strategy (for switch)
valuestringNoLocator value (for switch)
indexnumberNoFrame index, 0-based (for switch)
timeoutnumberNoMax wait in ms (default: 10000)

alert

Handles browser alert, confirm, or prompt dialogs.

ParameterTypeRequiredDescription
actionstringYesaccept, dismiss, get_text, or send_text
textstringNoText to send (required for send_text)
timeoutnumberNoMax wait in ms (default: 5000)

add_cookie

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

ParameterTypeRequiredDescription
namestringYesCookie name
valuestringYesCookie value
domainstringNoCookie domain
pathstringNoCookie path
securebooleanNoSecure flag
httpOnlybooleanNoHTTP-only flag
expirynumberNoUnix timestamp

get_cookies

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

ParameterTypeRequiredDescription
namestringNoCookie name. Omit for all cookies.

delete_cookie

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

ParameterTypeRequiredDescription
namestringNoCookie name. Omit to delete all.

diagnostics

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

ParameterTypeRequiredDescription
typestringYesconsole, errors, or network
clearbooleanNoClear 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").

PropertyValue
MIME typetext/plain
Requires browserNo

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.

PropertyValue
MIME typeapplication/json
Requires browserYes

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

Alternatives

Related Skills

Browse all skills
playwright-pro

Production-grade Playwright testing toolkit. Use when the user mentions Playwright tests, end-to-end testing, browser automation, fixing flaky tests, test migration, CI/CD testing, or test suites. Generate tests, fix flaky failures, migrate from Cypress/Selenium, sync with TestRail, run on BrowserStack. 55 templates, 3 agents, smart reporting.

8
notebooklm

Query Google NotebookLM for source-grounded, citation-backed answers from uploaded documents. Reduces hallucinations through Gemini's document-only responses. Browser automation with library management and persistent authentication.

144
dev-browser

Browser automation with persistent page state. Use when users ask to navigate websites, fill forms, take screenshots, extract web data, test web apps, or automate browser workflows. Trigger phrases include "go to [url]", "click on", "fill out the form", "take a screenshot", "scrape", "automate", "test the website", "log into", or any browser interaction request.

45
chrome-devtools

Browser automation, debugging, and performance analysis using Puppeteer CLI scripts. Use for automating browsers, taking screenshots, analyzing performance, monitoring network traffic, web scraping, form automation, and JavaScript debugging.

30
qa-tester

"Browser automation QA testing skill. Systematically tests web applications for functionality, security, and usability issues. Reports findings by severity (CRITICAL/HIGH/MEDIUM/LOW) with immediate alerts for critical failures."

25
browser-automation

Automate web browser interactions using natural language via CLI commands. Use when the user asks to browse websites, navigate web pages, extract data from websites, take screenshots, fill forms, click buttons, or interact with web applications. Triggers include "browse", "navigate to", "go to website", "extract data from webpage", "screenshot", "web scraping", "fill out form", "click on", "search for on the web". When taking actions be as specific as possible.

23