npm @gaforov/selenium-mcpstdioMITupdated 1mo ago
Selenium MCP server for AI agents — 39 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.
What can you do with selenium mcp?
selenium-mcp
Selenium MCP server for AI agents — 39 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.
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
Setup
claude mcp add selenium -- npx -y @gaforov/selenium-mcp@latest
Add to your client's MCP config (e.g. claude_desktop_config.json or .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 command npx and arguments -y @gaforov/selenium-mcp@latest. Full walkthrough in docs/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 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:
| Capability | selenium-mcp | Typical Selenium MCP servers |
|---|---|---|
Page snapshot with stable element refs (capture_page) |
✅ | rare |
Persistent per-domain selector memory (selector_hint_*) |
✅ | ❌ |
| Parallel multi-session browsing | ✅ | rare |
| Batched multi-step execution in one call | ✅ | ❌ |
| Built-in test assertions | ✅ | some |
| Tool-call tracing (NDJSON audit log) | ✅ | ❌ |
| Strict input validation + structured errors | ✅ | varies |
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 (39)
| Category | Tools |
|---|---|
| Browser lifecycle | start_browser, stop_browser, session_create, session_select, session_list, session_destroy |
| Navigation | open_url, navigate, get_current_url, get_title |
| Element discovery | find_element, wait_for_element, wait_until_visible, capture_page, get_page_source |
| Interaction | click, retry_click, interact (hover/double/right-click), type, press_key, upload_file |
| Reading | get_text, get_attribute |
| Assertions | assert_text, assert_visible, assert_attribute |
| Scripting | execute_script, batch_execute |
| Selector hints | selector_hint_save, selector_hint_get, selector_hint_list, selector_hint_delete |
| Windows & context | window, frame, alert |
| Cookies | add_cookie, get_cookies, delete_cookie |
| Capture | take_screenshot |
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:
SELENIUM_MCP_TRACE=true
SELENIUM_MCP_TRACE_PATH=./logs/selenium-mcp-trace.ndjson
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.
npm run typecheck
npm run build
npm test
License
MIT. See LICENSE.
Install
Add selenium mcp to your client. Pick the one you use.
claude mcp add selenium-mcp -- npx -y @gaforov/selenium-mcpcodex mcp add selenium-mcp -- npx -y @gaforov/selenium-mcpamp mcp add selenium-mcp -- npx -y @gaforov/selenium-mcp{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"selenium-mcp","command":"npx","args":["-y","@gaforov/selenium-mcp"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"selenium-mcp": {
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"selenium-mcp": {
"type": "local",
"command": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"selenium-mcp": {
"command": {
"path": "npx",
"args": [
"-y",
"@gaforov/selenium-mcp"
]
}
}
}
}Add to your Zed `settings.json`.
npx -y @gaforov/selenium-mcpRun `goose configure`, choose **Add Extension → Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation21/25
- Maintenance16/25
- Trust13/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 49 days ago
- Has a release history
- Repository is not archived
- Licensed MIT
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint — no local install
Version history
| Versions | Published |
|---|---|
| 0.2.1Latest | Jul 13, 2026 |
| 0.2.0 | Jul 12, 2026 |