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.
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:
start_browsernavigateget_titletake_screenshotstop_browser
Implemented Tools
start_browseropen_urlnavigatefind_elementwait_for_elementwait_until_visibleclickretry_clickinteracttypeget_textget_attributeassert_textassert_visibleassert_attributepress_keytake_screenshotget_current_urlget_titleget_page_sourceexecute_scriptupload_filewindowframealertadd_cookieget_cookiesdelete_cookiestop_browser
MCP Resources
browser-status://currentaccessibility://current
Documentation
Development
npm run typecheck
npm run build
npm test
License
MIT. See LICENSE.
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.