Migrate to /mcp streamable transport by default

Co-authored-by: pavelfeldman <883973+pavelfeldman@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot] 2025-07-18 16:04:59 +00:00
parent 3b9397dc80
commit 9ca9e82006
2 changed files with 7 additions and 5 deletions

View File

@ -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.
<details>
<summary><b>Docker</b></summary>

View File

@ -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);