
Selenium Mcp
io.github.pshivapr由 GitHub 账号 pshivapr 发布v0.4.6更新于 Oct 24, 2026
Selenium Tools for MCP
概览
一个本地 MCP 服务器,把 Selenium WebDriver 暴露给助手,用于驱动真实浏览器:导航页面、点击输入、管理 Cookie 与窗口并截图。
- 可以做什么
- 打开、导航、刷新、调整大小和关闭浏览器会话,并读取当前 URL、标题和页面源码,支持 Chrome、Firefox、Safari 和 Edge。查找元素并与之交互:点击、输入、清空、悬停、双击、右键、拖放、上传文件,以及读取文本或属性。管理 Cookie 和窗口,包括在窗口与 iframe 之间切换。执行高级操作,如运行 JavaScript、截图、选择下拉项、按键、滚动和提交表单。检查元素状态(是否显示、启用、选中),并等待元素或页面状态。
- 适用场景
- 适合需要助手执行真实浏览器自动化的场景:端到端网页测试、填写表单、抓取需要真实浏览器的页面,或根据观察到的流程生成 Selenium 测试代码。
- 运行要求
- 通过 stdio 在本地运行,通常用 npx 从 npm 包启动。需要 Node.js 18 或更高版本,以及已安装的浏览器(Chrome、Firefox、Safari 或 Edge);WebDriver 会自动管理。清单声明了一个可选的 API 密钥变量,但 README 未说明其用途。
安装
在 SourceWeft 中
- 打开 控制台中的 Selenium Mcp,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
README
[Add to Cursor] [Add to VS Code] [Add to Claude] [Add to ChatGPT] [Add to Codex] [Add to Gemini]
Selenium MCP Server
This is a server implementation that bridges the gap between MCP clients (AI assistants) and Selenium WebDriver. It exposes Selenium WebDriver's functionalities as MCP tools, allowing AI models to utilize them for tasks like:
- Browser management (launching, navigating, closing browsers)
- Element interaction (clicking, typing, finding elements)
- Web scraping and automated testing
- Advanced operations like screenshots, cookie management, and JavaScript execution
In essence, the selenium webdriver mcp setup allows AI assistants to leverage the power of Selenium Webdriver for web automation, by communicating with a dedicated Selenium MCP server via the Model Context Protocol. This facilitates tasks such as automated web interactions, testing, and data extraction, all controlled by AI.
[图片]🚀 Overview
A Model Context Protocol (MCP) server for Selenium that provides comprehensive Selenium WebDriver automation tools for AI assistants and applications. This server enables automated web browser interactions, testing, and scraping through a standardized interface.
Built with TypeScript and modern ES modules, it offers type-safe browser automation capabilities through the Model Context Protocol.
✨ Key Features
- Multi-Browser Support: Chrome, Firefox, Safari, and Edge browser automation
- Comprehensive Element Interaction: Click, type, hover, drag & drop, file uploads
- Advanced Navigation: Forward, backward, refresh, window management
- Wait Strategies: Intelligent waiting for elements and page states
- Type Safety: Full TypeScript implementation with Zod validation
🤝 Integration
MCP Client Integration
Configure your MCP client to connect to the Selenium server:
Standard Configuration (applicable to Windsurf, Warp, Gemini CLI etc)
Installation in VS Code
Update your mcp.json in VS Code with below configuration
NOTE: If you're new to MCP servers, follow this link Use MCP servers in VS Code
Example 'stdio' type connection
Example 'http' type connection
After installation, the Selenium MCP server will be available for use with your GitHub Copilot agent in VS Code.
To install the Selenium MCP server using the VS Code CLI
To install the package using either npm, or Smithery
Using npm:
Using Smithery
To install Selenium MCP for Claude Desktop automatically via [smithery badge]
Claude Desktop Integration
Add to your Claude Desktop configuration:
Screenshot
Prompts
An example prompt to start AI Agent interaction:
Using selenium mcp tools, navigate to <https://parabank.parasoft.com/> click the 'Register' link and signup using dynamic test data and click register. Then generate selenium tests in <YOUR_FAVOURITE_PROGRAMMING_LANGUAGE> using pom, create tests using cucumber features, steps and execute the tests.
Note: For more prompts, look at examples directory of the project
🛠️ MCP Available Tools
Browser Management Tools
Cookie Management Tools
Window Management Tools
Element Interaction Tools
Element State Validation Tools
Frame Management Tools
Advanced Action Tools
Scrolling Tools
Form Interaction Tools
Element Locator Strategies
id: Find by element IDcss: Find by CSS selectorxpath: Find by XPath expressionname: Find by name attributetag: Find by HTML tag nameclass: Find by CSS class name
📋 Requirements
- Node.js: Version 18.0.0 or higher
- Browsers: Chrome, Firefox, Safari, or Edge installed
- WebDrivers: Automatically managed by selenium-webdriver
- Operating System: Windows, macOS, or Linux
🚦 Development
Getting Started
Clone the repository
Install dependencies
Build the project
Running the Server
Production Mode
Development Mode (with auto-reload)
Direct Execution
Using as CLI Tool
After building, you can use the server as a global command:
📝 License
MIT License - see LICENSE file for details.
🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Badges/Mentions
Built with ❤️ for the Model Context Protocol ecosystem
来源:README.md,提交 bc06d84
工具
0版本历史
1- v0.4.6最新Sep 16, 2026
评分
已满足适用检查项的 50%
该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。
- 近 30 天内可连通25 分
请保持端点能够响应 MCP 握手;SourceWeft 每 30 天探测一次。
- 已声明认证方式10 分
请在注册中心条目中声明凭据请求头,或保持端点能够响应探测,以便判定其认证方式。
- 已列出工具15 分
请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。
- 描述必需15 分
- 图标10 分
- 文档15 分
- 许可证10 分