Selenium MCP

by gaforov

Not rated
GitHub

About

Selenium MCP server for AI agents — 39 browser automation tools with page snapshots, selector hints, multi-session, and batched execution.

Details

Author
gaforov
Categories
Developer Tools, Automation, Web Scraping

Setup

Install Selenium MCP in your MCP client (Claude Desktop, Cursor, Windsurf, and others).

Repository: https://github.com/gaforov/selenium-mcp

Follow the installation instructions in the repository README, then restart your MCP client.

Selenium MCP server for AI agents —39 toolsfor real-browser automation: navigation, clicking, typing, assertions, screenshots, multi-session management, page snapshots with stable element refs, persistent selector hints, and batched multi-step execution.

Built with TypeScript, the official MCP SDK, and Selenium WebDriver — strict zod input validation, explicit waits, and structured responses designed for LLM agents.

claude mcp add selenium -- npx -y @gaforov/selenium-mcp@latest

Add to your client's MCP config (e.g.claude_desktop_config.jsonor.cursor/mcp.json):

{ "mcpServers": { "selenium": { "command": "npx", "args": ["-y", "@gaforov/selenium-mcp@latest"] } } }
code --add-mcp '{"name":"selenium","command":"npx","args":["-y","@gaforov/selenium-mcp@latest"]}'
goose session --with-extension "npx -y @gaforov/selenium-mcp@latest"

Settings → Tools → AI Assistant → Model Context Protocol → Add, with commandnpxand arguments-y @gaforov/selenium-mcp@latest. Full walkthrough indocs/CLIENT_INTEGRATION.md.

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

Then point your MCP client atnode /absolute/path/to/selenium-mcp/dist/server.js.

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

The agent chainsstart_browsernavigateget_titletake_screenshotstop_browseron its own — no scripting needed.

- Node.js 20+
- Chrome, Firefox, or Edge installed (Selenium Manager provisions the matching driver automatically)

Most Selenium MCP servers wrap WebDriver's basic commands. This one adds the layer that makes agentsreliable:

- Snapshot-first workflowscapture_pagereturns a page snapshot with stable element refs the agent can act on directly, no brittle selector guessing
- Selector hints— persist working locators per domain so repeat automations get faster and more reliable over time
- Batched executionbatch_executeruns constrained multi-step sequences in a single tool call, cutting round-trips
- Multi-session— create, select, list, and destroy parallel browser sessions
- Agent-friendly errors— every response is structured and validated with zod, so agents can recover instead of stalling
- Optional tracing— NDJSON trace of every tool call for debugging and auditing

Full parameter documentation:docs/TOOL_REFERENCE.md

- browser-status://current— live browser/session status
- accessibility://current— accessibility snapshot of the current page

Enable lightweight NDJSON tracing of all tool calls:

SELENIUM_MCP_TRACE=true SELENIUM_MCP_TRACE_PATH=./logs/selenium-mcp-trace.ndjson

IfSELENIUM_MCP_TRACE_PATHis omitted, the default islogs/selenium-mcp-trace.ndjson.

- Usage guide — prompts & recipes
-
Tool reference
-
Client integration
-
Architecture
-
Development guide
-
Changelog
-
Roadmap

Contributions are welcome — bug reports, feature requests, and pull requests. SeeCONTRIBUTING.mdto get started.

npm run typecheck npm run build npm test

This is a web browser that enables your coding agent, such as Claude Code, to visit websites on your behalf and assist you in identifying bugs or creating UI test cases.

Control your real Chrome from Claude Code. 29 tools including CAPTCHA solving, file upload, multi-session, and human-in-the-loop.

Automate web browsers using Selenium WebDriver via MCP.

MCP tools for crawler-readability and discovery-file diagnostics, including crawler-visible HTML inspection, raw-vs-rendered comparison, and discovery-file checks.

Automated QA testing for websites to find UI bugs, broken links, and accessibility issues.

Official Playwright MCP server for browser automation, page inspection, screenshots, and web interaction from Claude, Cursor, and other AI agents.

Render website screenshots with ScreenshotOne

Attaches to existing browser sessions using the Chrome DevTools Protocol for automation and interaction.

Help your AI agent finish more browser tasks.

Automate remote browsers using the BrowserCat API.

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.