Cover image
Try Now
2025-04-14

3 years

Works with Finder

0

Github Watches

0

Github Forks

0

Github Stars

MCP Playwright Server

A custom Playwright MCP (Multi-Client Protocol) server implementation that enables distributed test execution and browser automation across multiple clients.

Features

  • Distributed test execution across multiple clients
  • Browser automation using Playwright
  • Custom tool implementations for various browser operations
  • Request/Response handling for MCP protocol
  • Support for multiple browser contexts and pages

Project Structure

├── mcp-playwright/
│   ├── src/
│   │   ├── tools/            # Tool implementations
│   │   │   ├── api/          # API-related tools
│   │   │   ├── browser/      # Browser automation tools
│   │   │   └── codegen/      # Code generation tools
│   │   ├── index.ts          # Main entry point
│   │   ├── requestHandler.ts  # MCP request handling
│   │   ├── toolHandler.ts     # Tool management
│   │   └── types.ts          # Type definitions
│   └── __tests__/            # Test files
├── package.json
└── tsconfig.json

Installation

  1. Clone the repository:
git clone https://github.com/DreViz/Playwrite_MCP.git
cd Playwrite_MCP
  1. Install dependencies:
npm install

Usage

To start the MCP server:

npm run mcp

This will start the Playwright MCP server that can handle requests from multiple clients.

Tools

The server implements various tools for browser automation:

  • Browser Tools:

    • Navigation
    • Screenshots
    • Console logging
    • User agent management
    • Page interactions
  • API Tools:

    • Request handling
    • Response processing
  • CodeGen Tools:

    • Test recording
    • Code generation

Development

Prerequisites

  • Node.js (v14 or higher)
  • npm (v6 or higher)

Setup Development Environment

  1. Install development dependencies:
npm install
  1. Run tests:
npm test

Docker Support

The project includes Docker support for containerized execution:

  1. Build the image:
docker build -t mcp-playwright .
  1. Run the container:
docker run -p 3000:3000 mcp-playwright

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • Byaidu
  • PDF科学纸翻译带有保留格式的pdf -基于ai完整保留排版的pdf文档全文双语翻译

  • rulego
  • ⛓️Rulego是一种轻巧,高性能,嵌入式,下一代组件编排规则引擎框架。

  • sigoden
  • 使用普通的bash/javascript/python函数轻松创建LLM工具和代理。

  • hkr04
  • 轻巧的C ++ MCP(模型上下文协议)SDK

  • RockChinQ
  • 😎简单易用、🧩丰富生态 -大模型原生即时通信机器人平台| 适配QQ / 微信(企业微信、个人微信) /飞书 /钉钉 / discord / telegram / slack等平台| 支持chatgpt,deepseek,dify,claude,基于LLM的即时消息机器人平台,支持Discord,Telegram,微信,Lark,Dingtalk,QQ,Slack

  • dmayboroda
  • 带有可配置容器的本地对话抹布

  • paulwing
  • 使用MCP服务创建的测试存储库

    Reviews

    2 (1)
    Avatar
    user_WqoXqPoU
    2025-04-24

    As a dedicated user of Playwrite_MCP by DreViz, I must say this application is superb for content creation. The intuitive interface and seamless functionality make writing a pleasure. Highly recommend it to anyone needing a reliable tool for their writing projects!