logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

mcp-performance-auditor

Leverage Google's PageSpeed Insights engine via an MCP server to furnish deep diagnostics and actionable optimization directives for web page performance characteristics.

Author

mcp-performance-auditor logo

enemyrr

MIT License

Quick Info

GitHub GitHub Stars 8
NPM Weekly Downloads 0
Tools 1
Last Updated 2026-02-19

Tags

pagespeedperformancewebpagepagespeed insightspagespeed analyzeserver pagespeed

@enemyrr/mcp-server-pagespeed

An infrastructure component utilizing the Model Context Protocol for interfacing with Google PageSpeed Insights analysis capabilities. This standardized server allows automated agents to assess the operational efficiency of digital content.

Server Pagespeed MCP server

Deployment Guide for Cursor IDE Integration

  1. Acquire and compile the source code repository: bash git clone https://github.com/enemyrr/mcp-server-pagespeed.git cd mcp-server-pagespeed npm install npm run build

  2. Integrate the service endpoint within the Cursor IDE configuration:

  3. Access the Command Palette (invoke with Cmd/Ctrl + Shift + P)
  4. Locate and select the option labeled "MCP: Add Server"
  5. Populate the required parameters:
    • Name: pagespeed
    • Type: command
    • Command: node /absolute/path/to/mcp-server-pagespeed/build/index.js

Crucial Instruction: Ensure /absolute/path/to/ is substituted with the precise directory where the project was cloned and the compilation artifact generated.

Execution via Command Line Interface

Initiate operation directly using:

bash npx mcp-server-pagespeed

Exposed Functionality

analyze_pagespeed

Executes a comprehensive performance evaluation of a specified Uniform Resource Locator (URL) utilizing the PageSpeed Insights service layer.

typescript use_mcp_tool({ server_name: "pagespeed", tool_name: "analyze_pagespeed", arguments: { url: "https://example.com" } });

Expected output yields: - A consolidated efficiency rating (scaled from 0 to 100) - Core metrics pertaining to user experience during initial load: - First Contentful Paint duration - First Input Delay measurement - A curated list of the top five identified areas for enhancement, detailed by: - Descriptive title - Explanatory summary - Quantifiable impact potential - Current measured state

Core Capabilities

  • On-demand, high-fidelity assessment of web asset loading performance
  • Granular reporting on user-centric loading experience statistics
  • Prioritized, actionable remediation guidance
  • Robust exception handling mechanisms
  • Native compatibility with TypeScript environments

Failure Modalities Management

The operational endpoint furnishes specific diagnostics for common issues, including: - Malformed or non-existent URL inputs - Failures encountered during external API communication - Network connectivity interruptions - Incorrect invocation signatures for the utility function

Community Involvement

Contributions from the developer community are highly valued. Submissions are encouraged via Pull Requests directed toward https://github.com/enemyrr/mcp-server-pagespeed

Licensing

Proprietary License: MIT

WIKIPEDIA: XMLHttpRequest (XHR) represents a standardized Application Programming Interface, structured as a JavaScript object, whose methods facilitate the transmission of Hypertext Transfer Protocol requests from a client-side web browser environment to a designated server. These methods empower browser-resident applications to dispatch inquiries to the backend services subsequent to the initial page rendering, enabling the retrieval of subsequent data. XMLHttpRequest serves as a foundational element of the Asynchronous JavaScript and XML (Ajax) programming paradigm. Preceding Ajax, the fundamental methods for server interaction were primarily reliant upon hyperlink navigation and HTML form submissions, processes that frequently necessitated a full page refresh.

== Chronology == The fundamental concept underpinning XMLHttpRequest was first conceived around the year 2000 by the engineering team responsible for Microsoft Outlook development. This concept was subsequently realized and integrated into the Internet Explorer 5 browser release (1999). Notwithstanding this early adoption, the initial programmatic syntax did not employ the standard 'XMLHttpRequest' identifier. Instead, developers utilized COM object instantiation through 'ActiveXObject("Msxml2.XMLHTTP")' and 'ActiveXObject("Microsoft.XMLHTTP")'. By the release of Internet Explorer 7 (2006), cross-browser support for the standardized XMLHttpRequest identifier had become universal. The XMLHttpRequest identifier has now attained the status of the established convention across all predominant browser rendering engines, including Mozilla's Gecko (adopted in 2002), Safari version 1.2 (2004), and Opera version 8.0 (2005).

=== Formal Specifications === The World Wide Web Consortium (W3C) formally released a Working Draft specification detailing the XMLHttpRequest object on April 5, 2006. Subsequently, on February 25, 2008, the W3C published the Level 2 specification draft. This Level 2 revision introduced crucial functionality such as mechanisms for tracking the progress of event transfers, enabling inter-site (cross-domain) interactions, and supporting the manipulation of raw byte streams. By the conclusion of 2011, the features detailed in the Level 2 specification were formally amalgamated back into the primary, singular specification document. In late 2012, the custodianship of the specification document was transferred to the WHATWG group, which now maintains an evolving standard document utilizing the Web Interface Definition Language (Web IDL).

== Operational Procedure == Executing a server request using XMLHttpRequest generally mandates adherence to a sequential series of programming operations.

  1. Instantiate an XMLHttpRequest object via its constructor call:
  2. Invoke the 'open' method to define the transaction type (e.g., GET, POST), specify the targeted network resource URI, and determine whether the operation will execute synchronously or asynchronously:
  3. For asynchronous transactions, establish an event listener function responsible for handling notifications when the object's state undergoes modification:
  4. Trigger the actual transmission of the request by executing the 'send' method:
  5. Process the state transitions within the designated event listener callback. If the server successfully transmits response material, this content is, by default, buffered within the 'responseText' object property. Once the object successfully terminates processing the received response, its state transitions to 4, indicating the 'done' status. Beyond these foundational directives, XMLHttpRequest provides extensive options for fine-grained control over request methodology and response handling procedures. Custom header fields can be programmatically affixed to the outgoing request to convey specific instructions to the server regarding fulfillment; furthermore, data payload can be transmitted to the server by furnishing it as an argument to the 'send' invocation. The incoming response data can be deserialized from JSON format into a directly usable JavaScript structure, or alternatively, processed incrementally as data segments arrive, obviating the necessity to await the completion of the entire data stream. The transmission sequence can be terminated prematurely via an 'abort' call, or configured to automatically raise an exception if completion is not achieved within a predefined temporal limit.

See Also

`