Playwright MCP server.
What is an MCP Server?
| Attribute | Details |
|---|---|
| Docker Image | https://hub.docker.com/repository/docker/mcp/playwright |
| Author | https://github.com/microsoft |
| Repository | https://github.com/microsoft/playwright-mcp |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/microsoft/playwright-mcp/blob/d3782155c40aabc3945673998bdbae83cb0dc94c/Dockerfile |
| Commit | d3782155c40aabc3945673998bdbae83cb0dc94c |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | !Docker Scout Health Score |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/playwright --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
browser_click | Click |
browser_close | Close browser |
browser_console_messages | Get console messages |
browser_drag | Drag mouse |
browser_evaluate | Evaluate JavaScript |
browser_file_upload | Upload files |
browser_fill_form | Fill form |
browser_handle_dialog | Handle a dialog |
browser_hover | Hover mouse |
browser_navigate | Navigate to a URL |
browser_navigate_back | Go back |
browser_network_requests | List network requests |
browser_press_key | Press a key |
browser_resize | Resize browser window |
browser_run_code | Run Playwright code |
browser_select_option | Select option |
browser_snapshot | Page snapshot |
browser_tabs | Manage tabs |
browser_take_screenshot | Take a screenshot |
browser_type | Type text |
browser_wait_for | Wait for |
Tool: browser_click
Perform click on a web page
| Parameters | Type | Description |
|---|---|---|
ref | string | Exact target element reference from the page snapshot |
button | string optional | Button to click, defaults to left |
doubleClick | boolean optional | Whether to perform a double click instead of a single click |
element | string optional | Human-readable element description used to obtain permission to interact with the element |
modifiers | array optional | Modifier keys to press |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_close
Close the page
Tool: browser_console_messages
Returns all console messages
| Parameters | Type | Description |
|---|---|---|
level | string | Level of the console messages to return. Each level includes the messages of more severe levels. Defaults to "info". |
all | boolean optional | Return all console messages since the beginning of the session, not just since the last navigation. Defaults to false. |
filename | string optional | Filename to save the console messages to. If not provided, messages are returned as text. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
Tool: browser_drag
Perform drag and drop between two elements
| Parameters | Type | Description |
|---|---|---|
endElement | string | Human-readable target element description used to obtain the permission to interact with the element |
endRef | string | Exact target element reference from the page snapshot |
startElement | string | Human-readable source element description used to obtain the permission to interact with the element |
startRef | string | Exact source element reference from the page snapshot |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_evaluate
Evaluate JavaScript expression on page or element
| Parameters | Type | Description |
|---|---|---|
function | string | () => { /* code / } or (element) => { / code */ } when element is provided |
element | string optional | Human-readable element description used to obtain permission to interact with the element |
filename | string optional | Filename to save the result to. If not provided, result is returned as text. |
ref | string optional | Exact target element reference from the page snapshot |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_file_upload
Upload one or multiple files
| Parameters | Type | Description |
|---|---|---|
paths | array optional | The absolute paths to the files to upload. Can be single file or multiple files. If omitted, file chooser is cancelled. |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_fill_form
Fill multiple form fields
| Parameters | Type | Description |
|---|---|---|
fields | array | Fields to fill in |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_handle_dialog
Handle a dialog
| Parameters | Type | Description |
|---|---|---|
accept | boolean | Whether to accept the dialog. |
promptText | string optional | The text of the prompt in case of a prompt dialog. |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_hover
Hover over element on page
| Parameters | Type | Description |
|---|---|---|
ref | string | Exact target element reference from the page snapshot |
element | string optional | Human-readable element description used to obtain permission to interact with the element |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_navigate
Navigate to a URL
| Parameters | Type | Description |
|---|---|---|
url | string | The URL to navigate to |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_navigate_back
Go back to the previous page in the history
Tool: browser_network_requests
Returns all network requests since loading the page
| Parameters | Type | Description |
|---|---|---|
requestBody | boolean | Whether to include request body. Defaults to false. |
requestHeaders | boolean | Whether to include request headers. Defaults to false. |
static | boolean | Whether to include successful static resources like images, fonts, scripts, etc. Defaults to false. |
filename | string optional | Filename to save the network requests to. If not provided, requests are returned as text. |
filter | string optional | Only return requests whose URL matches this regexp (e.g. "/api/.*user"). |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
Tool: browser_press_key
Press a key on the keyboard
| Parameters | Type | Description |
|---|---|---|
key | string | Name of the key to press or a character to generate, such as ArrowLeft or a |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_resize
Resize the browser window
| Parameters | Type | Description |
|---|---|---|
height | number | Height of the browser window |
width | number | Width of the browser window |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_run_code
Run Playwright code snippet
| Parameters | Type | Description |
|---|---|---|
code | string optional | A JavaScript function containing Playwright code to execute. It will be invoked with a single argument, page, which you can use for any page interaction. For example: async (page) => { await page.getByRole('button', { name: 'Submit' }).click(); return await page.title(); } |
filename | string optional | Load code from the specified file. If both code and filename are provided, code will be ignored. |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_select_option
Select an option in a dropdown
| Parameters | Type | Description |
|---|---|---|
ref | string | Exact target element reference from the page snapshot |
values | array | Array of values to select in the dropdown. This can be a single value or multiple values. |
element | string optional | Human-readable element description used to obtain permission to interact with the element |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_snapshot
Capture accessibility snapshot of the current page, this is better than screenshot
| Parameters | Type | Description |
|---|---|---|
depth | number optional | Limit the depth of the snapshot tree |
filename | string optional | Save snapshot to markdown file instead of returning it in the response. |
ref | string optional | Element reference from the previous page snapshot to capture a partial snapshot instead of the whole page |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
Tool: browser_tabs
List, create, close, or select a browser tab.
| Parameters | Type | Description |
|---|---|---|
action | string | Operation to perform |
index | number optional | Tab index, used for close/select. If omitted for close, current tab is closed. |
url | string optional | URL to navigate to in the new tab, used for new. |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_take_screenshot
Take a screenshot of the current page. You can't perform actions based on the screenshot, use browser_snapshot for actions.
| Parameters | Type | Description |
|---|---|---|
type | string | Image format for the screenshot. Default is png. |
element | string optional | Human-readable element description used to obtain permission to screenshot the element. If not provided, the screenshot will be taken of viewport. If element is provided, ref must be provided too. |
filename | string optional | File name to save the screenshot to. Defaults to `page-{timestamp}.{png |
fullPage | boolean optional | When true, takes a screenshot of the full scrollable page, instead of the currently visible viewport. Cannot be used with element screenshots. |
ref | string optional | Exact target element reference from the page snapshot. If not provided, the screenshot will be taken of viewport. If ref is provided, element must be provided too. |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
Tool: browser_type
Type text into editable element
| Parameters | Type | Description |
|---|---|---|
ref | string | Exact target element reference from the page snapshot |
text | string | Text to type into the element |
element | string optional | Human-readable element description used to obtain permission to interact with the element |
slowly | boolean optional | Whether to type one character at a time. Useful for triggering key handlers in the page. By default entire text is filled in at once. |
submit | boolean optional | Whether to submit entered text (press Enter after) |
This tool may perform destructive updates.
This tool interacts with external entities.
Tool: browser_wait_for
Wait for text to appear or disappear or a specified time to pass
| Parameters | Type | Description |
|---|---|---|
text | string optional | The text to wait for |
textGone | string optional | The text to wait for to disappear |
time | number optional | The time to wait in seconds |
This tool is read-only. It does not modify its environment.
This tool interacts with external entities.
json{ "mcpServers": { "playwright": { "command": "docker", "args": [ "run", "-i", "--rm", "mcp/playwright" ] } } }
Why is it safer to run MCP Servers with Docker?
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。

探索更多轩辕镜像的使用方法,找到最适合您系统的配置方式
通过 Docker 登录认证访问私有仓库
无需登录使用专属域名
Kubernetes 集群配置 Containerd
K3s 轻量级 Kubernetes 镜像加速
VS Code Dev Containers 配置
Podman 容器引擎配置
HPC 科学计算容器配置
ghcr、Quay、nvcr 等镜像仓库
Harbor Proxy Repository 对接专属域名
Portainer Registries 加速拉取
Nexus3 Docker Proxy 内网缓存
需要其他帮助?请查看我们的 常见问题Docker 镜像访问常见问题解答 或 提交工单
docker search 限制
站内搜不到镜像
离线 save/load
插件要用 plugin install
WSL 拉取慢
安全与 digest
新手拉取配置
镜像合规机制
manifest unknown
no matching manifest(架构)
invalid tar header(解压)
TLS 证书失败
DNS 超时
域名连通性排查
410 Gone 排查
402 与流量用尽
401 认证失败
429 限流
D-Bus 凭证提示
413 与超大单层
来自真实用户的反馈,见证轩辕镜像的优质服务