Google PageSpeed MCP: The Open-Source AI Performance Toolkit Built on Google Lighthouse
Modern websites are no longer optimized only for human visitors. Today, developers must build for search engines, AI agents, automated crawlers, LLM-powered assistants, accessibility tools, and performance scoring systems. Yet most teams still rely on scattered dashboards, manual Lighthouse reports, browser extensions, and complex JSON outputs that are difficult to analyze at scale.
Traditional performance workflows create several problems:
-
Developers run Lighthouse audits manually.
-
Core Web Vitals data is spread across multiple dashboards.
-
AI coding assistants cannot easily consume PageSpeed data.
-
Teams struggle to identify which CSS, JavaScript, or third-party scripts are actually hurting performance.
-
SEO, accessibility, and performance reports remain disconnected.
-
Performance regression monitoring becomes difficult across multiple pages.
Even though Google provides PageSpeed Insights and Lighthouse, extracting actionable insights from raw reports requires significant engineering effort.
This is exactly the problem that Google PageSpeed MCP aims to solve.
What Is Google PageSpeed MCP?
Google PageSpeed MCP is an open-source Model Context Protocol (MCP) server that transforms Google PageSpeed Insights and Lighthouse into AI-native developer tools.
Official platform:
Documentation:
The project exposes Google's performance ecosystem as structured MCP tools that work directly with AI clients like:
-
Kiro
-
Cursor
-
Claude Desktop
-
VS Code
-
Windsurf
-
Any MCP-compatible host
Instead of manually reading thousands of Lighthouse audit lines, developers can simply ask:
-
"Audit my website."
-
"Find unused JavaScript."
-
"Compare desktop and mobile performance."
-
"Explain poor CLS scores."
-
"Generate optimization recommendations."
-
"Analyze third-party impact."
The AI performs the analysis automatically.
Author and Developer
Google PageSpeed MCP is developed and maintained by Prashant Kumar, a full-stack engineer focused on developer tooling, AI workflows, SEO systems, and performance infrastructure.
The project is built on top of Google's official Lighthouse and PageSpeed ecosystem while exposing the data in a format optimized for modern AI-assisted development.
The Performance Problem Nobody Talks About
Most developers optimize only for Lighthouse scores.
However, real-world performance depends on much more:
Search Engines
Google evaluates:
-
Core Web Vitals
-
Mobile performance
-
Accessibility
-
SEO signals
-
Best practices
Official platform:
AI Systems
Modern AI systems increasingly need:
-
Structured page content
-
Predictable navigation
-
Semantic HTML
-
Machine-readable layouts
-
Metadata
-
Fast loading resources
Large language models and AI agents cannot effectively reason over poorly structured websites.
Users
Visitors care about:
-
Fast page loads
-
Stable layouts
-
Readability
-
Mobile usability
-
Accessibility
A beautiful website that loads slowly still loses users.
Why Existing Workflows Break
A typical performance audit looks like this:
Website
↓
PageSpeed Insights
↓
Massive Lighthouse JSON
↓
Developer manually reads report
↓
Find problems
↓
Fix issues
Problems:
-
Too much raw data.
-
Hard to automate.
-
Difficult for AI tools to understand.
-
Limited historical context.
-
Poor developer experience.
Google PageSpeed MCP introduces a better workflow.
Website
↓
Google Lighthouse API
↓
Google PageSpeed MCP
↓
Structured tools
↓
AI assistant
↓
Actionable recommendations
Built on Google's Official APIs
The project is powered by Google's official Lighthouse and PageSpeed APIs.
Google Lighthouse:
Google Lighthouse Documentation
Google PageSpeed API:
Google Cloud Console:
Because the MCP server uses Google's own infrastructure, the data remains consistent with the metrics developers already trust.
Core Features
Google PageSpeed MCP includes 27 tools across five categories.
Audit Tools
-
pagespeed_mobile_audit -
pagespeed_desktop_audit -
compare_mobile_desktop -
batch_pagespeed_audit
These tools generate complete Lighthouse reports for mobile and desktop environments.
Metrics Tools
-
get_core_web_vitals -
get_field_data -
get_lighthouse_scores
Metrics include:
-
FCP
-
LCP
-
CLS
-
INP
-
TBT
-
Speed Index
Analysis Tools
-
get_opportunities -
get_diagnostics -
get_resource_breakdown -
get_third_party_impact -
get_layout_analysis -
get_css_analysis -
get_javascript_analysis -
get_network_analysis
These tools explain:
-
Unused CSS.
-
Heavy JavaScript bundles.
-
Third-party script impact.
-
Render-blocking resources.
-
Layout shifts.
-
Network bottlenecks.
Report Tools
-
get_accessibility_report -
get_seo_report -
get_best_practices_report -
get_performance_summary
Perfect for:
-
SEO audits
-
AEO analysis
-
client reports
-
agency workflows
-
performance reviews
Advanced Tools
-
Competitor analysis
-
Site monitoring
-
Performance regression detection
-
Multi-format export
-
Health checks
-
Recommendation engines
Real Problems It Can Detect
Google PageSpeed MCP goes beyond Lighthouse scores.
Instead of saying:
Performance: 76
it can explain:
Unused CSS: 223 KB
Unused JavaScript: 391 KB
Third-party impact: 88.5%
Largest bundle: HugeIcons
Heavy scripts: Google Ads and GTM
This shifts performance optimization from guesswork to engineering.
Sample AI Prompt
A developer can simply ask:
Audit https://example.com and identify:
- Core Web Vitals issues
- Unused CSS
- Unused JavaScript
- Accessibility problems
- SEO weaknesses
- Third-party bottlenecks
Generate optimization recommendations.
The AI assistant automatically calls the appropriate MCP tools.
Sample MCP Configuration
{
"mcpServers": {
"google-pagespeed-mcp": {
"url": "https://googlepagespeedmcp.enally.in/api/mcp",
"headers": {
"x-api-key": "YOUR_GOOGLE_PAGESPEED_API_KEY"
}
}
}
}
How Google PageSpeed MCP Works
Internally, the flow looks like this:
AI Client
↓
MCP Server
↓
Google PageSpeed API
↓
Lighthouse Engine
↓
JSON Response
↓
Tool Layer
↓
AI Analysis
The AI never parses raw Lighthouse data manually.
Instead, the MCP server converts complex audits into structured outputs.
Example Raw Output
Core Web Vitals response:
{
"fcp": 2863,
"lcp": 3830,
"cls": 0.005,
"tbt": 121.5,
"speedIndex": 7545
}
JavaScript analysis:
{
"totalJsSize": 686517,
"unusedJsSize": 390759,
"longTaskCount": 8
}
CSS analysis:
{
"totalCssSize": 235582,
"unusedCssSize": 223000
}
Accessibility report:
{
"score": 97,
"issues": [
"Low contrast",
"Label mismatch"
]
}
How to Get a Google API Key
Google PageSpeed MCP requires an official Google API key.
Step 1
Open:
Step 2
Create a new project.
Step 3
Enable the PageSpeed Insights API.
API documentation:
Step 4
Navigate to:
APIs & Services → Credentials
Step 5
Create an API key.
Step 6
Paste the key into your MCP configuration.
Compatible AI Clients
The server works with:
-
Kiro
-
Cursor
-
Claude Desktop
-
VS Code
-
Windsurf
-
Custom MCP hosts
MCP itself is based on the Model Context Protocol specification.
Learn more:
Is Google PageSpeed MCP Legitimate?
Yes.
The project does not replace Google's PageSpeed infrastructure.
It acts as an orchestration layer on top of:
-
Google Lighthouse
-
Google PageSpeed API
-
Core Web Vitals
-
Chrome UX Report
Official references:
The metrics originate from Google's systems.
The MCP simply makes them easier for developers and AI assistants to consume.


