- Home
- MCP servers
- Playwright-Lighthouse
Playwright-Lighthouse
- typescript
5
GitHub Stars
typescript
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"kbyk004-diy-playwright-lighthouse-mcp": {
"command": "node",
"args": [
"/path-to/playwright-lighthouse-mcp/build/index.js"
]
}
}
}This MCP Server analyzes web site performance using Playwright and Lighthouse, enabling language models to assess pages via the Model Context Protocol. It captures screenshots and runs Lighthouse analyses to produce actionable performance insights that you can query through MCP clients.
How to use
You connect an MCP client to this server to perform performance analyses and capture screenshots of web pages. Use the available tools to run Lighthouse categories on a given URL and to take full-page screenshots. The server is designed to work with MCP clients that support the MCP protocol, enabling you to request analyses, receive structured reports, and access saved results for comparisons and reporting.
How to install
Prerequisites: Node.js 18 or higher and 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
Additional setup and configuration
Debugging the MCP Server can be done with the inspector utility to troubleshoot runtime behavior.
npm run inspector
Configuration for MCP clients
The server can be wired into an MCP client by using a stdio-based configuration that runs the server as a local process. The following example shows how to configure a client (e.g., Claude for Desktop) to launch the MCP server from the local build.
{
"mcpServers": {
"playwright-lighthouse": {
"command": "node",
"args": [
"/path-to/playwright-lighthouse-mcp/build/index.js"
]
}
}
}
Notes and tips
If you plan to run the server locally for development, ensure you complete the build step before starting the server, and use the inspector to troubleshoot any startup issues. The server exposes two main tools for MCP clients: run-lighthouse to perform a Lighthouse analysis and take-screenshot to capture the current page view.
Available tools
run-lighthouse
Runs a Lighthouse performance analysis on the currently open page, with configurable categories and maximum items per category.
take-screenshot
Captures a screenshot of the currently open page, with an option for full-page capture.