Skip to main content

CLI Flags

FlagDescription
--httpEnable Streamable HTTP transport instead of STDIO.
--port <number>HTTP port (default 8000).
--path <path>Base HTTP path (default /mcp).
--host-name <name>Host used in download URLs (defaults to system hostname).
--listen <address>Address to bind (default 0.0.0.0).
--insecureUse http scheme for resource links instead of https.
--resource-ttl <seconds>TTL for generated resources (default 600s).
--host-nameHostname embedded in URLs.
--static-user-agentDisable randomized user-agents.

Examples

NPX

npx @aakashh242/playwright-mcp-server --http --port 9000 --path /gateway

Docker

docker run --rm -p 9000:9000 ghcr.io/aakashh242/mcp-playwright:latest \
node dist/index.js --http --port 9000 --host-name example.com

Remember that HTTP mode requires CLI access to upload files (curl / Invoke-WebRequest) before calling playwright_upload_file.