MCP Selenium
MCP Selenium 服务器
Selenium WebDriver 的模型上下文协议 (MCP) 服务器实现,通过标准化 MCP 客户端实现浏览器自动化。
特征
使用可自定义的选项启动浏览器会话
导航至 URL
使用各种定位器策略查找元素
单击、键入并与元素交互
执行鼠标操作(悬停、拖放)
处理键盘输入
截取屏幕截图
上传文件
支持无头模式
Related MCP server: Browser MCP
支持的浏览器
铬合金
火狐
与 Goose 一起使用
选项 1:一键安装
将以下链接复制并粘贴到浏览器地址栏中,以将此扩展程序添加到 goose 桌面:
goose://extension?cmd=npx&arg=-y&arg=%40angiejones%2Fmcp-selenium&id=selenium-mcp&name=Selenium%20MCP&description=automates%20browser%20interactions选项 2:手动添加到桌面或 CLI
名称:
Selenium MCP描述:
automates browser interactions命令:
npx -y @angiejones/mcp-selenium
与其他 MCP 客户端一起使用(例如 Claude Desktop 等)
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": ["-y", "@angiejones/mcp-selenium"]
}
}
}发展
从事此项目:
克隆存储库
安装依赖项:
npm install运行服务器:
npm start
安装
通过 Smithery 安装
要通过Smithery自动为 Claude Desktop 安装 MCP Selenium:
npx -y @smithery/cli install @angiejones/mcp-selenium --client claude手动安装
npm install -g @angiejones/mcp-selenium用法
通过运行以下命令启动服务器:
mcp-selenium或者在您的 MCP 配置中与 NPX 一起使用:
{
"mcpServers": {
"selenium": {
"command": "npx",
"args": [
"-y",
"@angiejones/mcp-selenium"
]
}
}
}工具
启动浏览器
启动浏览器会话。
参数:
browser(必需):要启动的浏览器类型:字符串
枚举:[“chrome”,“firefox”]
options:浏览器配置选项类型:对象
特性:
headless:以无头模式运行浏览器类型:布尔值
arguments:附加浏览器参数类型:字符串数组
例子:
{
"tool": "start_browser",
"parameters": {
"browser": "chrome",
"options": {
"headless": true,
"arguments": ["--no-sandbox"]
}
}
}导航
导航至某个 URL。
参数:
url(必填):导航到的 URL类型:字符串
例子:
{
"tool": "navigate",
"parameters": {
"url": "https://www.example.com"
}
}查找元素
在页面上查找元素。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "find_element",
"parameters": {
"by": "id",
"value": "search-input",
"timeout": 5000
}
}click_element
单击一个元素。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "click_element",
"parameters": {
"by": "css",
"value": ".submit-button"
}
}发送密钥
将键发送到元素(键入)。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
text(必需):输入到元素中的文本类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "send_keys",
"parameters": {
"by": "name",
"value": "username",
"text": "testuser"
}
}获取元素文本
获取元素的文本()。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "get_element_text",
"parameters": {
"by": "css",
"value": ".message"
}
}徘徊
移动鼠标悬停在元素上。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "hover",
"parameters": {
"by": "css",
"value": ".dropdown-menu"
}
}拖放
将一个元素拖放到另一个元素上。
参数:
by(必需):源元素的定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):源定位器策略的值类型:字符串
targetBy(必需):目标元素的定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
targetValue(必需):目标定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "drag_and_drop",
"parameters": {
"by": "id",
"value": "draggable",
"targetBy": "id",
"targetValue": "droppable"
}
}双击
对元素执行双击。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "double_click",
"parameters": {
"by": "css",
"value": ".editable-text"
}
}右键单击
对元素执行右键单击(上下文单击)。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "right_click",
"parameters": {
"by": "css",
"value": ".context-menu-trigger"
}
}按键
模拟按下键盘键。
参数:
key(必需):要按下的键(例如,“Enter”,“Tab”,“a”等)类型:字符串
例子:
{
"tool": "press_key",
"parameters": {
"key": "Enter"
}
}upload_file
使用文件输入元素上传文件。
参数:
by(必需):定位器策略类型:字符串
枚举:[“id”,“css”,“xpath”,“name”,“tag”,“class”]
value(必需):定位器策略的值类型:字符串
filePath(必需):要上传的文件的绝对路径类型:字符串
timeout:等待元素的最长时间(以毫秒为单位)类型:数字
默认值:10000
例子:
{
"tool": "upload_file",
"parameters": {
"by": "id",
"value": "file-input",
"filePath": "/path/to/file.pdf"
}
}截屏
捕获当前页面的屏幕截图。
参数:
outputPath(可选):屏幕截图的保存路径。若未提供,则返回 base64 数据。类型:字符串
例子:
{
"tool": "take_screenshot",
"parameters": {
"outputPath": "/path/to/screenshot.png"
}
}关闭会话
关闭当前浏览器会话并清理资源。
**参数:**无必填
例子:
{
"tool": "close_session",
"parameters": {}
}执照
麻省理工学院
This server cannot be deployed
Maintenance
Related MCP Connectors
Browserless MCP — wraps the Browserless headless-Chromium REST API (browserless.io)
Stealth web browser for agents: search, fetch, click, download and type in persistent MCP sessions.
Hosted real Google Chrome MCP with per-user persistent state. Navigate, click, type, screenshot.
Access Kernel's cloud-based browsers and app actions via MCP (remote HTTP + OAuth).
Related MCP Servers
- FlicenseCqualityDmaintenanceEnables browser automation, including navigation, form filling, login with CAPTCHA handling, and element manipulation, using a Chrome-based MCP server.364-
- FlicenseNot gradedqualityDmaintenanceEnables MCP clients to control a real local browser window for web automation tasks such as clicking, typing, scrolling, and taking screenshots.7 npm-
- FlicenseAqualityDmaintenanceProvides browser automation using Selenium WebDriver, enabling web navigation, element interaction, screenshots, and JavaScript execution via MCP.10-
- AlicenseAqualityCmaintenanceEnables AI agents and MCP clients to automate web browsers via Selenium WebDriver, supporting Chrome, Firefox, and Edge in headless or visible mode with tools for navigation, interaction, content extraction, screenshots, and scripting.2131 npmMIT