Playwright-Lighthouse MCP Server
Runs performance analysis on websites, providing scores for performance, accessibility, best-practices, SEO, and PWA categories, along with specific improvement recommendations
Analyzes Progressive Web App compliance as one of the optional categories in the Lighthouse performance analysis
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Playwright-Lighthouse MCP Serveranalyze performance of https://example.com with categories performance, seo, and accessibility"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Playwright-Lighthouse MCP Server
A MCP server that analyzes web site performance using Playwright and Lighthouse. Through the Model Context Protocol (MCP), LLMs can perform web site performance analysis.
Features
Performance analysis with Lighthouse
Screenshot capture
Related MCP server: Playwright MCP Server
Setup
Prerequisites
Node.js 18 or higher
npm
Installation
# 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 buildUsage
Debugging MCP Server
npm run inspectorIntegration with MCP Clients
This server is designed to be used with clients that support the Model Context Protocol (MCP). For example, it can be integrated with Claude for Desktop.
Configuration Example for Claude for Desktop
Add the following to the Claude for Desktop configuration file (~/Library/Application Support/Claude/claude_desktop_config.json):
{
"mcpServers": {
"playwright-lighthouse": {
"command": "node",
"args": [
"/path-to/playwright-lighthouse-mcp/build/index.js"
]
}
}
}Available Tools
1. run-lighthouse
Runs a Lighthouse performance analysis on the currently open page.
Parameters:
url: The URL of the website you want to analyzecategories: Array of categories to analyze (default: ["performance"])Available categories: "performance", "accessibility", "best-practices", "seo", "pwa"
maxItems: Maximum number of improvement items to display for each category (default: 3, max: 5)
2. take-screenshot
Takes a screenshot of the currently open page.
Parameters:
url: The URL of the website you want to capturefullPage: If true, captures a screenshot of the entire page (default: false)
Output Format
The analysis results include:
Overall scores for each selected category with color indicators
Key improvement areas grouped by category
Path to the saved report file
License
MIT License - see LICENSE for details
Available Tools
2 toolsrun-lighthouseC
Runs a Lighthouse performance analysis on the currently open page
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the website you want to analyze | |
| categories | No | Categories to analyze (performance, accessibility, best-practices, seo, pwa) | |
| maxItems | No | Maximum number of improvement items to display for each category |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description carries full burden for behavioral disclosure. While it states what the tool does, it lacks critical behavioral information: whether this requires network access, how long the analysis might take, what format the results come in, whether it modifies the page, or any error conditions. The description is insufficient for a tool that performs external analysis.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that states the core functionality without unnecessary words. It's appropriately sized for the tool's purpose and gets straight to the point.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a performance analysis tool with no annotations and no output schema, the description is incomplete. It doesn't explain what kind of results to expect, how they're formatted, whether the analysis is synchronous or asynchronous, or any limitations. The agent would be operating with significant uncertainty about the tool's behavior and outputs.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
With 100% schema description coverage, the schema already documents all three parameters thoroughly. The description adds no additional parameter semantics beyond what's in the schema. The baseline score of 3 reflects adequate parameter documentation through the schema alone.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('Runs a Lighthouse performance analysis') and the target ('on the currently open page'), providing a specific verb+resource combination. However, it doesn't explicitly distinguish this tool from its sibling 'take-screenshot' beyond the different functionality implied by the names.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives, nor does it mention any prerequisites or context for usage. There's no comparison with the sibling 'take-screenshot' tool or indication of when performance analysis versus screenshot capture would be appropriate.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
take-screenshotC
Takes a screenshot of the currently open page
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL of the website you want to capture | |
| fullPage | No | If true, captures a screenshot of the entire page |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden. It states the action but lacks behavioral details: it doesn't mention output format (e.g., image type, storage location), error conditions (e.g., invalid URL, timeout), or side effects (e.g., whether it opens a browser). For a tool with no annotation coverage, this is a significant gap in transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is a single, efficient sentence that directly states the tool's purpose without unnecessary words. It is front-loaded and appropriately sized, earning its place with zero waste.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given the tool's complexity (involves browser interaction and image capture), lack of annotations, and no output schema, the description is incomplete. It doesn't cover behavioral aspects like output format, error handling, or dependencies, which are crucial for an AI agent to use it correctly. The description should do more to compensate for these gaps.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
Schema description coverage is 100%, so the schema already documents both parameters ('url' and 'fullPage') with clear descriptions. The description adds no additional parameter semantics beyond what's in the schema, such as explaining 'currently open page' in relation to the 'url' parameter. Baseline 3 is appropriate when the schema does the heavy lifting.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the action ('takes a screenshot') and target ('currently open page'), providing a specific verb+resource. However, it doesn't explicitly differentiate from the sibling tool 'run-lighthouse', which might also involve page analysis but serves a different purpose. The description is unambiguous about what the tool does.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description provides no guidance on when to use this tool versus alternatives like 'run-lighthouse'. It mentions 'currently open page' but doesn't specify prerequisites (e.g., whether a browser must be active) or exclusions. Usage context is implied but not explicit, leaving gaps for an AI agent to infer.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
TDQS
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
SEO MCP server: crawl your site, find AI-visibility gaps, and ship the fix from your coding agent.
A Model Context Protocol server for Wix AI tools
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
MCP server providing access to the Scorecard API to evaluate and optimize LLM systems.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA 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.18Apache 2.0
- AlicenseBqualityDmaintenanceA 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.3118,122MIT
- AlicenseBqualityDmaintenanceA 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.245,881,527Apache 2.0
- AlicenseAqualityCmaintenanceA 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.225,881,527Apache 2.0
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
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