Skip to content

KingOfKalk/playwright-mcp-container-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Playwright-MCP Container Demo

This is a demonstration on how to run Playwright-MCP in a container environment like Docker and Podman.

How to run

  1. Spin up the containers.
podman compose up -d
  1. Open browser: http://localhost:6274
  2. Configure the inspector:
    1. Transport Type: Streamable HTTP
    2. URL: http://playwright:8931/mcp
  3. Click on "Connect"
  4. Now you should be connected an click "List Tools".

Claude Code

Claude Code supports streamable HTTP MCP as well. See anthropics/claude-code#1387

claude mcp add --transport http playwright http://playwright:8931/mcp

Development Containers

Add the network option as a runArgs, so the DevContainer can also make use of Playwright MCP.

{
  "runArgs": ["--network=playwright-mcp-container-demo_network"]
}

Hints

  • Playwright's default user agent will be blocked by many sites.
  • User podman compose logs -f to check if everything is okay.
  • See demo.rest for a REST client friendly way to interact with the MCP server.

Links

About

A demonstration on how to host playwright-mcp in a container environment.

Topics

Resources

Stars

Watchers

Forks