From 6feb459c1e16a6813d98c7d8d2598e58ef36ef24 Mon Sep 17 00:00:00 2001 From: "Tommy D. Rossi" Date: Sun, 4 Jan 2026 21:37:28 +0100 Subject: [PATCH] docs: improve remote agents section with MCP JSON examples --- README.md | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) 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.