From 8dfea1c67f21ee5b0620a6b98d2ee435660fef44 Mon Sep 17 00:00:00 2001 From: zhu733756 <38685176+zhu733756@users.noreply.github.com> Date: Thu, 25 Sep 2025 23:23:28 +0800 Subject: [PATCH] docs: running the Playwright-MCP server in docker (#1074) --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index e704052..4bc8149 100644 --- a/README.md +++ b/README.md @@ -434,6 +434,19 @@ And then in MCP client config, set the `url` to the HTTP endpoint: } ``` +Or If you prefer to run the container as a long-lived service instead of letting the MCP client spawn it, use: + +``` +docker run -d -i --rm --init --pull=always \ + --entrypoint node \ + --name playwright \ + -p 8931:8931 \ + mcr.microsoft.com/playwright/mcp \ + cli.js --headless --browser chromium --no-sandbox --port 8931 +``` + +The server will listen on host port **8931** and can be reached by any MCP client. + You can build the Docker image yourself. ```