@mearl/mcp-server 2.2.2 → 2.4.0
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/dist/index.js +104 -29
- package/package.json +3 -3
package/dist/index.js
CHANGED
|
@@ -27,6 +27,7 @@ import { RESPONSE_SIZE_SMALL, RESPONSE_SIZE_MEDIUM, RESPONSE_SIZE_LARGE, RESPONS
|
|
|
27
27
|
const require = createRequire(import.meta.url);
|
|
28
28
|
const MCP_SERVER_VERSION = require('../package.json').version;
|
|
29
29
|
const MCP_TOOL_ACTIONS = {
|
|
30
|
+
browser_capture_checkpoint: 'capture_checkpoint',
|
|
30
31
|
browser_get_requests: 'get_requests',
|
|
31
32
|
browser_get_events: 'get_events',
|
|
32
33
|
browser_get_logs: 'get_logs',
|
|
@@ -363,12 +364,12 @@ async function main() {
|
|
|
363
364
|
capabilities: {
|
|
364
365
|
tools: {},
|
|
365
366
|
},
|
|
366
|
-
instructions: '浏览器交互默认工作流:首次进入页面时使用 browser_page_snapshot 建立页面基线;后续点击、输入、悬停、滚动、按键和上传直接使用 browser_page_click/type/hover/scroll/press/upload
|
|
367
|
+
instructions: '浏览器交互默认工作流:首次进入页面时使用 browser_page_snapshot 建立页面基线;后续点击、输入、悬停、滚动、按键和上传直接使用 browser_page_click/type/hover/scroll/press/upload,它们默认内置观察与原子诊断,动作、异步稳定判断、新增 error logs 和业务 requests 在一次调用内完成,返回 { action, observation, diagnostics };传 observe:false 只关闭 DOM/导航观察并保留诊断,同时传 diagnostics:false 才执行裸动作。观察结果不替代完整页面理解:observation.mode 为 delta 时确认 scope="main-document",再读取 effects.notifications、effects.interactives 和 effects.focus;interactives/focus 节点有 ref 时优先直接用于后续动作,没有 ref 时使用 selector;notifications 中 change=transient 表示已经消失的 Toast、状态或错误提示。为 navigation 时先检查 ready,ready=true 表示文档、相关业务请求和可见骨架状态已经稳定,可在新页面重建 snapshot。observation.openedTabs 表示动作直接打开的关联标签页,可显式使用返回的 tabId 继续操作,无需调用 browser_tab_list。其他情况下通常仅当 fullSnapshotRecommended 为 true 时根据 snapshotReasons 回退,并选择最小范围:已有区域 ref 用 rootRef,已有 CSS 根节点用 rootSelector,只需查找特定目标时加 query,长列表用 mode="viewport",只需当前视口内的控件用 mode="interactive";滚动动作的 moved 只证明位置变化,下一步需要读取新视口内容时可按需获取 viewport 快照。视口内缺少 AX 控件语义时 interactive 会在同一次调用中回退到 viewport,并返回 fallbackMode。重复文本点击用 scope 限定区域,ref 指向滚动容器子节点时用 containerPolicy="nearest"。page_eval 默认裸执行且应作为结构化能力无法表达时的补充;需要页面变化信号时传 observe 对象,需要原子诊断时传 diagnostics:true 或对象。视觉任务再使用 screenshot。不要在每次动作后固定调用 browser_page_wait、snapshot 或 screenshot。',
|
|
367
368
|
});
|
|
368
369
|
// 页面交互工具共享的 observe 参数 schema:默认开启内置观察,传 false 关闭
|
|
369
370
|
const OBSERVE_INPUT_SCHEMA = {
|
|
370
371
|
type: ['object', 'boolean'],
|
|
371
|
-
description: '观察选项。默认开启内置观察(等待相关 DOM、XHR/Fetch/MTop 请求或导航稳定后返回页面变化信号);传 false
|
|
372
|
+
description: '观察选项。默认开启内置观察(等待相关 DOM、XHR/Fetch/MTop 请求或导航稳定后返回页面变化信号);传 false 只关闭 DOM/导航观察,默认诊断增量仍会返回',
|
|
372
373
|
properties: {
|
|
373
374
|
quietMs: {
|
|
374
375
|
type: 'number',
|
|
@@ -400,11 +401,48 @@ async function main() {
|
|
|
400
401
|
},
|
|
401
402
|
},
|
|
402
403
|
};
|
|
404
|
+
const DIAGNOSTICS_INPUT_SCHEMA = {
|
|
405
|
+
type: ['object', 'boolean'],
|
|
406
|
+
description: '页面交互默认在动作真正执行前建立原子边界,并在稳定后返回新增 error logs 和全部业务 requests。传 false 关闭;传 true 使用默认配置;传对象自定义通道与过滤。page_eval 默认关闭',
|
|
407
|
+
properties: {
|
|
408
|
+
logs: {
|
|
409
|
+
type: ['object', 'boolean'],
|
|
410
|
+
properties: {
|
|
411
|
+
level: { type: 'string', enum: ['log', 'warn', 'error', 'info', 'all'] },
|
|
412
|
+
limit: { type: 'number', default: 100 },
|
|
413
|
+
filter: { type: 'string' },
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
requests: {
|
|
417
|
+
type: ['object', 'boolean'],
|
|
418
|
+
properties: {
|
|
419
|
+
source: { type: 'string', enum: ['mtop', 'requests', 'all'] },
|
|
420
|
+
count: { type: 'number', default: 100 },
|
|
421
|
+
filter: { type: 'string' },
|
|
422
|
+
includeBody: { type: 'boolean', default: false },
|
|
423
|
+
includeHeaders: { type: 'boolean', default: false },
|
|
424
|
+
},
|
|
425
|
+
},
|
|
426
|
+
},
|
|
427
|
+
};
|
|
403
428
|
// 定义工具列表
|
|
404
429
|
const tools = defineMcpTools([
|
|
430
|
+
{
|
|
431
|
+
name: 'browser_capture_checkpoint',
|
|
432
|
+
description: '为目标标签页当前已采集的 console/network 建立可靠增量边界。返回的 cursor 可传给 browser_get_logs/browser_get_requests 的 after。',
|
|
433
|
+
inputSchema: {
|
|
434
|
+
type: 'object',
|
|
435
|
+
properties: {
|
|
436
|
+
tabId: {
|
|
437
|
+
type: 'number',
|
|
438
|
+
description: '目标标签页 ID;不传时使用当前活动标签页',
|
|
439
|
+
},
|
|
440
|
+
},
|
|
441
|
+
},
|
|
442
|
+
},
|
|
405
443
|
{
|
|
406
444
|
name: 'browser_get_requests',
|
|
407
|
-
description: '
|
|
445
|
+
description: '获取指定标签页持续采集的 API 请求历史,包含请求、响应与 pending 状态。无需打开 DevTools panel;不传 after 时返回最新 N 条,传 after 时从最早未读项开始分页。',
|
|
408
446
|
inputSchema: {
|
|
409
447
|
type: 'object',
|
|
410
448
|
properties: {
|
|
@@ -425,6 +463,10 @@ async function main() {
|
|
|
425
463
|
type: 'number',
|
|
426
464
|
description: '从多久之前开始获取(秒)。例如: 60 表示获取最近 1 分钟内的请求',
|
|
427
465
|
},
|
|
466
|
+
after: {
|
|
467
|
+
type: 'string',
|
|
468
|
+
description: 'capture checkpoint 或上一次查询返回的 cursor,仅返回其后的请求',
|
|
469
|
+
},
|
|
428
470
|
includeBody: {
|
|
429
471
|
type: 'boolean',
|
|
430
472
|
description: '是否包含请求体和响应体。false 时将省略 postData 和 responseBody 字段以减少数据量。默认 true',
|
|
@@ -454,8 +496,8 @@ async function main() {
|
|
|
454
496
|
},
|
|
455
497
|
source: {
|
|
456
498
|
type: 'string',
|
|
457
|
-
enum: ['mtop', 'requests'],
|
|
458
|
-
description: '数据源。mtop: mtop 接口(默认); requests: 普通 XHR/Fetch
|
|
499
|
+
enum: ['mtop', 'requests', 'all'],
|
|
500
|
+
description: '数据源。mtop: mtop 接口(默认); requests: 普通 XHR/Fetch 请求; all: 全部业务请求',
|
|
459
501
|
},
|
|
460
502
|
},
|
|
461
503
|
},
|
|
@@ -503,7 +545,7 @@ async function main() {
|
|
|
503
545
|
},
|
|
504
546
|
{
|
|
505
547
|
name: 'browser_get_logs',
|
|
506
|
-
description: '
|
|
548
|
+
description: '获取指定标签页持续采集的 console API、未捕获异常和浏览器日志。无需打开 DevTools panel;不传 after 时返回最新 N 条,传 after 时从最早未读项开始分页。',
|
|
507
549
|
inputSchema: {
|
|
508
550
|
type: 'object',
|
|
509
551
|
properties: {
|
|
@@ -521,9 +563,13 @@ async function main() {
|
|
|
521
563
|
type: 'number',
|
|
522
564
|
description: '从多久之前开始获取日志(秒)。例如: 60 表示获取最近 1 分钟内的日志',
|
|
523
565
|
},
|
|
566
|
+
after: {
|
|
567
|
+
type: 'string',
|
|
568
|
+
description: 'capture checkpoint 或上一次查询返回的 cursor,仅返回其后的日志',
|
|
569
|
+
},
|
|
524
570
|
limit: {
|
|
525
571
|
type: 'number',
|
|
526
|
-
description: '最大返回日志数量,默认 100
|
|
572
|
+
description: '最大返回日志数量,默认 100;快照查询返回最新 N 条',
|
|
527
573
|
default: 100,
|
|
528
574
|
},
|
|
529
575
|
filter: {
|
|
@@ -1181,7 +1227,7 @@ async function main() {
|
|
|
1181
1227
|
},
|
|
1182
1228
|
{
|
|
1183
1229
|
name: 'browser_page_click',
|
|
1184
|
-
description: '
|
|
1230
|
+
description: '点击页面元素,默认内置观察与原子诊断:同一次调用内等待相关 DOM、XHR/Fetch/MTop 请求或导航稳定,返回 { action, observation, diagnostics };diagnostics 默认包含新增 error logs 和全部业务 requests。点击直接打开新标签页时 observation.openedTabs 返回可继续操作的 tabId、URL、标题和加载状态。传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸点击。定位方式三选一:selector(CSS 或 @eN snapshot ref)、text(按可见文本匹配 accessibility name,可用 scope 限定子树)、point(视口坐标)。clickMode 默认 auto:可见页按设备模拟状态使用可信 mouse/touch,隐藏页不切换标签或还原窗口并自动使用 DOM fallback;checkbox/radio 使用带状态校验的 DOM 路径。可用 dom/mouse/touch 强制派发方式。响应返回实际 dispatchMode,可信输入还返回 pointerType。',
|
|
1185
1231
|
inputSchema: {
|
|
1186
1232
|
type: 'object',
|
|
1187
1233
|
properties: {
|
|
@@ -1226,13 +1272,14 @@ async function main() {
|
|
|
1226
1272
|
default: 'auto',
|
|
1227
1273
|
},
|
|
1228
1274
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1275
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1229
1276
|
},
|
|
1230
1277
|
required: ['tabId'],
|
|
1231
1278
|
},
|
|
1232
1279
|
},
|
|
1233
1280
|
{
|
|
1234
1281
|
name: 'browser_page_type',
|
|
1235
|
-
description: '
|
|
1282
|
+
description: '向输入框填写文本,默认内置观察与原子诊断(校验提示、error logs、业务 requests 等),返回 { action, observation, diagnostics };传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸输入。兼容 React 等框架的受控组件,会自动触发 input 和 change 事件。selector 支持原生 CSS 或 "@eN" snapshot ref。',
|
|
1236
1283
|
inputSchema: {
|
|
1237
1284
|
type: 'object',
|
|
1238
1285
|
properties: {
|
|
@@ -1254,13 +1301,14 @@ async function main() {
|
|
|
1254
1301
|
default: true,
|
|
1255
1302
|
},
|
|
1256
1303
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1304
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1257
1305
|
},
|
|
1258
1306
|
required: ['tabId', 'selector', 'text'],
|
|
1259
1307
|
},
|
|
1260
1308
|
},
|
|
1261
1309
|
{
|
|
1262
1310
|
name: 'browser_page_scroll',
|
|
1263
|
-
description: '
|
|
1311
|
+
description: '滚动页面或指定滚动容器,默认内置观察与原子诊断(懒加载内容、error logs、业务 requests 等),返回 { action, observation, diagnostics };传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸滚动。支持 up、down、top、bottom 四个方向;containerPolicy="nearest" 可从目标子节点解析最近可滚动祖先。动作结果包含前后位置、是否移动和边界状态。',
|
|
1264
1312
|
inputSchema: {
|
|
1265
1313
|
type: 'object',
|
|
1266
1314
|
properties: {
|
|
@@ -1288,13 +1336,14 @@ async function main() {
|
|
|
1288
1336
|
description: '默认 self,要求 selector 本身可滚动;nearest 会在其不可滚动时使用最近的可滚动祖先',
|
|
1289
1337
|
},
|
|
1290
1338
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1339
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1291
1340
|
},
|
|
1292
1341
|
required: ['tabId', 'direction'],
|
|
1293
1342
|
},
|
|
1294
1343
|
},
|
|
1295
1344
|
{
|
|
1296
1345
|
name: 'browser_page_hover',
|
|
1297
|
-
description: '
|
|
1346
|
+
description: '将鼠标悬停在元素上,默认内置观察与原子诊断(下拉菜单、提示、error logs、业务 requests 等),返回 { action, observation, diagnostics };传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸悬停。使用 CDP Input.dispatchMouseEvent 发送真实鼠标移动事件,selector 支持原生 CSS 或 "@eN" snapshot ref。',
|
|
1298
1347
|
inputSchema: {
|
|
1299
1348
|
type: 'object',
|
|
1300
1349
|
properties: {
|
|
@@ -1307,13 +1356,14 @@ async function main() {
|
|
|
1307
1356
|
description: '原生 CSS 选择器,或 page_snapshot / 页面动作 observation 返回的 ref(如 "@e1",必须带 "@" 前缀)。字段名是 "selector"。不支持 :has-text/:visible 等 Playwright 扩展。',
|
|
1308
1357
|
},
|
|
1309
1358
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1359
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1310
1360
|
},
|
|
1311
1361
|
required: ['tabId', 'selector'],
|
|
1312
1362
|
},
|
|
1313
1363
|
},
|
|
1314
1364
|
{
|
|
1315
1365
|
name: 'browser_page_eval',
|
|
1316
|
-
description: '在页面上下文中执行 JavaScript
|
|
1366
|
+
description: '在页面上下文中执行 JavaScript 表达式并返回结果,作为结构化页面能力无法表达时的补充。默认裸执行;需要页面变化信号时显式传 observe 对象,需要原子返回新增 error logs/业务 requests 时传 diagnostics:true 或过滤对象。',
|
|
1317
1367
|
inputSchema: {
|
|
1318
1368
|
type: 'object',
|
|
1319
1369
|
properties: {
|
|
@@ -1339,6 +1389,7 @@ async function main() {
|
|
|
1339
1389
|
type: 'object',
|
|
1340
1390
|
description: '仅在表达式会修改页面且需要观察结果时显式传入;不传时轻量执行并直接返回结果',
|
|
1341
1391
|
},
|
|
1392
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1342
1393
|
},
|
|
1343
1394
|
required: ['tabId', 'expression'],
|
|
1344
1395
|
},
|
|
@@ -1409,7 +1460,7 @@ async function main() {
|
|
|
1409
1460
|
},
|
|
1410
1461
|
{
|
|
1411
1462
|
name: 'browser_page_press',
|
|
1412
|
-
description: '
|
|
1463
|
+
description: '在页面中按下键盘按键,默认内置观察与原子诊断(提交、关闭弹窗、error logs、业务 requests 等),返回 { action, observation, diagnostics };传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸按键。支持单个按键和组合键。',
|
|
1413
1464
|
inputSchema: {
|
|
1414
1465
|
type: 'object',
|
|
1415
1466
|
properties: {
|
|
@@ -1427,6 +1478,7 @@ async function main() {
|
|
|
1427
1478
|
description: '修饰键数组,如 ["Alt", "Shift", "Control", "Meta"]',
|
|
1428
1479
|
},
|
|
1429
1480
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1481
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1430
1482
|
},
|
|
1431
1483
|
required: ['tabId', 'key'],
|
|
1432
1484
|
},
|
|
@@ -1497,7 +1549,7 @@ async function main() {
|
|
|
1497
1549
|
},
|
|
1498
1550
|
{
|
|
1499
1551
|
name: 'browser_page_upload',
|
|
1500
|
-
description: '向 <input type="file"> 上传单个或多个文件(通过 CDP DOM.setFileInputFiles
|
|
1552
|
+
description: '向 <input type="file"> 上传单个或多个文件(通过 CDP DOM.setFileInputFiles),默认内置观察与原子诊断(上传状态、error logs、业务 requests 等),返回 { action, observation, diagnostics };传 observe:false 只关闭观察并保留诊断,同时传 diagnostics:false 才执行裸上传。selector 支持原生 CSS 或 "@eN" snapshot ref。',
|
|
1501
1553
|
inputSchema: {
|
|
1502
1554
|
type: 'object',
|
|
1503
1555
|
properties: {
|
|
@@ -1515,6 +1567,7 @@ async function main() {
|
|
|
1515
1567
|
description: '要上传的本地文件路径数组,如 ["/Users/me/photo.jpg"]',
|
|
1516
1568
|
},
|
|
1517
1569
|
observe: OBSERVE_INPUT_SCHEMA,
|
|
1570
|
+
diagnostics: DIAGNOSTICS_INPUT_SCHEMA,
|
|
1518
1571
|
},
|
|
1519
1572
|
required: ['tabId', 'selector', 'filePaths'],
|
|
1520
1573
|
},
|
|
@@ -1663,13 +1716,19 @@ async function main() {
|
|
|
1663
1716
|
const toolName = name;
|
|
1664
1717
|
let result;
|
|
1665
1718
|
switch (toolName) {
|
|
1719
|
+
case 'browser_capture_checkpoint': {
|
|
1720
|
+
const { tabId } = args;
|
|
1721
|
+
result = await client.captureCheckpoint({ tabId });
|
|
1722
|
+
break;
|
|
1723
|
+
}
|
|
1666
1724
|
case 'browser_get_requests': {
|
|
1667
|
-
const { tabId, count = 10, filter, since, includeBody = true, includeHeaders = false, maxBodySize = 50000, fields, keysOnly = false, source, } = args;
|
|
1725
|
+
const { tabId, count = 10, filter, since, after, includeBody = true, includeHeaders = false, maxBodySize = 50000, fields, keysOnly = false, source, } = args;
|
|
1668
1726
|
result = await client.getRequests({
|
|
1669
1727
|
tabId,
|
|
1670
1728
|
count,
|
|
1671
1729
|
filter,
|
|
1672
1730
|
since,
|
|
1731
|
+
after,
|
|
1673
1732
|
includeBody,
|
|
1674
1733
|
includeHeaders,
|
|
1675
1734
|
maxBodySize,
|
|
@@ -1693,8 +1752,8 @@ async function main() {
|
|
|
1693
1752
|
break;
|
|
1694
1753
|
}
|
|
1695
1754
|
case 'browser_get_logs': {
|
|
1696
|
-
const { tabId, level = 'all', since, limit = 100, filter } = args;
|
|
1697
|
-
result = await client.getLogs({ tabId, level, since, limit, filter });
|
|
1755
|
+
const { tabId, level = 'all', since, after, limit = 100, filter } = args;
|
|
1756
|
+
result = await client.getLogs({ tabId, level, since, after, limit, filter });
|
|
1698
1757
|
break;
|
|
1699
1758
|
}
|
|
1700
1759
|
case 'browser_set_mock': {
|
|
@@ -1858,7 +1917,7 @@ async function main() {
|
|
|
1858
1917
|
break;
|
|
1859
1918
|
}
|
|
1860
1919
|
case 'browser_page_click': {
|
|
1861
|
-
const { tabId, selector, text, point, role, exact, scope, clickMode, observe } = args;
|
|
1920
|
+
const { tabId, selector, text, point, role, exact, scope, clickMode, observe, diagnostics, } = args;
|
|
1862
1921
|
result = await client.pageClick({
|
|
1863
1922
|
tabId,
|
|
1864
1923
|
selector,
|
|
@@ -1869,16 +1928,24 @@ async function main() {
|
|
|
1869
1928
|
scope,
|
|
1870
1929
|
clickMode,
|
|
1871
1930
|
observe,
|
|
1931
|
+
diagnostics,
|
|
1872
1932
|
});
|
|
1873
1933
|
break;
|
|
1874
1934
|
}
|
|
1875
1935
|
case 'browser_page_type': {
|
|
1876
|
-
const { tabId, selector, text, clearFirst = true, observe } = args;
|
|
1877
|
-
result = await client.pageType({
|
|
1936
|
+
const { tabId, selector, text, clearFirst = true, observe, diagnostics } = args;
|
|
1937
|
+
result = await client.pageType({
|
|
1938
|
+
tabId,
|
|
1939
|
+
selector,
|
|
1940
|
+
text,
|
|
1941
|
+
clearFirst,
|
|
1942
|
+
observe,
|
|
1943
|
+
diagnostics,
|
|
1944
|
+
});
|
|
1878
1945
|
break;
|
|
1879
1946
|
}
|
|
1880
1947
|
case 'browser_page_scroll': {
|
|
1881
|
-
const { tabId, direction, distance = 600, selector, containerPolicy, observe, } = args;
|
|
1948
|
+
const { tabId, direction, distance = 600, selector, containerPolicy, observe, diagnostics, } = args;
|
|
1882
1949
|
result = await client.pageScroll({
|
|
1883
1950
|
tabId,
|
|
1884
1951
|
direction,
|
|
@@ -1886,17 +1953,25 @@ async function main() {
|
|
|
1886
1953
|
selector,
|
|
1887
1954
|
containerPolicy,
|
|
1888
1955
|
observe,
|
|
1956
|
+
diagnostics,
|
|
1889
1957
|
});
|
|
1890
1958
|
break;
|
|
1891
1959
|
}
|
|
1892
1960
|
case 'browser_page_hover': {
|
|
1893
|
-
const { tabId, selector, observe } = args;
|
|
1894
|
-
result = await client.pageHover({ tabId, selector, observe });
|
|
1961
|
+
const { tabId, selector, observe, diagnostics } = args;
|
|
1962
|
+
result = await client.pageHover({ tabId, selector, observe, diagnostics });
|
|
1895
1963
|
break;
|
|
1896
1964
|
}
|
|
1897
1965
|
case 'browser_page_eval': {
|
|
1898
|
-
const { tabId, expression, frameId, awaitPromise = true, observe } = args;
|
|
1899
|
-
result = await client.pageEval({
|
|
1966
|
+
const { tabId, expression, frameId, awaitPromise = true, observe, diagnostics, } = args;
|
|
1967
|
+
result = await client.pageEval({
|
|
1968
|
+
tabId,
|
|
1969
|
+
expression,
|
|
1970
|
+
frameId,
|
|
1971
|
+
awaitPromise,
|
|
1972
|
+
observe,
|
|
1973
|
+
diagnostics,
|
|
1974
|
+
});
|
|
1900
1975
|
break;
|
|
1901
1976
|
}
|
|
1902
1977
|
case 'browser_page_snapshot': {
|
|
@@ -1915,8 +1990,8 @@ async function main() {
|
|
|
1915
1990
|
break;
|
|
1916
1991
|
}
|
|
1917
1992
|
case 'browser_page_press': {
|
|
1918
|
-
const { tabId, key, modifiers, observe } = args;
|
|
1919
|
-
result = await client.pagePress({ tabId, key, modifiers, observe });
|
|
1993
|
+
const { tabId, key, modifiers, observe, diagnostics } = args;
|
|
1994
|
+
result = await client.pagePress({ tabId, key, modifiers, observe, diagnostics });
|
|
1920
1995
|
break;
|
|
1921
1996
|
}
|
|
1922
1997
|
case 'browser_page_wait': {
|
|
@@ -1937,8 +2012,8 @@ async function main() {
|
|
|
1937
2012
|
break;
|
|
1938
2013
|
}
|
|
1939
2014
|
case 'browser_page_upload': {
|
|
1940
|
-
const { tabId, selector, filePaths, observe } = args;
|
|
1941
|
-
result = await client.pageUpload({ tabId, selector, filePaths, observe });
|
|
2015
|
+
const { tabId, selector, filePaths, observe, diagnostics } = args;
|
|
2016
|
+
result = await client.pageUpload({ tabId, selector, filePaths, observe, diagnostics });
|
|
1942
2017
|
break;
|
|
1943
2018
|
}
|
|
1944
2019
|
case 'browser_page_frames': {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mearl/mcp-server",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
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.
|
|
34
|
-
"@mearl/native-host": "2.
|
|
33
|
+
"@mearl/client": "2.4.0",
|
|
34
|
+
"@mearl/native-host": "2.4.0"
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"@types/node": "^24.9.1",
|