diff --git a/README.md b/README.md index 3f83e76..430b0f0 100644 --- a/README.md +++ b/README.md @@ -297,24 +297,26 @@ npx @playwright/mcp@latest --config path/to/config.json ### Standalone MCP server When running headed browser on system w/o display or from worker processes of the IDEs, -run the MCP server from environment with the DISPLAY and pass the `--port` flag to enable SSE transport. +run the MCP server from environment with the DISPLAY and pass the `--port` flag to enable HTTP transport. ```bash npx @playwright/mcp@latest --port 8931 ``` -And then in MCP client config, set the `url` to the SSE endpoint: +And then in MCP client config, set the `url` to the MCP endpoint: ```js { "mcpServers": { "playwright": { - "url": "http://localhost:8931/sse" + "url": "http://localhost:8931/mcp" } } } ``` +For legacy SSE transport support, you can use `/sse` instead of `/mcp` in the URL. +
Docker diff --git a/src/transport.ts b/src/transport.ts index 2342fe9..12814ed 100644 --- a/src/transport.ts +++ b/src/transport.ts @@ -127,11 +127,11 @@ export function startHttpTransport(httpServer: http.Server, mcpServer: Server) { JSON.stringify({ 'mcpServers': { 'playwright': { - 'url': `${url}/sse` + 'url': `${url}/mcp` } } }, undefined, 2), - 'If your client supports streamable HTTP, you can use the /mcp endpoint instead.', + 'For legacy SSE transport support, you can use the /sse endpoint instead.', ].join('\n'); // eslint-disable-next-line no-console console.error(message);