Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,10 @@ The Chrome DevTools MCP server supports the following configuration option:
Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.
- **Type:** string

- **`--acceptInsecureCerts`**
If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.
- **Type:** boolean

<!-- END AUTO GENERATED OPTIONS -->

Pass them via the `args` property in the JSON configuration. For example:
Expand Down
2 changes: 2 additions & 0 deletions src/browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export async function ensureBrowserConnected(browserURL: string) {
}

interface McpLaunchOptions {
acceptInsecureCerts?: boolean;
executablePath?: string;
customDevTools?: string;
channel?: Channel;
Expand Down Expand Up @@ -116,6 +117,7 @@ export async function launch(options: McpLaunchOptions): Promise<Browser> {
pipe: true,
headless,
args,
acceptInsecureCerts: options.acceptInsecureCerts,
});
if (options.logFile) {
// FIXME: we are probably subscribing too late to catch startup logs. We
Expand Down
4 changes: 4 additions & 0 deletions src/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ export const cliOptions = {
type: 'string' as const,
description: `Proxy server configuration for Chrome passed as --proxy-server when launching the browser. See https://www.chromium.org/developers/design-documents/network-settings/ for details.`,
},
acceptInsecureCerts: {
type: 'boolean' as const,
description: `If enabled, ignores errors relative to self-signed and expired certificates. Use with caution.`,
},
};

export function parseArguments(version: string, argv = process.argv) {
Expand Down
1 change: 1 addition & 0 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ async function getContext(): Promise<McpContext> {
logFile,
viewport: args.viewport,
args: extraArgs,
acceptInsecureCerts: args.acceptInsecureCerts,
});

if (context?.browser !== browser) {
Expand Down
Loading