### Install Dependencies and Build Project Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/development.md Installs project dependencies, builds the project, and displays help for the CLI. ```bash npm install npm run build node dist/cli.js --help ``` -------------------------------- ### Local Setup for cloakbrowser-mcp Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/CONTRIBUTING.md Clone the repository, install dependencies, and run checks to set up your local development environment. Node.js 20 or newer is required. ```bash git clone https://github.com/swimmwatch/cloakbrowser-mcp.git cd cloakbrowser-mcp npm install npm run check ``` -------------------------------- ### Manage Documentation Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/development.md Installs documentation dependencies, copies assets, serves the documentation locally, and builds the documentation. ```bash npm run docs:install npm run docs:assets npm run docs:serve npm run docs:build ``` -------------------------------- ### Verify Package Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/testing.md Build the package, verify the tarball contents, and test installation and CLI commands in a temporary project. ```bash npm run package:verify ``` -------------------------------- ### Install Dependencies and Run Checks Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/contributing.md Run these commands locally before submitting a pull request to ensure your changes meet project standards and pass all checks. ```bash npm install npm run check ``` -------------------------------- ### Run CloakBrowser MCP with npm Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/README.md Use this npm command to install and run the latest version of cloakbrowser-mcp. It configures the output directory and headless mode via environment variables. ```json { "mcpServers": { "cloakbrowser": { "command": "npx", "args": ["-y", "cloakbrowser-mcp@latest"], "env": { "PLAYWRIGHT_MCP_OUTPUT_DIR": "/tmp/cloakbrowser-artifacts", "PLAYWRIGHT_MCP_HEADLESS": "true" } } } } ``` -------------------------------- ### Configure MCP Server in npm Client Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Example JSON configuration for an MCP client using the npm package for CloakBrowser MCP. Sets environment variables for headless operation and output directory. ```json { "mcpServers": { "cloakbrowser": { "command": "npx", "args": ["-y", "cloakbrowser-mcp@latest"], "env": { "PLAYWRIGHT_MCP_HEADLESS": "true", "PLAYWRIGHT_MCP_OUTPUT_DIR": "/tmp/cloakbrowser-artifacts" } } } } ``` -------------------------------- ### Run the Docker image with help command Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/dockerhub-readme.md Execute the Docker container to display its help information, showing available commands and options. ```bash docker run --rm --init swimmwatch/cloakbrowser-mcp:latest --help ``` -------------------------------- ### Development and Build Commands Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/README.md Common commands for setting up the development environment, building the project, running tests, and building/testing Docker images. ```bash npm install npm run build npm test npm run docker:build npm run docker:smoke npm run server:validate npm run bridge:compare -- cloakbrowser-mcp:dev --report bridge-parity-report.json ``` -------------------------------- ### Build and Test Docker Image Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/development.md Builds the Docker image for the project and runs a smoke test against it. ```bash npm run docker:build npm run docker:smoke ``` -------------------------------- ### Daily Commands Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/AGENTS.md Lists common npm scripts for development, testing, and building. Run these commands to manage the project. ```bash npm run dev npm test npm run test:unit npm run test:integration npm run typecheck npm run lint npm run format npm run format:check npm run build npm run package:verify npm run docker:build npm run docker:smoke npm run bridge:compare npm run check ``` -------------------------------- ### Run Unit Tests Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/testing.md Execute unit tests to cover environment parsing, bridge configuration, launch arguments, and local introspection tools. ```bash npm run test:unit ``` -------------------------------- ### Run CloakBrowser MCP with Docker Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Pull the latest Docker image and run a container for CloakBrowser MCP. Mount local artifacts directory for persistence. ```bash docker pull swimmwatch/cloakbrowser-mcp:latest docker run --rm --init -i \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest ``` -------------------------------- ### Run CloakBrowser MCP CLI Commands Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Execute various commands for CloakBrowser MCP using npx. Use '--help' for options, 'doctor' to check the environment, or run the MCP server directly. ```bash npx -y cloakbrowser-mcp@latest --help npx -y cloakbrowser-mcp@latest doctor npx -y cloakbrowser-mcp@latest doctor --json npx -y cloakbrowser-mcp@latest npx -y cloakbrowser-mcp@latest --transport streamable-http --http-port 3000 ``` -------------------------------- ### Run Production Audit and Server Validation Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/testing.md Execute production dependency audits and validate the server configuration. ```bash npm run audit:prod npm run server:validate ``` -------------------------------- ### Validate Server and Audit Production Dependencies Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/contributor-guide.md Directly run checks for metadata and production dependency validation. This is useful for ensuring the server configuration and production dependencies are sound. ```bash npm run server:validate npm run audit:prod ``` -------------------------------- ### Project Layout Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/AGENTS.md Displays the directory structure of the cloakbrowser-mcp project. Useful for understanding file organization. ```text src/ cli.ts CLI entry point server.ts outer MCP proxy server index.ts metadata export only bridge/ config generation, env parsing, upstream path resolution, local tools runtime/ console fallback source strings project/ project metadata tests/ unit/ env/config/local tool tests integration/ fake-upstream MCP proxy tests fixtures/ fake upstream MCP server ``` -------------------------------- ### Run Daily Development Commands Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/development.md Executes common daily development tasks including type checking, linting, formatting checks, server validation, dependency auditing, testing, building, and general checks. ```bash npm run typecheck npm run lint npm run format:check npm run server:validate npm run audit:prod npm test npm run build npm run check ``` -------------------------------- ### Run CloakBrowser MCP with Docker (Streamable HTTP) Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Run CloakBrowser MCP in Docker, exposing the Streamable HTTP server on port 3000. Includes health and readiness probes. ```bash docker run --rm --init -p 127.0.0.1:3000:3000 \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest \ --transport streamable-http --http-host 0.0.0.0 --http-port 3000 curl http://127.0.0.1:3000/healthz curl http://127.0.0.1:3000/readyz ``` -------------------------------- ### Configure Claude Desktop MCP Server Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md JSON configuration for Claude Desktop to connect to CloakBrowser MCP using the npm command. This should be added to 'claude_desktop_config.json'. ```json { "mcpServers": { "cloakbrowser": { "command": "npx", "args": ["-y", "cloakbrowser-mcp@latest"] } } } ``` -------------------------------- ### Check MCP Registry and Other Verifications Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/release.md Run the npm script to check the MCP registry and perform other release verifications. This command serves as a comprehensive tool for confirming successful publication across multiple platforms. ```bash npm run registry:check ``` -------------------------------- ### Security Tool Execution Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/AGENTS.md Commands to run security analysis tools, actionlint and zizmor. Ensure these pass after workflow or Docker changes. ```bash docker run --rm -v "$PWD:/repo" --workdir /repo docker.io/rhysd/actionlint:1.7.12@sha256:b1934ee5f1c509618f2508e6eb47ee0d3520686341fec936f3b79331f9315667 -color python3 -m pipx run zizmor --min-severity high . ``` -------------------------------- ### Run Integration Tests Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/testing.md Execute integration tests that use a fake upstream MCP child process to verify bridge functionality. ```bash npm run test:integration ``` -------------------------------- ### Run Full Local Check Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/contributor-guide.md Execute the comprehensive local check before committing code. This command ensures all basic checks pass. ```bash npm run check ``` -------------------------------- ### Run CloakBrowser MCP with Streamable HTTP Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/docker.md This command runs the CloakBrowser MCP Docker image and exposes its Streamable HTTP interface on localhost:3000. It also mounts the local 'artifacts' directory to '/data' for persistence. The container is configured to listen on all interfaces within the container for HTTP traffic. ```bash docker run --rm --init -p 127.0.0.1:3000:3000 \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest \ --transport streamable-http --http-host 0.0.0.0 --http-port 3000 ``` ```bash curl http://127.0.0.1:3000/healthz curl http://127.0.0.1:3000/readyz ``` -------------------------------- ### Run CloakBrowser MCP from Docker Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/README.md Pulls and runs the CloakBrowser MCP Docker image. Artifacts are written to /data by default. The image is based on the official Playwright MCP image. ```bash docker pull swimmwatch/cloakbrowser-mcp:latest ``` ```bash docker run --rm --init -i \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest ``` ```bash docker run --rm --init -p 127.0.0.1:3000:3000 \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest \ --transport streamable-http --http-host 0.0.0.0 --http-port 3000 ``` -------------------------------- ### Run Docker image with persistent artifacts Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/dockerhub-readme.md This command runs the container, mounting a local directory for persistent artifact storage. Use this for stdio MCP usage. ```bash docker run --rm --init -i \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:latest ``` -------------------------------- ### Pin CloakBrowser MCP Docker Release Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Pull and run a specific version of the CloakBrowser MCP Docker image for reproducible environments. ```bash docker pull swimmwatch/cloakbrowser-mcp:1.3.0 docker run --rm --init -i \ -v "$PWD/artifacts:/data" \ swimmwatch/cloakbrowser-mcp:1.3.0 ``` -------------------------------- ### npm Publish Command Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/release.md Use this command to publish npm packages. The `--access public` flag makes the package publicly available, and `--tag` specifies the release channel (e.g., 'latest' or 'next'). ```bash npm publish --access public --tag ``` -------------------------------- ### MCP client configuration for CloakBrowser Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/dockerhub-readme.md This JSON configuration defines how the MCP client connects to the CloakBrowser Docker instance. It specifies the Docker command and arguments to run the container. ```json { "mcpServers": { "cloakbrowser": { "command": "docker", "args": [ "run", "--rm", "--init", "-i", "-v", "/tmp/cloakbrowser-artifacts:/data", "swimmwatch/cloakbrowser-mcp:latest" ] } } } ``` -------------------------------- ### Perform Docker Parity Check Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/contributor-guide.md Run the heavier Docker parity check, which involves building Docker images and comparing bridge versions. Generates a parity report. ```bash npm run docker:build npm run bridge:compare -- cloakbrowser-mcp:dev --report bridge-parity-report.json ``` -------------------------------- ### Pull the latest Docker image Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/dockerhub-readme.md Use this command to download the latest version of the cloakbrowser-mcp Docker image from Docker Hub. ```bash docker pull swimmwatch/cloakbrowser-mcp:latest ``` -------------------------------- ### Generate Bridge Parity Report Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/tools.md Use this command to generate a machine-readable JSON report comparing the Playwright MCP and CloakBrowser bridge images. This is useful for CI builds to ensure parity. ```bash npm run bridge:compare -- cloakbrowser-mcp:dev --report bridge-parity-report.json ``` -------------------------------- ### Publish Streamable HTTP from Docker Securely Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/security.md When publishing Streamable HTTP from Docker, prefer binding to localhost to restrict access. Publishing directly to a public interface requires additional authentication and network controls. ```bash docker run -p 127.0.0.1:3000:3000 ... ``` -------------------------------- ### Check Registry Visibility Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/README.md Verifies the current official registry entry and GitHub MCP visibility. Use the strict version when GitHub MCP listing visibility is a required release gate. ```bash npm run registry:check ``` ```bash npm run registry:check:strict ``` -------------------------------- ### Check Docker Health and Readiness Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/README.md Probes the health and readiness endpoints of a running CloakBrowser MCP Docker container exposed via streamable-http transport. ```bash curl http://127.0.0.1:3000/healthz ``` ```bash curl http://127.0.0.1:3000/readyz ``` -------------------------------- ### Pin CloakBrowser MCP npm Release Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Specify a particular version of the CloakBrowser MCP npm package for reproducible builds. ```bash npx -y cloakbrowser-mcp@1.3.0 ``` -------------------------------- ### Configure Codex MCP Server Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md JSON snippet to configure Codex to use CloakBrowser MCP via npm. Defines the command and arguments for the MCP server. ```json { "command": "npx", "args": ["-y", "cloakbrowser-mcp@latest"] } ``` -------------------------------- ### Run Docker Container Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/development.md Runs a Docker container in detached mode, mounting the local artifacts directory to /data. ```bash docker run --rm --init -i -v "$PWD/artifacts:/data" cloakbrowser-mcp:dev ``` -------------------------------- ### Verify MCP Registry Entry Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/release.md Use curl to check the MCP registry for a specific server entry. This helps verify that the server metadata has been successfully published. ```bash curl "https://registry.modelcontextprotocol.io/v0.1/servers?search=io.github.swimmwatch/cloakbrowser-mcp" ``` -------------------------------- ### Compare Bridge Upstream Parity Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/testing.md Compare the upstream parity between the official Playwright MCP Docker image and the CloakBrowser bridge image. Generates a JSON report. ```bash npm run bridge:compare npm run bridge:compare -- cloakbrowser-mcp:dev --report bridge-parity-report.json ``` -------------------------------- ### Disable Browser Sandboxing in Docker Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/security.md Set this environment variable to false to enable Chromium sandboxing if your host and container runtime support it. This is a compatibility tradeoff for containerized environments. ```bash CLOAK_PLAYWRIGHT_MCP_NO_SANDBOX=false ``` -------------------------------- ### Pull the latest Docker image from GHCR Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/dockerhub-readme.md Alternative command to pull the latest Docker image from the GitHub Container Registry (GHCR). ```bash docker pull ghcr.io/swimmwatch/cloakbrowser-mcp:latest ``` -------------------------------- ### Configure Claude Code MCP Server Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/getting-started.md Text configuration for Claude Code to use CloakBrowser MCP via npm. Specify the command and arguments for the MCP server. ```text command: npx args: -y cloakbrowser-mcp@latest ``` -------------------------------- ### Run Upstream Version Check Locally Source: https://github.com/swimmwatch/cloakbrowser-mcp/blob/main/docs/release.md Execute the upstream version check command locally to monitor for new versions of Playwright MCP. This command helps in identifying updates to both the npm package and Docker image. ```bash npm run upstream:check ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.