Back to Knowledge Hub
Getting Started

Playwright MCP: Where ignoreHTTPSErrors Belongs

Put the certificate setting in the MCP object that actually carries it, then state clearly what ignoring an HTTPS error still does not validate.

BotBrowser Team

Documentation

Want the structured docs for Getting Started?

This article lives in the editorial library. For step-by-step setup, reference material, and ongoing updates, jump into the docs section.

A config path from a JSON file through browser.contextOptions into the browser context, with launchOptions branching away and a note that an ignored error leaves the chain unvalidated.

An MCP-driven browser that refuses an owned HTTPS origin with a self-signed certificate presents a configuration question before it presents a certificate question: which field in the configuration file actually carries the option? The Playwright MCP config schema answers that with its types. launchOptions is a LaunchOptions, contextOptions is a BrowserContextOptions, and ignoreHTTPSErrors belongs to the second. BotBrowser can keep profile-backed browser inputs explicit for such a session, but it does not install a certificate authority, does not decide trust, and cannot make an ignored error equivalent to a validated chain.

That single typing fact resolves most of the confusion in this area, and the rest is about honesty after the refusal disappears. Turning the option on changes whether the context proceeds; it does not change whether the chain is trusted, and nothing in the MCP surface reports a trust verdict back. The Playwright self signed certificate diagnosis covers the underlying certificate failure when it happens outside an MCP session, and the MCP setup guide covers the wider question of where launch settings go.

Only published documentation and the public schema are quoted, and no key, certificate or customer configuration appears here.

TL;DR

  • The MCP JSON config has two separate browser objects: launchOptions, typed as LaunchOptions, and contextOptions, typed as BrowserContextOptions.
  • ignoreHTTPSErrors is a browser.newContext option, so it belongs under contextOptions; it is not a launch option.
  • ignoreHTTPSErrors defaults to false, and setting it to true lets the context proceed with an untrusted chain.
  • Proceeding is not validation. The chain is still untrusted and no MCP reply reports that it was trusted.
  • The MCP documentation describes the config file as supporting browser options, context options, network rules and timeouts; the field placement is decided by the schema types.
  • A BotBrowser profile keeps the browser side explicit; it does not make a self-signed origin trusted.

Table of contents

The two browser objects in the config

The MCP getting-started page documents a JSON configuration file passed with --config, and states that it supports browser options, context options, network rules and timeouts. The public config schema turns that sentence into concrete types:

launchOptions?: playwright.LaunchOptions;
contextOptions?: playwright.BrowserContextOptions;

Those two lines are the whole answer to the placement question. The source comment above them describes launchOptions as the place for launch-time settings such as channel, headless and executablePath, and contextOptions as context settings such as viewport. The types differ, and so do the options they accept.

That split matters because the two objects look interchangeable in a flat JSON file. A value written at the wrong level is accepted as JSON and simply never reaches the object that uses it. The MCP setup guide already covers that shape mistake for the executable path; the certificate option follows the same rule, which is why the placement question comes first here.

Why the option lands in contextOptions

The Playwright Browser reference documents the options accepted by browser.newContext. Among them is ignoreHTTPSErrors, described as a boolean that controls whether HTTPS errors are ignored when sending network requests and that defaults to false.

Because the MCP contextOptions field is typed as BrowserContextOptions, that is the object which can carry ignoreHTTPSErrors. launchOptions is typed as LaunchOptions, which is a different set and does not include it. The conclusion follows from the types rather than from a guess about what looks tidy:

ValueObject it belongs toType that accepts it
executablePath, channel, headlesslaunchOptionsLaunchOptions
viewport, ignoreHTTPSErrorscontextOptionsBrowserContextOptions

Putting a context option under launchOptions produces no error at the JSON level. The file parses, the server starts, and the value is ignored. That silence is the failure mode this article exists to remove: a certificate setting that appears to be configured and has no effect.

A config fragment that places it correctly

The smallest correct placement is one field, nested under the browser object that carries context options:

{
  "browser": {
    "contextOptions": {
      "ignoreHTTPSErrors": true
    }
  }
}

