Playwright-Lighthouse MCP Server logo

Playwright-Lighthouse MCP Server

by kbyk004

A MCP server that analyzes web site performance using Playwright and Lighthouse. It allows LLMs to perform web site performance analysis through the Model Context Protocol (MCP).

View on GitHub

Last updated: N/A

What is Playwright-Lighthouse MCP Server?

This is a Model Context Protocol (MCP) server that leverages Playwright and Lighthouse to analyze website performance, enabling LLMs to interact with and understand web performance metrics.

How to use Playwright-Lighthouse MCP Server?

First, clone the repository and install the dependencies using npm. Then, build the project. To debug the MCP server, use npm run inspector. To integrate with MCP clients like Claude for Desktop, configure the client to point to the server's entry point.

Key features of Playwright-Lighthouse MCP Server

  • Performance analysis with Lighthouse

  • Screenshot capture

  • Integration with MCP clients

  • Configurable analysis categories

  • Detailed output format with scores and improvement areas

Use cases of Playwright-Lighthouse MCP Server

  • Automated website performance monitoring

  • Integration with LLMs for intelligent web analysis

  • Identifying performance bottlenecks in web applications

  • Generating performance reports for developers

  • Visualizing website performance through screenshots

FAQ from Playwright-Lighthouse MCP Server

What is MCP?

MCP stands for Model Context Protocol. It facilitates communication between LLMs and external tools like this server.

What versions of Node.js are supported?

Node.js 18 or higher is required.

How do I configure the categories for Lighthouse analysis?

You can specify the categories in the run-lighthouse tool's parameters. Available categories are 'performance', 'accessibility', 'best-practices', 'seo', and 'pwa'.

Can I customize the number of improvement items displayed?

Yes, the maxItems parameter in the run-lighthouse tool allows you to control the maximum number of improvement items to display for each category.

Where are the Lighthouse reports saved?

The path to the saved report file is included in the analysis results output.