diff --git a/README.md b/README.md index eecf83d..5a3afb3 100644 --- a/README.md +++ b/README.md @@ -338,17 +338,38 @@ PLAYWRITER_TOKEN= npx playwriter serve **In container/VM (where agent runs):** -Using environment variables: +Configure your MCP client with the host and token. You can pass them as CLI arguments: -```bash -export PLAYWRITER_HOST="host.docker.internal" -export PLAYWRITER_TOKEN="" +```json +{ + "mcpServers": { + "playwriter": { + "command": "npx", + "args": [ + "playwriter@latest", + "--host", "host.docker.internal", + "--token", "" + ] + } + } +} ``` -Or using CLI options: +Or use environment variables (useful if you want to set them globally in your process or MCP client): -```bash -npx playwriter --host host.docker.internal --token +```json +{ + "mcpServers": { + "playwriter": { + "command": "npx", + "args": ["playwriter@latest"], + "env": { + "PLAYWRITER_HOST": "host.docker.internal", + "PLAYWRITER_TOKEN": "" + } + } + } +} ``` Use `host.docker.internal` for devcontainers, or your host's IP for VMs/SSH.