Summary
The standalone server examples use port 8931 throughout the docs:
npx @playwright/mcp@latest --port 8931
{
"mcpServers": {
"playwright": {
"url": "http://localhost:8931/mcp"
}
}
}
--port has no default (omitting it uses stdio), so 8931 is only a documentation example. The problem is that the examples are copied verbatim: users end up binding 8931, and that port is already a long-standing default for local services in some developer communities, where changing it is effectively not an option. When the MCP server and such a service run on the same machine, one of them fails to bind (EADDRINUSE), which is a confusing first-run experience caused purely by the doc example.
Suggestion
Make it clear that the port is arbitrary, for example by any of:
- using a placeholder such as
--port <port> / http://localhost:<port>/mcp,
- choosing a less contended example port, and/or
- adding a sentence that any free port works and the value shown is only an example.
Affected locations
docs/src/getting-started-mcp.md (and the localized getting-started pages)
- the published docs: https://playwright.dev/docs/getting-started-mcp and the MCP configuration pages
microsoft/playwright-mcp README, including the Docker example (-p 8931:8931 ... --port 8931)
Summary
The standalone server examples use port
8931throughout the docs:{ "mcpServers": { "playwright": { "url": "http://localhost:8931/mcp" } } }--porthas no default (omitting it uses stdio), so8931is only a documentation example. The problem is that the examples are copied verbatim: users end up binding8931, and that port is already a long-standing default for local services in some developer communities, where changing it is effectively not an option. When the MCP server and such a service run on the same machine, one of them fails to bind (EADDRINUSE), which is a confusing first-run experience caused purely by the doc example.Suggestion
Make it clear that the port is arbitrary, for example by any of:
--port <port>/http://localhost:<port>/mcp,Affected locations
docs/src/getting-started-mcp.md(and the localized getting-started pages)microsoft/playwright-mcpREADME, including the Docker example (-p 8931:8931 ... --port 8931)