Skip to content
Draft
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -344,9 +344,16 @@ If you run into any issues, checkout our [troubleshooting guide](./docs/troubles
- [`new_page`](docs/tool-reference.md#new_page)
- [`select_page`](docs/tool-reference.md#select_page)
- [`wait_for`](docs/tool-reference.md#wait_for)
- **Emulation** (2 tools)
- **Emulation** (9 tools)
- [`emulate`](docs/tool-reference.md#emulate)
- [`resize_page`](docs/tool-reference.md#resize_page)
- [`webauthn_add_authenticator`](docs/tool-reference.md#webauthn_add_authenticator)
- [`webauthn_add_credential`](docs/tool-reference.md#webauthn_add_credential)
- [`webauthn_clear_credentials`](docs/tool-reference.md#webauthn_clear_credentials)
- [`webauthn_enable`](docs/tool-reference.md#webauthn_enable)
- [`webauthn_get_credentials`](docs/tool-reference.md#webauthn_get_credentials)
- [`webauthn_remove_authenticator`](docs/tool-reference.md#webauthn_remove_authenticator)
- [`webauthn_set_user_verified`](docs/tool-reference.md#webauthn_set_user_verified)
- **Performance** (3 tools)
- [`performance_analyze_insight`](docs/tool-reference.md#performance_analyze_insight)
- [`performance_start_trace`](docs/tool-reference.md#performance_start_trace)
Expand Down
88 changes: 87 additions & 1 deletion docs/tool-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,16 @@
- [`new_page`](#new_page)
- [`select_page`](#select_page)
- [`wait_for`](#wait_for)
- **[Emulation](#emulation)** (2 tools)
- **[Emulation](#emulation)** (9 tools)
- [`emulate`](#emulate)
- [`resize_page`](#resize_page)
- [`webauthn_add_authenticator`](#webauthn_add_authenticator)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we probably want a dedicated category for WebAuthN with a separate CLI flag to control it.

- [`webauthn_add_credential`](#webauthn_add_credential)
- [`webauthn_clear_credentials`](#webauthn_clear_credentials)
- [`webauthn_enable`](#webauthn_enable)
- [`webauthn_get_credentials`](#webauthn_get_credentials)
- [`webauthn_remove_authenticator`](#webauthn_remove_authenticator)
- [`webauthn_set_user_verified`](#webauthn_set_user_verified)
Comment on lines +24 to +30
Copy link
Collaborator

@OrKoN OrKoN Jan 24, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It looks like we could use a single tool configure_webauthn to configure all of the WebAuthN virtual authenticator state (getting rid of dedicated commands). If WebAuthN is enabled, its status should be returned for all calls (in McpResponse) eliminating a need for get. If any CDP events can be emitted via the user actions on the page, the McpContext should accumulate them automatically and include them in the McpResponse automatically.

- **[Performance](#performance)** (3 tools)
- [`performance_analyze_insight`](#performance_analyze_insight)
- [`performance_start_trace`](#performance_start_trace)
Expand Down Expand Up @@ -223,6 +230,85 @@

---

### `webauthn_add_authenticator`

**Description:** Add a virtual WebAuthn authenticator.

**Parameters:**

- **protocol** (enum: "u2f", "ctap2") **(required)**: The protocol the virtual authenticator speaks.
- **transport** (enum: "usb", "nfc", "ble", "internal") **(required)**: The transport for the authenticator.
- **hasResidentKey** (boolean) _(optional)_: Whether the authenticator supports resident keys (passkeys).
- **hasUserVerification** (boolean) _(optional)_: Whether the authenticator supports user verification.
- **isUserVerified** (boolean) _(optional)_: Whether user verification is currently enabled/verified.

---

### `webauthn_add_credential`

**Description:** Add a credential to a virtual authenticator.

**Parameters:**

- **authenticatorId** (string) **(required)**: The ID of the authenticator to add the credential to.
- **credentialId** (string) **(required)**: The credential ID (base64 encoded).
- **isResidentCredential** (boolean) **(required)**: Whether this is a resident (discoverable) credential.
- **privateKey** (string) **(required)**: The private key in PKCS#8 format (base64 encoded).
- **rpId** (string) **(required)**: The relying party ID.
- **signCount** (integer) _(optional)_: The signature counter.
- **userHandle** (string) _(optional)_: The user handle (base64 encoded).

---

### `webauthn_clear_credentials`

**Description:** Clear all credentials from a virtual authenticator.

**Parameters:**

- **authenticatorId** (string) **(required)**: The ID of the authenticator to clear credentials from.

---

### `webauthn_enable`

**Description:** Enable the WebAuthn virtual authenticator environment for the selected page.

**Parameters:** None

---

### `webauthn_get_credentials`

**Description:** Get all credentials registered with a virtual authenticator.

**Parameters:**

- **authenticatorId** (string) **(required)**: The ID of the authenticator to get credentials from.

---

### `webauthn_remove_authenticator`

**Description:** Remove a virtual WebAuthn authenticator.

**Parameters:**

- **authenticatorId** (string) **(required)**: The ID of the authenticator to remove.

---

### `webauthn_set_user_verified`

**Description:** Set whether user verification succeeds or fails for a virtual authenticator.

**Parameters:**

- **authenticatorId** (string) **(required)**: The ID of the authenticator.
- **isUserVerified** (boolean) **(required)**: Whether user verification should succeed.

---

## Performance

### `performance_analyze_insight`
Expand Down
2 changes: 2 additions & 0 deletions src/tools/tools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ import * as screenshotTools from './screenshot.js';
import * as scriptTools from './script.js';
import * as snapshotTools from './snapshot.js';
import type {ToolDefinition} from './ToolDefinition.js';
import * as webauthnTools from './webauthn.js';

const tools = [
...Object.values(consoleTools),
Expand All @@ -27,6 +28,7 @@ const tools = [
...Object.values(screenshotTools),
...Object.values(scriptTools),
...Object.values(snapshotTools),
...Object.values(webauthnTools),
] as ToolDefinition[];

tools.sort((a, b) => {
Expand Down
Loading