Config type defines all configuration options for customizing the Playwright MCP server behavior. All fields are optional.
Browser Configuration
Browser-related configuration options.
Extension Mode
Connect to a running browser instance (Edge/Chrome only). If specified,
browser config is ignored.Requires the “Playwright MCP Bridge” browser extension to be installed.Server Configuration
HTTP server configuration for SSE or MCP transport.
Capabilities
List of enabled tool capabilities. See Tool Capabilities for details.Possible values:
'config'- Configuration tools'core'- Core browser automation features'core-navigation'- Navigation tools'core-tabs'- Tab management'core-input'- Input and interaction tools'core-install'- Browser installation'network'- Network request inspection'pdf'- PDF generation'storage'- Storage management'testing'- Test assertions and verification'vision'- Coordinate-based interactions'devtools'- Developer tools features
Session Recording
Whether to save the Playwright session into the output directory.
Whether to save the Playwright trace of the session into the output directory.
If specified, saves the Playwright video of the session into the output directory.
Browser Context Sharing
Reuse the same browser context between all connected HTTP clients.
Secrets Management
Secrets are used to prevent LLM from getting sensitive data while automating scenarios such as authentication.Note: Prefer
browser.contextOptions.storageState over secrets file as a more secure alternative.Output Configuration
The directory to save output files (screenshots, PDFs, traces, etc.).
Whether to save snapshots, console messages, network logs and other session logs to a file or to the standard output. Defaults to
'stdout'.Console Messages
Console message configuration.
Network Configuration
Network request filtering configuration.
Test ID Attribute
Specify the attribute to use for test ids. Defaults to
'data-testid'.Timeouts
Timeout configuration for actions and navigation.
Image Responses
Whether to send image responses to the client. Defaults to
'allow'.Snapshot Configuration
Page snapshot configuration.
File Access
Whether to allow file uploads from anywhere on the file system. By default (
false), file uploads are restricted to paths within the MCP roots only.Code Generation
Specify the language to use for code generation. Defaults to
'typescript'.Complete Example
Related
- createConnection - Main API function
- Tool Capabilities - Capability groups reference