SEO, AEO, GEO and AI Optimization
Google PageSpeed MCP is especially valuable for modern optimization strategies.
SEO (Search Engine Optimization)
Helps improve:
-
Core Web Vitals
-
Mobile speed
-
Crawlability
-
Technical SEO
-
Indexing quality
AEO (Answer Engine Optimization)
Improves:
-
Structured data readiness
-
FAQ compatibility
-
Semantic HTML
-
Content discoverability
GEO (Generative Engine Optimization)
Supports:
-
AI agent comprehension
-
LLM-friendly architecture
-
machine-readable content
-
contextual retrieval
SXO (Search Experience Optimization)
Combines:
-
Performance
-
UX
-
Accessibility
-
Search visibility
Agentic Browsing and the Future
Modern PageSpeed reports now include an additional category called:
Agentic Browsing
This reflects a broader shift in the web ecosystem.
Websites are increasingly consumed by:
-
AI agents
-
autonomous browsers
-
copilots
-
search assistants
-
reasoning systems
Future-ready websites will need:
-
clean HTML
-
semantic structure
-
stable layouts
-
predictable navigation
-
fast responses
Google PageSpeed MCP prepares teams for that transition.
Who Should Use It?
This project is valuable for:
-
SEO agencies
-
freelancers
-
SaaS founders
-
startup teams
-
product engineers
-
DevOps teams
-
performance consultants
-
technical writers
-
AI developers
Especially if you manage:
-
multiple websites
-
client audits
-
performance reports
-
enterprise dashboards
-
SEO workflows
Bonus Use Cases
Competitor Analysis
Compare:
Your Website
vs
Competitor Website
and detect:
-
speed gaps
-
bundle differences
-
SEO weaknesses
-
third-party overhead
Automated Reports
Generate:
-
Markdown reports
-
JSON exports
-
HTML summaries
CI/CD Monitoring
Run audits:
-
before deployment
-
after deployment
-
on schedule
-
during performance regressions
AI Coding Workflows
Ask:
Why is my CLS poor?
Which script blocks rendering?
How much JavaScript can I remove?
Which resources hurt mobile performance?
The AI assistant answers using structured metrics.
Questions to Ask Yourself Before Optimizing
-
Is my website fast for real users or only in Lighthouse?
-
Which scripts consume the most bandwidth?
-
How much CSS is never used?
-
Which third-party tools hurt performance?
-
Are accessibility issues hurting conversions?
-
Can AI systems understand my website?
-
Am I optimizing for search engines or for users?
-
Is my site prepared for agentic browsing?
-
Can my team automate performance analysis?
-
What happens when traffic doubles?