Two review habits keep that fragment honest. First, read the file back and confirm the value is under contextOptions and not one level up; a misplaced key is valid JSON and invisible to the option that should consume it. Second, name the origin the fixture serves. Turning the option on for an owned local origin is a scoped decision; turning it on for a session that also visits remote hosts is a broader claim than the fixture supports.

If the session also passes launch settings, keep them on the other object. A file that mixes executablePath and ignoreHTTPSErrors in one block will run, because only the recognized keys are read, and it will silently drop whichever one sits in the wrong object. The MCP setup guide covers that validation step for launch keys in detail.

What ignoring the error does not establish

The option changes one thing: whether the context proceeds when the chain is not trusted. It does not change the certificate, does not add an authority to a trust store, and does not produce a trusted chain.

That distinction has a practical shape in an MCP workflow. The server's reply reports what the browser did, not whether the certificate chain was valid. A run that opens the owned origin after the option is enabled has established that the context proceeded; it has not established that the chain would be accepted anywhere else, that a different engine would agree, or that the same origin on another day presents the same certificate.

Three evidence classes follow, and mixing them is the usual error:

Evidence classWho produces itWhat it establishes
Configuration fileThe operatorWhich object carried which option
Browser behaviourThe MCP server driving the browserThat the context proceeded or refused
Certificate factsAn explicit inspection of the connectionWhich certificate was presented and by whom

Only the third class can speak to the chain. A green run occupies the second class and says nothing about the third, which is why the self-signed certificate diagnosis reads securityDetails() when the certificate itself is the question.

Reviewing the config before trusting a green run

The order of checks matters more than the length of the review. Start with the object, then the value, then the origin, and only after those are answered look at what the run did.

  1. Object. Is ignoreHTTPSErrors nested under contextOptions rather than beside it or under launchOptions?
  2. Value. Is it a boolean, and is true the deliberate choice for this fixture rather than a copy left from another task?
  3. Origin. Does the session reach only the owned origin, so the decision is scoped to the fixture under test?
  4. Outcome. Did the browser proceed, and if so, is that outcome recorded as "proceeded with an untrusted chain" rather than "certificate valid"?

That ordering prevents a familiar mistake: enabling the option, watching the page load, and then reporting the certificate problem as solved. The page loading is evidence that the setting took effect; it is not evidence that the chain is sound.

Recording the decision beside the run also keeps the next reader from inheriting an unexamined default. A line such as "contextOptions.ignoreHTTPSErrors = true for the owned self-signed fixture, chain not validated" carries both the setting and its limit.

Engines and hosts are separate variables

The option lives in the shared context settings, but the behaviour behind it can still differ between engines and hosts. A result from one engine on a local origin is not a statement about another engine, a remote host, or a different operating system. When the outcome matters, record the engine and the host beside the setting rather than generalizing from one combination.

That habit is the same one the certificate articles use for every other observation: name the environment, and keep a single run from becoming a claim about all browsers.

A second session inherits whatever the file says

The MCP server can persist browser state between sessions, and the config file is read each time it starts. Those two facts interact in a way that is easy to miss: a setting written for one fixture keeps applying to later sessions that use the same config path, including sessions that were not meant to touch an untrusted origin at all.

That is a naming problem as much as a security one. A file called config.json in a shared directory tends to be reused because it is convenient, and a certificate exception that was correct for one local fixture becomes a default for everything else. Give the exception a name that states its scope, keep it beside the fixture it belongs to, and prefer a per-task config path over a shared one.

When the same reviewer needs both a permissive local session and a strict remote session, two config files with two names are clearer than one file toggled between runs. The strict file keeps the default false, and the permissive one says in its own name which owned origin it was written for. That keeps the decision visible without reading the contents.

The failure that looks like a certificate problem

Not every refusal from an MCP-driven browser is a certificate refusal. The browser may not reach the origin at all: a wrong port, a proxy that answers instead of the test server, or a document served from a redirect target. Each of those can surface as a navigation that does not complete, and none of them is solved by a context option.

That is why the review order starts with the object and the origin rather than with the option. If the origin the session requests is not the origin the fixture serves, enabling ignoreHTTPSErrors changes nothing, and the subsequent investigation will look for a certificate answer to a routing question. Confirm that the request reached the fixture before treating any refusal as certificate-related.

