Acts as a bridge between AI models and Google's PageSpeed Insights API, enabling detailed performance analysis of websites.
A Model Context Protocol (MCP) server that extends AI assistant capabilities with PageSpeed Insights functionality. This server acts as a bridge between AI models and Google's PageSpeed Insights API, enabling detailed performance analysis of websites.
The PageSpeed MCP server is designed to enhance AI assistants' capabilities by allowing them to perform comprehensive web performance analysis. When integrated, AI models can request and interpret detailed performance metrics, Core Web Vitals, and other critical web performance data for any given URL.
To install PageSpeed Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install mcp-pagespeed-server --client claude
npm install pagespeed-mcp-server
Add the PageSpeed MCP to your AI assistant's(claude in this case) configuration file:
{ "pagespeed": { "command": "node", "args": ["path/to/mcp-pagespeed-server/dist/index.js"] } }
The MCP server provides detailed JSON responses including:
{ "lighthouseResult": { "categories": { "performance": { /* Performance metrics */ }, "accessibility": { /* Accessibility results */ }, "best-practices": { /* Best practices audit */ }, "seo": { /* SEO findings */ } }, "audits": { // Detailed audit results for each category }, "timing": { // Performance timing data }, "stackPacks": { // Technology-specific advice } } }
You can customize the PageSpeed analysis by providing additional parameters:
{ "strategy": "mobile", // or "desktop" "category": ["performance", "accessibility", "best-practices", "seo"], "locale": "en", "threshold": { "performance": 90, "accessibility": 100, "best-practices": 90, "seo": 90 } }
The MCP server includes robust error handling for:
const PageSpeedMCP = require('pagespeed-mcp-server'); const mcp = new PageSpeedMCP(); await mcp.analyze('https://example.com');
const results = await mcp.analyze('https://example.com', { strategy: 'mobile', categories: ['performance', 'accessibility'], locale: 'en-US' });
Connection Timeouts
API Rate Limiting
Memory Issues
git clone https://github.com/phialsbasement/mcp-pagespeed-server cd mcp-pagespeed-server npm install npm run build
npm run test
MIT License - See LICENSE file for details
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!