mcp-server-playwright logo

mcp-server-playwright

by hdcola

This project is an experimental server that uses Playwright to manipulate a browser through MCP. It aims to implement a feature to control the browser using AI.

View on GitHub

Last updated: N/A

What is mcp-server-playwright?

mcp-server-playwright is an experimental server that allows controlling a browser through the Message Control Protocol (MCP) using the Playwright framework. It provides tools to automate browser actions and aims to enable AI-driven browser control.

How to use mcp-server-playwright?

  1. Install dependencies (bun and pnpm). 2. Run pnpm install. 3. Configure the MCP server in your MCP configuration file with the provided example, ensuring to set the correct paths for Chrome and the user data directory.

Key features of mcp-server-playwright

  • Open Browser

  • Close Page

  • Close Browser

  • Navigate to Page

  • Open New Page

  • Get Page Content

Use cases of mcp-server-playwright

  • Automated web scraping

  • AI-driven browser testing

  • Programmatic browser interaction

  • Web automation tasks

FAQ from mcp-server-playwright

What is MCP?

MCP stands for Message Control Protocol, a protocol for controlling applications.

What is Playwright?

Playwright is a Node.js library that automates Chromium, Firefox and WebKit with a single API.

What dependencies are required?

bun and pnpm are required to install and run the project.

How do I configure the Chrome path?

Set the CHROME_PATH environment variable in the MCP configuration to the path of your Chrome executable.

How do I configure the user data directory?

Set the MUSER_DATA_DIR environment variable in the MCP configuration to the path of your Chrome user data directory.