Skip to main content
Glama
Playwright-Lighthouse MCP Server

Playwright-Lighthouse MCP Server

by kbyk004-diy

Playwright-Lighthouse MCP サーバー

PlaywrightとLighthouseを用いてウェブサイトのパフォーマンスを分析するMCPサーバー。モデルコンテキストプロトコル(MCP)を通じて、LLMはウェブサイトのパフォーマンス分析を実行できます。

特徴

  • Lighthouseによるパフォーマンス分析

  • スクリーンショットキャプチャ

Related MCP server: Playwright MCP Server

設定

前提条件

  • 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 for Desktop の設定例

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ライセンス - 詳細はライセンスを参照

Available Tools

2 tools
run-lighthouseC

Runs a Lighthouse performance analysis on the currently open page

Inputs: url (required), categories, maxItems.

take-screenshotC

Takes a screenshot of the currently open page

Inputs: url (required), fullPage.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    B3.1/5.0

    Scored across 2 tools

    Disambiguation5/5

    The two tools have clearly distinct purposes: one runs a performance analysis (run-lighthouse) and the other captures a visual snapshot (take-screenshot). There is no overlap in functionality, making it easy for an agent to select the correct tool based on the task.

    Naming Consistency5/5

    Both tools follow a consistent verb_noun pattern (run-lighthouse, take-screenshot), using hyphenated lowercase names. This predictable naming scheme enhances readability and usability for agents.

    Tool Count2/5

    With only two tools, the server feels under-scoped for a Playwright-Lighthouse integration, which typically involves more operations like navigation, interaction, or detailed reporting. This limited set may hinder complex workflows that agents might expect from such a domain.

    Completeness2/5

    The tool surface is severely incomplete for browser automation and performance testing. Missing are essential operations like opening/closing pages, interacting with elements, running audits with specific configurations, or exporting results, which are core to the domain and could lead to agent failures in broader tasks.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      D
      maintenance
      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.
      19
      Apache 2.0
    • A
      license
      B
      quality
      D
      maintenance
      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.
      31
      MIT
    • F
      license
      B
      quality
      D
      maintenance
      A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or visually-tuned models.
      24
      -
    • A
      license
      A
      quality
      D
      maintenance
      A Model Context Protocol server that provides browser automation capabilities using Playwright, enabling LLMs to interact with web pages through structured accessibility snapshots without requiring screenshots or visually-tuned models.
      22
      Apache 2.0