@@ -64,37 +64,34 @@ async function getContext(): Promise<McpContext> {
6464 const ignoreDefaultChromeArgs : string [ ] = (
6565 args . ignoreDefaultChromeArg ?? [ ]
6666 ) . map ( String ) ;
67- if ( args . categoryExtension ) {
68- chromeArgs . push ( '--enable-unsafe-extension-debugging' ) ;
69- }
7067 if ( args . proxyServer ) {
7168 chromeArgs . push ( `--proxy-server=${ args . proxyServer } ` ) ;
7269 }
7370 const devtools = args . experimentalDevtools ?? false ;
7471 const browser =
7572 args . browserUrl || args . wsEndpoint || args . autoConnect
7673 ? await ensureBrowserConnected ( {
77- browserURL : args . browserUrl ,
78- wsEndpoint : args . wsEndpoint ,
79- wsHeaders : args . wsHeaders ,
80- // Important: only pass channel, if autoConnect is true.
81- channel : args . autoConnect ? ( args . channel as Channel ) : undefined ,
82- userDataDir : args . userDataDir ,
83- devtools,
84- } )
74+ browserURL : args . browserUrl ,
75+ wsEndpoint : args . wsEndpoint ,
76+ wsHeaders : args . wsHeaders ,
77+ // Important: only pass channel, if autoConnect is true.
78+ channel : args . autoConnect ? ( args . channel as Channel ) : undefined ,
79+ userDataDir : args . userDataDir ,
80+ devtools,
81+ } )
8582 : await ensureBrowserLaunched ( {
86- headless : args . headless ,
87- executablePath : args . executablePath ,
88- channel : args . channel as Channel ,
89- isolated : args . isolated ?? false ,
90- userDataDir : args . userDataDir ,
91- logFile,
92- viewport : args . viewport ,
93- chromeArgs,
94- ignoreDefaultChromeArgs,
95- acceptInsecureCerts : args . acceptInsecureCerts ,
96- devtools,
97- } ) ;
83+ headless : args . headless ,
84+ executablePath : args . executablePath ,
85+ channel : args . channel as Channel ,
86+ isolated : args . isolated ?? false ,
87+ userDataDir : args . userDataDir ,
88+ logFile,
89+ viewport : args . viewport ,
90+ chromeArgs,
91+ ignoreDefaultChromeArgs,
92+ acceptInsecureCerts : args . acceptInsecureCerts ,
93+ devtools,
94+ } ) ;
9895
9996 if ( context ?. browser !== browser ) {
10097 context = await McpContext . from ( browser , logger , {
@@ -143,8 +140,8 @@ function registerTool(tool: ToolDefinition): void {
143140 return ;
144141 }
145142 if (
146- tool . annotations . category === ToolCategory . EXTENSION &&
147- args . categoryExtension === false
143+ tool . annotations . category === ToolCategory . EXTENSIONS &&
144+ args . categoryExtensions === false
148145 ) {
149146 return ;
150147 }
0 commit comments