Playwright MCP服务器

一个基于Playwright的自动化测试服务器,提供前端和后端的安装与运行指南。

  • by DANGKHOIk22
  • Python
  • 本地部署
  • 更新于
在 GitHub 查看 DANGKHOIk22/MCP-based-Test-Automation-Agent

使用说明

项目设置指南

先决条件

MCP剧作家

您可以使用npm、mcp-get或Smithery安装该包:

  1. 使用npm:
    npm install -g @executeautomation/playwright-mcp-server
    
  2. 使用mcp get:
    npx @michaellatman/mcp-get@latest install @executeautomation/playwright-mcp-server
    
  3. 使用Smithery
    npx @smithery/cli install @executeautomation/playwright-mcp-server --client claude
    

前端

  1. 下载 node_modules.zip,放置提取的 node_modules 内部文件夹 frontend_ts,并将其解压缩。
  2. 导航到前端文件夹:
    cd frontend_ts
    
  3. 构建项目:
    npm run dist
    
  4. 启动开发服务器:
    npm run dev
    

后端

  1. 创建并激活虚拟环境:
    python -m venv venv
    source venv/bin/activate   # On Linux/Mac
    .\venv\Scripts\activate      # On Windows
    
  2. 安装依赖项:
    pip install -r ./backend/requirements.txt
    
  3. 运行后端服务器:
    python ./backend/app.py
    
  4. (可选)完成后停用虚拟环境:
    deactivate