
Selenium Mcp
io.github.gaforovPublished by GitHub account gaforovv0.3.0Updated Oct 24, 2026
Selenium MCP server for AI agents — 41 browser automation tools with snapshots and sessions.
Overview
Selenium-based MCP server giving an AI assistant 41 tools to drive a real Chrome, Firefox or Edge browser locally, with page snapshots and multi-session…
- What you can do
- Start, stop and manage parallel browser sessions, and navigate with history, redirect waits and URL/title reads.
- Find and wait for elements, capture page snapshots with stable element refs, and read page source.
- Click, retry clicks, hover, type, select options, scroll, press keys and upload files.
- Read text and attributes, run assertions, execute scripts and run batched multi-step sequences.
- Save, list and delete per-domain selector hints, manage windows, frames, alerts and cookies, and take screenshots.
- When to use it
- Useful when an assistant should operate a real browser on the user's machine: end-to-end web testing, filling in forms, checking rendered pages, responsive viewport checks, or repeatable automations that benefit from saved selector hints.
- Requirements
- Runs as a local stdio process, typically via npx from the npm package. Needs Node.js 20+ and Chrome, Firefox or Edge installed; Selenium Manager provisions the matching driver automatically. Optional tracing is enabled with the SELENIUM_MCP_TRACE and SELENIUM_MCP_TRACE_PATH environment variables.
Installation
In SourceWeft
- Open Selenium Mcp in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
selenium-mcp
Selenium MCP server for AI agents — 41 tools for 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.
[npm version] [npm downloads] [CI] [license] [node]
Built with TypeScript, the official MCP SDK, and Selenium WebDriver — strict zod input validation, explicit waits, and structured responses designed for LLM agents.
One-Click Install
[Install in Cursor] [Install in VS Code] [Install in VS Code Insiders]
What's new in 0.3.0
- New tools:
select_optionfor dropdowns,scroll(including infinite-scroll pages and scrollable panels),historyfor back, forward, and refresh, andwait_for_pageto wait for a URL or title after a redirect. - Responsive testing:
windowcan now resize the viewport to an exact size, such as a 390x844 phone, or maximize it. - Better tool choice by AI agents: every tool and parameter now explains what it does, what it returns, and when to use a similar tool instead.
- Breaking:
open_urlandwait_until_visiblewere removed as duplicates. Usenavigate, andwait_for_elementwithvisible: true. - Verified releases: every release is tested end to end against a real browser and published with npm provenance.
See the changelog for details.
Setup
Claude Code
Claude Desktop / Cursor / Windsurf / other MCP clients
Add to your client's MCP config (e.g. claude_desktop_config.json or .cursor/mcp.json):
VS Code
Goose
IntelliJ IDEA / JetBrains IDEs
Settings → Tools → AI Assistant → Model Context Protocol → Add, with command npx and arguments -y @gaforov/selenium-mcp@latest. Full walkthrough in docs/CLIENT_INTEGRATION.md.
From source
Then point your MCP client at node /absolute/path/to/selenium-mcp/dist/server.js.
Example Usage
Ask your AI agent:
Use selenium-mcp to open Chrome, go to https://example.com, read the page title, take a screenshot, and close the browser.
The agent chains start_browser → navigate → get_title → take_screenshot → stop_browser on its own — no scripting needed.
Requirements
- Node.js 20+
- Chrome, Firefox, or Edge installed (Selenium Manager provisions the matching driver automatically)
How it compares
Most Selenium MCP servers wrap WebDriver's basic commands. This one adds the layer that makes agents reliable:
Why selenium-mcp
- Snapshot-first workflows —
capture_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 execution —
batch_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
Tools (41)
Full parameter documentation: docs/TOOL_REFERENCE.md
MCP Resources
browser-status://current— live browser/session statusaccessibility://current— accessibility snapshot of the current page
Optional Tracing
Enable lightweight NDJSON tracing of all tool calls:
If SELENIUM_MCP_TRACE_PATH is omitted, the default is logs/selenium-mcp-trace.ndjson.
Documentation
- Usage guide — prompts & recipes
- Tool reference
- Client integration
- Architecture
- Development guide
- Changelog
- Roadmap
Contributing
Contributions are welcome — bug reports, feature requests, and pull requests. See CONTRIBUTING.md to get started.
License
MIT. See LICENSE.
Source: README.md at commit d04777a
Tools
0Version history
1- v0.3.0LatestSep 16, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts