Skip to content

[Docs] Standalone MCP example port 8931 conflicts with other common local services #42688

Description

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)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions