Skip to main content
Glama

Playwright-Lighthouse MCP Server

by kbyk004-diy

Playwright-Lighthouse MCP 服务器

使用 Playwright 和 Lighthouse 分析网站性能的 MCP 服务器。通过模型上下文协议 (MCP),LLM 可以执行网站性能分析。

特征

  • 使用 Lighthouse 进行性能分析
  • 屏幕截图

设置

先决条件

  • Node.js 18 或更高版本
  • npm

安装

# Clone the repository git clone https://github.com/kbyk004/playwright-lighthouse-mcp.git cd playwright-lighthouse-mcp # Install dependencies npm install npx playwright install # Build npm run build

用法

调试 MCP 服务器

npm run inspector

与 MCP 客户端集成

此服务器旨在与支持模型上下文协议 (MCP) 的客户端配合使用。例如,它可以与 Claude for Desktop 集成。

Claude 桌面版配置示例

将以下内容添加到 Claude for Desktop 配置文件( ~/Library/Application Support/Claude/claude_desktop_config.json ):

{ "mcpServers": { "playwright-lighthouse": { "command": "node", "args": [ "/path-to/playwright-lighthouse-mcp/build/index.js" ] } } }

可用工具

1. 运行灯塔

对当前打开的页面运行 Lighthouse 性能分析。

参数:

  • url :要分析的网站的 URL
  • categories :要分析的类别数组(默认值:[“performance”])
    • 可用类别:“性能”、“可访问性”、“最佳实践”、“SEO”、“PWA”
  • maxItems :每个类别显示的最大改进项目数(默认值:3,最大值:5)

2. 截屏

截取当前打开的页面的屏幕截图。

参数:

  • url :要捕获的网站的 URL
  • fullPage :如果为 true,则捕获整个页面的屏幕截图(默认值:false)

输出格式

分析结果包括:

  • 每个选定类别的总体得分,带有颜色指示器
  • 按类别分组的关键改进领域
  • 保存的报告文件的路径

执照

MIT 许可证 - 详情请参阅许可证

Install Server
A
security – no known vulnerabilities
A
license - permissive license
A
quality - confirmed to work

local-only server

The server can only run on the client's local machine because it depends on local resources.

使用 Playwright 和 Lighthouse 分析网站性能的服务器,允许 LLM 通过模型上下文协议执行网络性能分析。

  1. 特征
    1. 设置
      1. 先决条件
      2. 安装
    2. 用法
      1. 调试 MCP 服务器
      2. 与 MCP 客户端集成
    3. 可用工具
      1. 1. 运行灯塔
      2. 2. 截屏
    4. 输出格式
      1. 执照

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that provides browser automation capabilities using Playwright. This server enables LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
          Last updated -
          13
          11,273
          4,458
          TypeScript
          MIT License
          • Linux
          • Apple
        • -
          security
          A
          license
          -
          quality
          A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, and execute JavaScript in a real browser environment.
          Last updated -
          15
          Python
          Apache 2.0
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages, take screenshots, generate test code, scrape web content, and execute JavaScript in real browser environments.
          Last updated -
          31
          11,273
          TypeScript
          MIT License
          • Linux
          • Apple
        • A
          security
          A
          license
          A
          quality
          A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without needing screenshots or visually-tuned models.
          Last updated -
          24
          240,980
          TypeScript
          Apache 2.0
          • Apple
          • Linux

        View all related MCP servers

        MCP directory API

        We provide all the information about MCP servers via our MCP API.

        curl -X GET 'https://glama.ai/api/mcp/v1/servers/kbyk004-diy/playwright-lighthouse-mcp'

        If you have feedback or need assistance with the MCP directory API, please join our Discord server