Cover image
Try Now
2025-01-30

Tirez les données PagesPeed à l'aide de ce serveur MCP.

3 years

Works with Finder

1

Github Watches

2

Github Forks

4

Github Stars

PageSpeed MCP Server

smithery badge

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.

Overview

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.

Installation

Installing via Smithery

To install PageSpeed Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install mcp-pagespeed-server --client claude

Manual Installation

npm install pagespeed-mcp-server

Configuration

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"]
    }
}

Detailed Capabilities

Performance Metrics Analysis

  • First Contentful Paint (FCP)
  • Largest Contentful Paint (LCP)
  • Time to Interactive (TTI)
  • Total Blocking Time (TBT)
  • Cumulative Layout Shift (CLS)
  • Speed Index
  • Time to First Byte (TTFB)

Best Practices Assessment

  • HTTPS usage
  • JavaScript error monitoring
  • Browser console warnings
  • Deprecated API usage
  • Image aspect ratio analysis
  • Link security checks

SEO Analysis

  • Meta description validation
  • Robots.txt validation
  • Structured data validation
  • Crawlable links verification
  • Meta tags assessment
  • Mobile friendliness

Accessibility Audits

  • ARIA attribute validation
  • Color contrast checking
  • Heading hierarchy analysis
  • Alt text verification
  • Focus management assessment
  • Keyboard navigation testing

Resource Optimization

  • Image optimization suggestions
  • JavaScript bundling analysis
  • CSS optimization recommendations
  • Cache policy validation
  • Resource minification checks
  • Render-blocking resource identification

API Response Structure

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
        }
    }
}

Advanced Usage

Custom Configuration

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
    }
}

Error Handling

The MCP server includes robust error handling for:

  • Invalid URLs
  • Network timeouts
  • API rate limiting
  • Invalid parameters
  • Server-side errors

Requirements

Network Requirements

  • Stable internet connection
  • Access to Google's PageSpeed Insights API

Platform Support

  • Windows (x64, x86)
  • Linux (x64)
  • macOS (x64, arm64)

Integration Examples

Basic Integration

const PageSpeedMCP = require('pagespeed-mcp-server');
const mcp = new PageSpeedMCP();

await mcp.analyze('https://example.com');

With Custom Options

const results = await mcp.analyze('https://example.com', {
    strategy: 'mobile',
    categories: ['performance', 'accessibility'],
    locale: 'en-US'
});

Troubleshooting

Common Issues

  1. Connection Timeouts

    • Check internet connectivity
  2. API Rate Limiting

    • Use API key for higher limits
  3. Memory Issues

    • Adjust Node.js memory limits

Development

Building from Source

git clone https://github.com/phialsbasement/mcp-pagespeed-server
cd mcp-pagespeed-server
npm install
npm run build

Running Tests

npm run test

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a Pull Request

Support

Getting Help

  • GitHub Issues: Report bugs and feature requests

License

MIT License - See LICENSE file for details

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • https://duotify.com
  • Professional code reviewer for a unique language, friendly and helpful.

  • Andris Teikmanis
  • Latvian GPT assistant for developing GPT applications

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Navid RezaeiSarchoghaei
  • Professional Flask/SQLAlchemy code guide. Follow: https://x.com/navid_re

  • https://cantaspinar.com
  • Summarizes videos and answers related questions.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • apappascs
  • Découvrez la collection la plus complète et la plus à jour de serveurs MCP sur le marché. Ce référentiel sert de centre centralisé, offrant un vaste catalogue de serveurs MCP open-source et propriétaires, avec des fonctionnalités, des liens de documentation et des contributeurs.

  • ShrimpingIt
  • Manipulation basée sur Micropython I2C de l'exposition GPIO de la série MCP, dérivée d'Adafruit_MCP230XX

  • OffchainLabs
  • Aller la mise en œuvre de la preuve de la participation Ethereum

  • huahuayu
  • Une passerelle API unifiée pour intégrer plusieurs API d'explorateur de blockchain de type étherscan avec la prise en charge du protocole de contexte modèle (MCP) pour les assistants d'IA.

  • deemkeen
  • Contrôlez votre MBOT2 avec un combo d'alimentation: MQTT + MCP + LLM

    Reviews

    1 (1)
    Avatar
    user_qmnYSTLU
    2025-04-16

    As a dedicated user of Pagespeed-MCP-Server, I can't recommend this tool enough! It significantly enhances server performance and optimizes page speeds effectively. PhialsBasement has done an excellent job with this project, ensuring smooth and efficient operations. Check it out on GitHub and see the improvements yourself!