Skip to content

Commit b21ca1b

Browse files
committed
feat: support arbitrary args
1 parent ffa844a commit b21ca1b

File tree

3 files changed

+1
-3
lines changed

3 files changed

+1
-3
lines changed

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,6 @@ The Chrome DevTools MCP server supports the following configuration option:
294294
- **`--chromeArg`**
295295
Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.
296296
- **Type:** array
297-
- **Default:** ``
298297

299298
<!-- END AUTO GENERATED OPTIONS -->
300299

src/cli.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ export const cliOptions = {
9090
type: 'array',
9191
describe:
9292
'Additional arguments for Chrome. Only applies when Chrome is launched by chrome-devtools-mcp.',
93-
default: [],
9493
},
9594
} satisfies Record<string, YargsOptions>;
9695

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ server.server.setRequestHandler(SetLevelRequestSchema, () => {
6969

7070
let context: McpContext;
7171
async function getContext(): Promise<McpContext> {
72-
const extraArgs: string[] = [];
72+
const extraArgs: string[] = (args.chromeArg ?? []).map(String);
7373
if (args.proxyServer) {
7474
extraArgs.push(`--proxy-server=${args.proxyServer}`);
7575
}

0 commit comments

Comments
 (0)