Get the FREE Ultimate OpenClaw Setup Guide →

playwright-sse

playwright/mcpをsseで外部から触るためのやつ

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio torohash-playwright-sse-mcp-server docker compose up --build \
  --env PORT="Port the server will listen on (default 3002)"

How to use

This MCP server exposes Playwright functionality over Server-Sent Events (SSE) so MCP clients can drive browser automation via Playwright inside a containerized environment. The project runs using Docker Compose, building and starting the service on port 3002 by default. You can connect MCP clients on the same Docker network via the container name and port, for example http://playwright-sse-mcp-server:3002/sse, or access it from the host at http://localhost:3002/sse if you’ve published that port. The server communicates with MCP clients using SSE, allowing clients to request browser actions, capture results, and chain tasks through the MCP protocol.

To customize connections from Roo Code or development containers, the README provides examples showing how to configure the mcpServers in your MCP settings JSON, either pointing to the container URL within a Docker network or using host-based URLs when running containers externally.

How to install

Prerequisites:

  • Docker Engine installed
  • docker-compose (v1.27+ or as required by your environment)
  • (Optional) Docker network named mcp-network if you plan to run with this network specifically

Installation steps:

  1. Create the external MCP network (if not already present): docker network create mcp-network

  2. Clone or download the repository to your desired directory: git clone https://github.com/torohash/playwright-sse-mcp-server.git /path/to/installation

  3. Navigate to the project root and start the server: cd /path/to/installation docker compose up --build

  4. Verify the server starts and prints that it is listening on port 3002 (or the port you set via PORT): Server is running on port 3002

Optional: customize port by setting PORT before starting an instance: PORT=4000 docker compose up --build Server is running on port 4000

Additional notes

Notes and tips:

  • The server uses SSE for MCP communication; ensure MCP clients are compatible with SSE endpoints at /sse.
  • If you want to connect Roo Code from another container on the same Docker network, use the container name playwright-sse-mcp-server as the host and port 3002 (or your configured port).
  • When connecting from development containers that are not on the same network, you may need to use host networking or host.docker.internal (on Docker Desktop) or the Docker bridge gateway IP (e.g., 172.17.0.1) in your MCP configuration.
  • The README mentions a number of connection examples for both in-network and host-network scenarios; adapt the mcpServers URL accordingly in your Roo Code or MCP client configuration.
  • This server runs Playwright in headless mode and communicates with clients via SSE; ensure sufficient resources in your Docker environment for browser automation (CPU, memory).
  • If you modify or extend the setup, consider exposing additional environment variables or docker-compose overrides to fine-tune timeouts, concurrency, or the default port.

Related MCP Servers

Sponsor this space

Reach thousands of developers