CP

considus/pagespeed-insights-mcp

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

1 stars 0 forks 质量 63 趋势 22Apache-2.0

本地MCP服务器和Google PageSpeed Insights的CLI。报告多个DISTINCT分析的中位数,分布范围,加上Chrome UX Report字段数据,所以变化小于噪声并不......

概览

用Google PageSpeed Insights测量网页,并报告多次跑的中位数,旁边显示差价,从而得到一个带有不确定性的数字。由会说MCP的助理或终端操作。 只用标准库。没有虚拟环境,没有 PIP,也没有编译依赖。克隆它并运行它。 已经有好几个PageSpeed MCP服务器了。据我们所知,每台服务器只运行一次Lighthouse,并向模型提供编号。 一次Lighthouse的运行就是噪音。总分区时间在未变的页面上经常在运行间波动三倍,而头条性能评分是一个加权混合,继承了这一点。问一次,你得到的数字没有误差条,也无法区分仪器的真实回归和运动。这不仅仅是一个小不精确,而是测量与自信猜测之间的区别。 还有第二个问题,而且更糟,因为它是看不见的。

概述(AI 翻译)

用Google PageSpeed Insights衡量网页,并报告中位数 多轮与牌差并列,因此有数字随其而来 不确定性。由会说MCP的助理或终端操作。

仅限标准库。无虚拟环境,无pip,无编译 依赖。克隆并运行它。

文档 ·安装 ·常见问题

为什么又来一个

目前已有多个 PageSpeed MCP 服务器。据我们所知,所有 其中一个只跑过一次灯塔,然后把号码交给模特。

单次《灯塔》通关就是噪音。总区间时间经常波动 在未变页面上三次连载,标题也一样 绩效评分是一个加权混合,承继了所有这些因素。问一次 你得到的数字没有误差,也无法判断真实回归 由于仪器的移动。这不仅仅是一个小不精确的部分,而是 测量某物和自信猜测的区别。

还有第二个问题,而且更糟,因为它是看不见的。 PageSpeed 会缓存每个 URL 的结果并重播。问五次就能 被递给一个分析五次,悄悄地将一个中间位数变成了投赞成的票

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

PageSpeed Insights MCP

Measures a web page with Google PageSpeed Insights and reports the median of several runs with the spread beside it, so a number arrives with its uncertainty. Works from an assistant that speaks MCP, or from a terminal.

Standard library only. No virtual environment, no pip, no compiled dependency. Clone it and run it.

Docs · Install · FAQ

Why another one

There are already several PageSpeed MCP servers. As far as we can tell, every one of them only runs Lighthouse once and hands the model the number.

A single Lighthouse run is noise. Total Blocking Time routinely swings threefold between runs on a page that has not changed, and the headline performance score is a weighted blend that inherits every bit of that. Ask once and you get a figure with no error bars, and no way to tell a real regression from the instrument moving. That is not a small imprecision, it is the difference between measuring something and guessing at it confidently.

There is a second problem underneath, and it is worse because it is invisible. PageSpeed caches its result per URL and replays it. Ask five times and you can be handed one analysis five times, which quietly turns a median into a vote for whatever Google happened to have cached. Minutes after a deploy on 30 July 2026 that is exactly what happened here, 2 of 3 runs came back with a byte-identical timestamp from before the deploy, dragging the average back to the pre-fix score while the one fresh run showed the fix working. A tool that reports one run would have reported the stale number as current, with nothing to indicate anything was wrong.

This one takes the median of 5 runs by default, prints the min-max spread next to every figure, drops runs that were cached replays, and tells you how many it dropped.

The lab is not your users

Both of these are true, measured on the same page on the same afternoon.

LCP Verdict
Lighthouse lab, mobile 21.36 s performance 27 / 100
Real Chrome users, 28-day p75 1.20 s FAST

That is the BBC home page. The lab says the site is catastrophically slow. Real people are getting it in 1.2 seconds.

Neither number is wrong, they answer different questions. Lighthouse is a simulation on throttled hardware, useful because it is repeatable and you can run it against a page nobody has visited yet. Field data is what actually happened to real Chrome users, and it is the only thing Google ranks on. A tool that shows you one and not the other is misleading you, whichever one it picks.

So this reports both, separately, and never merges them into a single figure.

What it does

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →