
Selenium Mcp
io.github.pshivapr由 GitHub 帳號 pshivapr 發布v0.4.6更新於 Oct 24, 2026
Selenium Tools for MCP
概覽
一個本機 MCP 伺服器,將 Selenium WebDriver 提供給助理,用來驅動真實瀏覽器:瀏覽頁面、點擊輸入、管理 Cookie 與視窗並截圖。
- 可以做什麼
- 開啟、瀏覽、重新整理、調整大小和關閉瀏覽器工作階段,並讀取目前網址、標題和頁面原始碼,支援 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 分