The distinction also changes what evidence is worth keeping. A routing failure is recorded with the requested URL and the server that answered; a certificate refusal is recorded with the certificate the client received. Keeping the two apart prevents a later reader from inheriting the wrong conclusion.

Keeping configuration evidence apart from tool output

An MCP session produces two different kinds of output that are easy to conflate. One is the configuration that started the server: the file path, the objects it contains, and which keys the schema recognizes. The other is the transcript that follows: the tool calls, their arguments, and the results the server returns.

Only the first explains why a certificate exception exists. The transcript shows what the browser did afterwards, and a successful navigation there is a consequence of the configuration, not a replacement for it. A review that keeps only the transcript has lost the reason the run was allowed to proceed, which matters when someone later asks whether the exception was intentional.

Keep the two beside each other rather than merging them. A record that names the config path, the object that carried ignoreHTTPSErrors, and the owned origin, then separately notes what the browser did, answers both questions a later reader has: was the exception deliberate, and what did it actually change.

That record also makes the limitation durable. The transcript cannot show whether a chain was trusted, because trust is not part of what a tool result carries. When the chain itself becomes the question, the record needs a separate certificate observation, and the absence of that observation is a gap rather than an implication.

BotBrowser capability and limitation

BotBrowser documents profile-backed browser surfaces and explicit launch inputs, and that capability has a narrow role here: it keeps the browser side of an MCP-driven session explicit, so a reviewer can tell which binary and profile ran while the configuration question is answered separately.

The limitation sits in the same paragraph. BotBrowser does not install a certificate authority, does not decide whether a chain is trusted, does not alter the certificate an owned origin presents, and cannot make an ignored error equivalent to a validated chain. The MCP getting-started page documents the config surface; the Playwright Browser reference documents ignoreHTTPSErrors as a context option; the BotBrowser network documentation documents the network surfaces a profile controls. None of them converts suppression into validation.

FAQ

Where does ignoreHTTPSErrors go in the Playwright MCP config?

Under browser.contextOptions, because that field is typed as BrowserContextOptions and ignoreHTTPSErrors is one of the browser.newContext options. It is not a LaunchOptions field, so placing it under launchOptions parses but has no effect.

Does setting it to true make the certificate trusted?

No. It changes whether the context proceeds over an untrusted chain. The certificate is unchanged, no authority is added to a trust store, and no MCP reply reports that the chain was trusted.

What does its default value mean?

The Browser reference documents a default of false, so a context refuses to proceed on HTTPS errors until the option is explicitly enabled. Enabling it is a deliberate configuration choice, not a neutral one.

How can I confirm the option was actually read?

Read the file back and confirm the key sits inside contextOptions, then observe that the previously refused origin now proceeds. A file that parses proves only that the JSON is valid, not that the key reached the object that consumes it.

Does this replace inspecting the certificate?

No. A run that proceeds says nothing about which certificate was presented or who issued it. When the chain itself is the question, inspect the connection; the self-signed certificate diagnosis shows how.

For neighboring work, Playwright MCP with a BotBrowser profile covers where executable and profile settings belong, and Browser automation MCP: what the protocol carries separates what a tool call carries from what the browser does with it.

Sources

Practical conclusion

The MCP config splits browser settings across two typed objects, and ignoreHTTPSErrors belongs to contextOptions because that field is a BrowserContextOptions. Placing it there lets the context proceed over an untrusted chain, which is a real change in behaviour and a narrow one. It does not validate the certificate, does not add trust, and is not reported as trust anywhere in the MCP surface. Read the object, then the value, then the origin, and record that the run proceeded with an untrusted chain rather than that the certificate was fixed.

#Playwright Mcp Ignore Certificate Errors#ignoreHTTPSErrors#contextOptions#Browser Automation#Test Diagnostics

This article is part of the guide: Browser Automation Getting Started: A First Run Map

Run the same check in BotBrowser

Load a profile, keep the signals you just read about consistent inside the browser, and confirm the result on your own machine before a rollout.