@mearl/mcp-server 2.4.0 → 2.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  - 🎭 **browser_set_mock**: 动态设置 Mock 数据
11
11
  - 🌐 **browser_list**: 统一列出普通浏览器和托管浏览器,返回默认目标、类型及连接状态
12
12
  - 📴 **browser_release**: 按用户明确要求释放 debugger/CDP 控制和会话级临时效果,并保留浏览器与全部标签页
13
- - 🚀 **browser_launch / browser_close**: 启动或关闭独立 Profile 的托管 Chrome
13
+ - 🚀 **browser_launch / browser_close**: 启动或关闭本地 Chrome / AgentBay CDP 托管浏览器,支持按域复制及跨会话持久化登录态
14
14
  - 🌐 **browser_page_snapshot**: 首次获取页面结构和可交互元素
15
15
  - ⚡ **browser_page_click/type/hover/scroll/press/upload**: 执行页面动作,默认内置观察,返回通知、可交互控件、焦点、导航或直接打开的新标签页
16
16
 
package/dist/index.js CHANGED
@@ -1018,7 +1018,7 @@ async function main() {
1018
1018
  },
1019
1019
  {
1020
1020
  name: 'browser_launch',
1021
- description: '启动一个拥有独立 Profile 的托管 Chrome 浏览器。默认 headless,可复用当前控制浏览器的 TDBank 登录态,通过 SSO 为新浏览器登录指定测试账号,供 taobao.com 及其子域页面使用;多个实例之间 Cookie 和存储完全隔离。',
1021
+ description: '启动一个托管浏览器。默认使用本地独立 Chrome;provider=agentbay 时创建 AgentBay 云浏览器并通过远程 CDP 接入。',
1022
1022
  inputSchema: {
1023
1023
  type: 'object',
1024
1024
  properties: {
@@ -1026,20 +1026,29 @@ async function main() {
1026
1026
  type: 'string',
1027
1027
  description: '实例名称,后续可用 browser_select_browser 按名称或返回的 browserId 选择',
1028
1028
  },
1029
+ provider: {
1030
+ type: 'string',
1031
+ enum: ['local', 'agentbay'],
1032
+ description: '浏览器提供方,默认 local;agentbay 需要配置 AGENTBAY_KEY',
1033
+ default: 'local',
1034
+ },
1035
+ imageId: {
1036
+ type: 'string',
1037
+ description: 'AgentBay 镜像别名或具体镜像 ID;仅 provider=agentbay 有效,默认使用已验证的 Linux Browser Use 内网镜像',
1038
+ },
1029
1039
  headless: {
1030
1040
  type: 'boolean',
1031
- description: '是否使用 headless=new,默认 true',
1032
- default: true,
1041
+ description: '本地 provider 是否使用 headless=new,默认 true;AgentBay 固定为 false,传 true 会被拒绝',
1033
1042
  },
1034
1043
  userAgentMode: {
1035
1044
  type: 'string',
1036
1045
  enum: ['default', 'desktop'],
1037
- description: 'UA 模式:default 使用 Chrome 默认 UA,desktop 使用匹配本机 Chrome 版本和宿主平台的桌面 UA',
1046
+ description: 'UA 模式:default 使用 provider 默认 UA;desktop 本地使用匹配本机 Chrome 的 UA,AgentBay 复用当前控制浏览器的桌面 UA',
1038
1047
  default: 'default',
1039
1048
  },
1040
1049
  persistent: {
1041
1050
  type: 'boolean',
1042
- description: '关闭后是否保留独立 Profile,默认 false;false 时自动清理',
1051
+ description: '关闭后是否保留浏览器状态,默认 false;本地保留独立 Profile,AgentBay 通过同名云端 Context 保存 Cookie、LocalStorage、IndexedDB 等状态',
1043
1052
  default: false,
1044
1053
  },
1045
1054
  url: {
@@ -1073,7 +1082,7 @@ async function main() {
1073
1082
  copyCookieDomains: {
1074
1083
  type: 'array',
1075
1084
  items: { type: 'string' },
1076
- description: '从控制浏览器复制到新实例的 Cookie 域名列表。保留 HttpOnly/Secure/SameSite/过期时间等属性;非内置域需先授权。可与 TDBank 登录组合,复制先执行、TDBank SSO 后执行。',
1085
+ description: '从控制浏览器复制到本地或 AgentBay 新实例的 Cookie 域名列表。保留 HttpOnly/Secure/SameSite/过期时间等属性;非内置域需先授权。Cookie 在打开初始 URL 前写入;本地 provider 可继续执行 TDBank SSO。',
1077
1086
  },
1078
1087
  },
1079
1088
  required: ['name'],
@@ -1081,7 +1090,7 @@ async function main() {
1081
1090
  },
1082
1091
  {
1083
1092
  name: 'browser_close',
1084
- description: '关闭一个托管浏览器;临时 Profile 自动删除,持久化 Profile 可显式删除。',
1093
+ description: '关闭一个本地或 AgentBay 托管浏览器;持久化实例默认保留本地 Profile 或 AgentBay Context,deleteProfile=true 时一并删除。名称有歧义时使用完整 browserId。',
1085
1094
  inputSchema: {
1086
1095
  type: 'object',
1087
1096
  properties: {
@@ -1091,7 +1100,7 @@ async function main() {
1091
1100
  },
1092
1101
  deleteProfile: {
1093
1102
  type: 'boolean',
1094
- description: '是否强制删除持久化 Profile,默认 false',
1103
+ description: '是否强制删除持久化本地 Profile 或 AgentBay Context,默认 false',
1095
1104
  default: false,
1096
1105
  },
1097
1106
  },
@@ -1682,7 +1691,7 @@ async function main() {
1682
1691
  },
1683
1692
  {
1684
1693
  name: 'browser_list',
1685
- description: '列出所有浏览器。返回普通浏览器和托管浏览器的 browserId、名称、类型、连接状态及当前默认目标;托管浏览器还包含运行模式、持久化设置和登录账号。只有 status=connected 的浏览器可用于后续操作。',
1694
+ description: '列出所有浏览器。返回普通浏览器和托管浏览器的 browserId、名称、类型、连接状态及当前默认目标;AgentBay 额外包含镜像和持久化 Context 信息,并在服务返回浏览器访问地址时包含 agentbayAccessUrl。只有 status=connected 的浏览器可用于后续操作。',
1686
1695
  inputSchema: {
1687
1696
  type: 'object',
1688
1697
  properties: {},
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mearl/mcp-server",
3
- "version": "2.4.0",
3
+ "version": "2.5.1",
4
4
  "description": "MCP Server for Mearl - enables AI to interact with Chrome browser requests and logs",
5
5
  "mcpName": "io.github.F-loat/mearl",
6
6
  "type": "module",
@@ -30,8 +30,8 @@
30
30
  "dependencies": {
31
31
  "@modelcontextprotocol/sdk": "^1.0.4",
32
32
  "prompts": "^2.4.2",
33
- "@mearl/client": "2.4.0",
34
- "@mearl/native-host": "2.4.0"
33
+ "@mearl/client": "2.5.1",
34
+ "@mearl/native-host": "2.5.1"
35
35
  },
36
36
  "devDependencies": {
37
37
  "@types/node": "^24.9.1",