Skip to content

Commit 6827891

Browse files
authored
Simplify CLI args for Playwright (#278)
Playwright MCP switched to stdio in the registry for simplicity. Signed-off-by: Dan Barr <[email protected]> Co-authored-by: Dan Barr <[email protected]>
1 parent 9853d7b commit 6827891

File tree

3 files changed

+8
-26
lines changed

3 files changed

+8
-26
lines changed

docs/toolhive/guides-mcp/playwright.mdx

Lines changed: 8 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,6 @@ command argument as shown in the screenshot below.
8686
title='Playwright MCP server UI'
8787
/>
8888

89-
:::note[Important]
90-
91-
Don't remove the `--port 8931` or `--allowed-hosts "*"` arguments. They are
92-
required for the server to function correctly in ToolHive.
93-
94-
:::
95-
9689
</TabItem>
9790
<TabItem value='cli' label='CLI'>
9891

@@ -105,15 +98,13 @@ thv run playwright
10598
Emulate a mobile device for responsive testing:
10699

107100
```bash {2}
108-
thv run playwright -- --port 8931 --allowed-hosts "*" \
109-
--device "iPhone 15"
101+
thv run playwright -- --device "iPhone 15"
110102
```
111103

112104
Restrict access to specific domains:
113105

114106
```bash {2}
115-
thv run playwright -- --port 8931 --allowed-hosts "*" \
116-
--allowed-origins "example.com;trusted-site.com"
107+
thv run playwright -- --allowed-origins "example.com;trusted-site.com"
117108
```
118109

119110
Mount a host directory (e.g., `~/playwright-output`) to save browser output
@@ -123,34 +114,25 @@ files like screenshots and traces:
123114
mkdir ~/playwright-output
124115
thv run \
125116
--volume ~/playwright-output:/browser-output playwright \
126-
-- --port 8931 --allowed-hosts "*" \
127-
--output-dir /browser-output --save-trace --save-session
117+
-- --output-dir /browser-output --save-trace --save-session
128118
```
129119

130120
You can run multiple instances of the server with different configurations by
131121
giving each a unique name:
132122

133123
```bash {1,5}
134124
thv run --name playwright-desktop playwright \
135-
-- --port 8931 --allowed-hosts "*" \
136-
--device "Desktop Chrome" --viewport-size 1920,1080
125+
-- --device "Desktop Chrome" --viewport-size 1920,1080
137126

138127
thv run --name playwright-iphone playwright \
139-
-- --port 8931 --allowed-hosts "*" \
140-
--device "iPhone 15"
128+
-- --device "iPhone 15"
141129
```
142130

143-
:::note[Important]
144-
145-
Don't remove the `--port 8931` or `--allowed-hosts "*"` arguments. They are
146-
required for the server to function correctly in ToolHive.
147-
148-
:::
149-
150131
</TabItem>
151132
<TabItem value='k8s' label='Kubernetes'>
152133

153-
Create a basic Kubernetes manifest to deploy the Playwright MCP server:
134+
Create a basic Kubernetes manifest to deploy the Playwright MCP server using the
135+
Streamable HTTP transport:
154136

155137
```yaml title="playwright.yaml"
156138
apiVersion: toolhive.stacklok.dev/v1alpha1
@@ -173,7 +155,7 @@ spec:
173155
:::note[Important]
174156
175157
Don't remove the `--port 8931` or `--allowed-hosts "*"` arguments. They are
176-
required for the server to function correctly in ToolHive.
158+
required to run the server using Streamable HTTP.
177159

178160
:::
179161

-3.32 KB
Loading
-3.1 KB
Loading

0 commit comments

Comments
 (0)