Skip to main content

Capabilities

Capabilities control which tools the MCP server exposes to the LLM. By default, only core tools are enabled. Add capabilities to unlock additional tool groups.

Enabling capabilities

Via CLI argument:

{
"mcpServers": {
"playwright": {
"command": "npx",
"args": ["@playwright/mcp@latest", "--caps=vision,pdf,devtools"]
}
}
}

Via environment variable:

PLAYWRIGHT_MCP_CAPS=vision,pdf,devtools

Via config file:

{
"capabilities": ["vision", "pdf", "devtools", "network", "storage", "testing"]
}

Capability reference

core (always enabled)

Basic browser automation — always available, cannot be disabled.

ToolDescription
browser_navigateNavigate to a URL
browser_navigate_backGo back in history
browser_snapshotCapture accessibility snapshot
browser_findSearch the snapshot for text or a regexp
browser_clickClick an element
browser_hoverHover over an element
browser_dragDrag and drop between two elements
browser_dropDrop files or MIME-typed data onto an element
browser_select_optionSelect dropdown option
browser_typeType text into an element
browser_press_keyPress a key
browser_fill_formFill multiple form fields
browser_take_screenshotTake a screenshot
browser_run_code_unsafeExecute a Playwright code snippet
browser_evaluateEvaluate JavaScript
browser_wait_forWait for text or time
browser_handle_dialogAccept or dismiss dialogs
browser_file_uploadUpload files into a file chooser
browser_console_messagesGet console output
browser_network_requestsList network requests
browser_network_requestShow one request in full detail
browser_tabsManage tabs
browser_closeClose the page
browser_resizeResize the window

network

Network mocking and state control.

ToolDescription
browser_routeMock requests matching a URL pattern
browser_route_listList active mocked routes
browser_unrouteRemove mocked routes
browser_network_state_setSet online/offline state
"--caps=network"

storage

Cookie, localStorage, and sessionStorage management plus state persistence.

ToolDescription
browser_cookie_list/get/set/delete/clearManage cookies
browser_localstorage_list/get/set/delete/clearManage localStorage
browser_sessionstorage_list/get/set/delete/clearManage sessionStorage
browser_storage_stateSave cookies + local storage to a file
browser_set_storage_stateRestore saved state
"--caps=storage"

testing

Assertions and locator generation.

ToolDescription
browser_verify_element_visibleAssert element is visible by role and accessible name
browser_verify_text_visibleAssert text is visible
browser_verify_list_visibleAssert a list and its items are visible
browser_verify_valueAssert form field value
browser_generate_locatorGenerate a Playwright locator for test code
"--caps=testing"

vision

Coordinate-based mouse tools for screenshot-driven workflows. Requires a vision-capable LLM.

ToolDescription
browser_mouse_move_xyMove mouse to coordinates
browser_mouse_click_xyClick at coordinates
browser_mouse_drag_xyDrag between coordinates
browser_mouse_downPress mouse button
browser_mouse_upRelease mouse button
browser_mouse_wheelScroll with mouse wheel
"--caps=vision"

See Vision Mode for usage patterns.

pdf

PDF generation.

ToolDescription
browser_pdf_saveExport page as PDF
"--caps=pdf"

devtools

Tracing, video recording, action recording, highlighting, and debugging.

ToolDescription
browser_start_tracingStart execution trace
browser_stop_tracingStop trace and save
browser_start_videoStart video recording
browser_stop_videoStop video and save
browser_video_chapterAdd a chapter card
browser_video_show_actionsAnnotate actions with on-page callouts
browser_video_hide_actionsStop annotating actions
browser_start_recordingRecord actions the user performs as code
browser_stop_recordingStop recording and return the code
browser_highlightShow a highlight overlay around an element
browser_hide_highlightRemove a highlight overlay
browser_annotateOpen the Playwright Dashboard and collect user annotations
browser_resumeResume paused script execution
"--caps=devtools"

See Debugging Tools.

config

Configuration introspection.

ToolDescription
browser_get_configGet the final resolved config
"--caps=config"

Common configurations

Minimal (default)

Only core tools — navigation, snapshots, clicking, typing, screenshots:

["@playwright/mcp@latest"]

Full automation

Everything enabled:

["@playwright/mcp@latest", "--caps=network,storage,testing,vision,pdf,devtools"]

Testing workflow

Core + testing assertions + storage for auth persistence:

["@playwright/mcp@latest", "--caps=testing,storage"]

Debugging workflow

Core + devtools for tracing and video:

["@playwright/mcp@latest", "--caps=devtools"]

Data extraction

Core + network for mocking + storage for cookies:

["@playwright/mcp@latest", "--caps=network,storage"]

Why capabilities exist

Capabilities limit the number of tools exposed to the LLM. Fewer tools means:

  • Lower token cost — the tool schema is smaller
  • Fewer hallucinated tool calls — the LLM has fewer choices to confuse
  • Faster responses — less context to process

Only enable what you need for your use case.