You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
'Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.',
15
+
alias: 'u',
16
+
coerce: (url: string)=>{
17
+
newURL(url);
18
+
returnurl;
19
+
},
20
+
},
21
+
headless: {
22
+
type: 'boolean'asconst,
23
+
description: 'Whether to run in headless (no UI) mode.',
24
+
default: false,
25
+
},
26
+
executablePath: {
27
+
type: 'string'asconst,
28
+
description: 'Path to custom Chrome executable.',
29
+
conflicts: 'browserUrl',
30
+
alias: 'e',
31
+
},
32
+
isolated: {
33
+
type: 'boolean'asconst,
34
+
description:
35
+
'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.',
36
+
default: false,
37
+
},
38
+
customDevtools: {
39
+
type: 'string'asconst,
40
+
description: 'Path to custom DevTools.',
41
+
hidden: true,
42
+
conflicts: 'browserUrl',
43
+
alias: 'd',
44
+
},
45
+
channel: {
46
+
type: 'string'asconst,
47
+
description:
48
+
'Specify a different Chrome channel that should be used. The default is the stable channel version.',
Copy file name to clipboardExpand all lines: src/main.ts
+2-80Lines changed: 2 additions & 80 deletions
Original file line number
Diff line number
Diff line change
@@ -10,8 +10,6 @@ import {
10
10
CallToolResult,
11
11
SetLevelRequestSchema,
12
12
}from'@modelcontextprotocol/sdk/types.js';
13
-
importyargsfrom'yargs';
14
-
import{hideBin}from'yargs/helpers';
15
13
16
14
import{McpResponse}from'./McpResponse.js';
17
15
import{McpContext}from'./McpContext.js';
@@ -33,55 +31,7 @@ import path from 'node:path';
33
31
importfsfrom'node:fs';
34
32
importassertfrom'node:assert';
35
33
import{Mutex}from'./Mutex.js';
36
-
37
-
exportconstcliOptions={
38
-
browserUrl: {
39
-
type: 'string'asconst,
40
-
description:
41
-
'Connect to a running Chrome instance using port forwarding. For more details see: https://developer.chrome.com/docs/devtools/remote-debugging/local-server.',
42
-
alias: 'u',
43
-
coerce: (url: string)=>{
44
-
newURL(url);
45
-
returnurl;
46
-
},
47
-
},
48
-
headless: {
49
-
type: 'boolean'asconst,
50
-
description: 'Whether to run in headless (no UI) mode.',
51
-
default: false,
52
-
},
53
-
executablePath: {
54
-
type: 'string'asconst,
55
-
description: 'Path to custom Chrome executable.',
56
-
conflicts: 'browserUrl',
57
-
alias: 'e',
58
-
},
59
-
isolated: {
60
-
type: 'boolean'asconst,
61
-
description:
62
-
'If specified, creates a temporary user-data-dir that is automatically cleaned up after the browser is closed.',
63
-
default: false,
64
-
},
65
-
customDevtools: {
66
-
type: 'string'asconst,
67
-
description: 'Path to custom DevTools.',
68
-
hidden: true,
69
-
conflicts: 'browserUrl',
70
-
alias: 'd',
71
-
},
72
-
channel: {
73
-
type: 'string'asconst,
74
-
description:
75
-
'Specify a different Chrome channel that should be used. The default is the stable channel version.',
76
-
choices: ['stable','canary','beta','dev']asconst,
77
-
conflicts: ['browserUrl','executablePath'],
78
-
},
79
-
logFile: {
80
-
type: 'string'asconst,
81
-
describe: 'Save the logs to file.',
82
-
hidden: true,
83
-
},
84
-
};
34
+
import{parseArguments}from'./cli.js';
85
35
86
36
functionreadPackageJson(): {version?: string}{
87
37
constcurrentDir=import.meta.dirname;
@@ -100,35 +50,7 @@ function readPackageJson(): {version?: string} {
0 commit comments