selenium-mcp

selenium-mcp

Enables browser automation through the Model Context Protocol, allowing AI agents to control Chrome, Firefox, or Edge for tasks like navigation, clicking, typing, and screenshots.

Category
Visit Server

README

selenium-mcp

Selenium MCP server for browser automation through Model Context Protocol clients.

It is built with TypeScript, the official MCP SDK, Selenium WebDriver, strict zod input validation, explicit waits, and structured responses that are useful to both humans and AI agents.

Features

  • Launch Chrome, Firefox, or Edge
  • Navigate pages and read URL/title/source
  • Find, click, type, hover, right-click, double-click, and retry-click elements
  • Read text and attributes
  • Press keyboard keys
  • Capture screenshots
  • Upload files through file inputs
  • Execute JavaScript
  • Assert visible text, attributes, and visibility
  • Manage tabs/windows, frames, alerts, and cookies
  • Expose browser status and accessibility snapshot MCP resources

What's New In v0.1.0

  • First public npm release: @gaforov/selenium-mcp
  • Expanded toolset for end-to-end browser automation, assertions, and diagnostics
  • Added MCP resources for browser status and accessibility snapshot context
  • Added broad client setup documentation for IntelliJ, VS Code, Cursor, Claude, Goose, and Windsurf
  • Added CI workflow and baseline tests for shared contracts

Requirements

  • Node.js 20+
  • Chrome, Firefox, or Edge installed

Selenium Manager handles browser drivers for supported local browsers.

Quick Start From Source

git clone https://github.com/gaforov/selenium-mcp.git
cd selenium-mcp
npm install
npm run build
npm start

MCP Client Config

Local source checkout:

{
  "mcpServers": {
    "selenium-mcp": {
      "command": "node",
      "args": ["/absolute/path/to/selenium-mcp/dist/server.js"]
    }
  }
}

After npm publish:

{
  "mcpServers": {
    "selenium-mcp": {
      "command": "npx",
      "args": ["-y", "@gaforov/selenium-mcp@latest"]
    }
  }
}

For IntelliJ IDEA, VS Code, Cursor, Claude Desktop, Claude Code, Goose, and Windsurf setup notes, see docs/CLIENT_INTEGRATION.md.

First Prompt To Try

Ask your MCP-capable assistant:

Use selenium-mcp to open Chrome, navigate to https://example.com, read the page title, take a screenshot, and close the browser.

Expected tool flow:

  1. start_browser
  2. navigate
  3. get_title
  4. take_screenshot
  5. stop_browser

Implemented Tools

  • start_browser
  • open_url
  • navigate
  • find_element
  • wait_for_element
  • wait_until_visible
  • click
  • retry_click
  • interact
  • type
  • get_text
  • get_attribute
  • assert_text
  • assert_visible
  • assert_attribute
  • press_key
  • take_screenshot
  • get_current_url
  • get_title
  • get_page_source
  • execute_script
  • upload_file
  • window
  • frame
  • alert
  • add_cookie
  • get_cookies
  • delete_cookie
  • stop_browser

MCP Resources

  • browser-status://current
  • accessibility://current

Documentation

Development

npm run typecheck
npm run build
npm test

License

MIT. See LICENSE.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured