xSpeed Cache is officially live! Get 50% OFF during Launch Week — Lifetime starts at just $79Lifetime from $79 — 50% OFF, Launch Week! See Plans →

See Plans →
Features
xSpeed Hub Pricing Docs Blog Scan
Appearance
Get Plugin

Run and track PageSpeed tests with Zed

Tracking PageSpeed scores with Zed means asking its agent panel for your stored PageSpeed history and a fresh test of the live site through xSpeed Hub, approving each tool call as it appears.

list_sitesget_score_historyrun_speed_testget_benchmark_historyrun_benchmark

Last updated: October 2026

Example session · Zed

You: Use xSpeed Hub to compare the last two mobile runs on shop.

list_sites read-only
→ 3 sites; shop is shop.example.com

get_score_history(site: shop) read-only
→ latest mobile 57 (6 days ago), previous 60; TBT 340 ms against 290 ms; LCP 3.4 s against 3.3 s

Zed: Mobile dipped three points and the main change is Total Blocking Time, up 50 ms. LCP is within noise. A fresh run would show whether it is still there.

You: Not now. Thanks.

01

How Zed handles this

Zed is where you edit the template, and the agent panel sits next to it. You ask how the site scores, and the agent calls get_score_history and returns the stored runs: score, LCP, FCP, CLS, TBT, Speed Index and TTFB, for mobile and desktop. It works well for a quick comparison, such as the last two mobile runs side by side, with a sentence on which metric explains the gap.

To measure again, the agent calls run_speed_test, a PageSpeed Insights run from the Hub, mobile or desktop, taking up to about two minutes. For a fast timing of the home page cached and uncached it can use run_benchmark, which has no Lighthouse score, so the two should not be mixed in one comparison. get_benchmark_history lines past benchmark runs up with your settings changes, which helps when you are asking whether a change was the cause.

Zed's default tool permission is confirm, so it prompts for every call, reads included. In practice a trend review means several approvals in a row: list_sites, get_score_history, perhaps get_benchmark_history. That is slower than other clients, and it also means that no tool call, including a test, runs while you are looking away. When a test does run, it tests one device per call and saves the result to the Hub's own report history, the Reports tab of the dashboard. get_score_history reads the plugin's stored runs, so do not expect the new result there.

02

Set up Zed once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Zed guide.

1Put your sites in xSpeed Hub

Sign in at app.xspeedcache.com with Google or email; the Hub is free and has no site cap. Then connect each WordPress site from its own dashboard: click Connect Hub in the xSpeed Cache top bar, then Connect via xSpeed Hub. Each site needs the free xSpeed Cache plugin.

2Add xSpeed Hub as a remote server

Open Settings, then AI, then MCP Servers, click Add Server and choose Add Remote Server. Or run zed: open settings file and add the entry yourself. Zed calls MCP servers context servers, so the key is context_servers.

settings.json
{
  "context_servers": {
    "xspeedhub": {
      "url": "https://app.xspeedcache.com/xspeed/mcp"
    }
  }
}

3Sign in

Because the entry has no Authorization header, Zed prompts you to authenticate against the server with the standard MCP OAuth flow. Approve access on the xSpeed Hub page that opens. There is no token to paste. Back in Settings, AI, MCP Servers, a green dot beside xspeedhub with the tooltip Server is active means it is connected.

Text
Settings → AI → MCP Servers
1 / 3

Full Zed setup, sign-in options and FAQ

Before you send a prompt that changes something

Reads change nothing on your sites, though contact_support emails xSpeed support. Writes run once your connection allows them, so your client's approval prompt and a read-only connection (the token's Read-only everywhere switch, or a Viewer sign-in) are the gates that matter. The Zed agent confirms before it runs any tool action. The default setting, agent.tool_permissions.default, is confirm, and that covers MCP tool calls, reads included. A per-tool entry such as mcp:xspeedhub:get_cache_status with a default of allow lets that one tool run without a prompt, and the Always for tool button in the prompt writes the same entry. Setting the global default to allow auto-approves every tool, writes included, and then a write reaches the Hub as soon as your connection allows writes. xSpeed Hub has no confirmation step of its own.

03

What do I ask?

Three prompts written for Zed. More for this job are below.

Prompt for Zed
With xSpeed Hub, compare the last two mobile runs on shop and say which metric changed most.
Prompt for Zed
Use xSpeed Hub to run a desktop test on blog now and show the score next to the previous desktop run.
Prompt for Zed
Ask xSpeed Hub for the benchmark history on shop and match it against my recent settings changes.
04

What happens, step by step

PageSpeed Insights is Google's Lighthouse audit, and its score and Core Web Vitals are the numbers most people mean by "my speed". Through xSpeed Hub an agent can read the scores a site has already stored, run a new PageSpeed test on mobile or desktop, and read or run a separate benchmark of cached against uncached response time. The three answer different questions, and the Hub tells the agent which to use for each.

01

Read before you test

get_score_history returns the stored PageSpeed Insights and GTmetrix runs for a site: the score per run, with LCP, FCP, CLS, TBT, Speed Index and TTFB, mobile and desktop. It starts nothing. The Hub tells the agent to use it whenever you ask what your score is, or whether it improved, because a new test spends a shared allowance.

02

Run a new test when you need one

run_speed_test runs a real PageSpeed Insights audit on the site from the Hub and returns the score, the Core Web Vitals and the top opportunities. strategy is mobile (the default) or desktop, and one call tests one of them. It can take up to about 2 minutes, so the agent should say it is running before it calls.

03

Test the other device

Mobile and desktop scores differ, often by a lot. For both, the agent makes two calls, one per strategy. A failure is reported with its reason: PageSpeed not configured, quota reached, a timeout, or a site the audit cannot reach.

04

Measure the cache on its own

run_benchmark times the home page with the cache bypassed and again served from cache, and returns the response times. It is a read tool, and it accepts site: "all" for every site. It does not return a Lighthouse score, so the agent must not use it to answer a PageSpeed question.

05

Compare over time

get_benchmark_history returns past benchmark runs, uncached against cached, together with the settings changes on the same timeline, which is how you answer "did that change help?". For PageSpeed scores over time, use get_score_history.

05

Reference

Read stored scoresget_score_history (read): PageSpeed Insights and GTmetrix runs, starts nothing
Metrics per runScore, LCP, FCP, CLS, TBT, Speed Index, TTFB, for mobile and desktop
Run a new testrun_speed_test (write, uses the shared allowance): one PageSpeed Insights run per call
strategymobile (default) or desktop
DurationUp to about 2 minutes per run
Why a test is a writeIt spends a shared PageSpeed allowance and stores a report; it changes nothing on the site
Read-only accessA connection token with Read-only everywhere on, or a Viewer member's sign-in: run_speed_test is refused; get_score_history, run_benchmark and get_benchmark_history still work. An OAuth sign-in gets the scopes the client asks for
Benchmarkrun_benchmark (read): cached against uncached response time for the home page, no Lighthouse score
Benchmark historyget_benchmark_history (read): past runs plus settings changes on the same timeline
SchedulingThe Hub does not schedule PageSpeed tests itself; its daily pass only reads reports the plugin already stored
Where a new test is storedIn the Hub's own report history, the one the Hub dashboard shows
06

Rules worth keeping

  • Check the history first. Ask for stored scores before starting a test, and run a new one only when you want a fresh measurement or something changed.
  • Never answer a PageSpeed or Lighthouse question with run_benchmark. It times your own cache and carries no score.
  • run_speed_test changes nothing on your site, but the Hub classes it a write because it spends a shared allowance. A connection token with Read-only everywhere on, or a Viewer sign-in, refuses it. An OAuth sign-in gets the scopes the client asks for, so there your client's approval prompt is the gate.
  • Lab scores move a few points between runs of the same page. The agent should compare like with like, same site, same strategy, and not report one run's difference as a trend.
  • A new test does not run on a timer. If you want a regular test, the agent has to be started by something else, such as a scheduled job in your client, and a scheduled run that spends the allowance should be one you are comfortable leaving unattended.

Good to know with Zed

With confirm as the default, a review that reads three or four things asks you three or four times, and the habit is to loosen the setting. Zed documents per-tool entries for MCP tools and no wildcard, so allow each read tool by name, or use the Always for tool button in the prompt, and keep run_speed_test on confirm. Setting the global default to allow auto-approves every tool, writes included. Reads change nothing on your sites, but each speed test spends the shared allowance, and the Hub has no confirmation of its own to catch a test you did not mean to start.

07

More prompts for this job

They work in any client connected to xSpeed Hub.

Prompt
Using xSpeed Hub, what is the mobile PageSpeed score for shop? Check the stored history before you run anything.
Prompt
Use xSpeed Hub to run a new mobile PageSpeed test on blog and tell me the score, LCP and the top opportunities.
Prompt
With xSpeed Hub, test shop on desktop and mobile and tell me which one is worse.
Prompt
Using xSpeed Hub, has the PageSpeed score on docs improved over the last few runs?
Prompt
Use xSpeed Hub to benchmark the cache on every site and tell me which one saves the least time.
Prompt
Did turning on minification on shop help? Use xSpeed Hub to compare the benchmark history around that change.
Prompt
My PageSpeed test failed on staging. Use xSpeed Hub to tell me why.
08

Frequently asked questions

Zed's default tool permission is confirm, which prompts for every tool call, including ones that only read. You can relax that one read tool at a time with a per-tool entry in Zed's settings, or with the Always for tool button in the prompt. Keep run_speed_test on confirm, because it spends the shared speed-test allowance.

It can read each site in turn with get_score_history, and each call is one prompt unless you loosened the setting. Ask for one summary table at the end. There is no single call that returns history for every site at once.

run_speed_test runs a real PageSpeed Insights audit and returns a Lighthouse score with Core Web Vitals. run_benchmark measures how fast your own cache answers compared with an uncached request for the home page, and returns no Lighthouse score. Use the first for "what is my PageSpeed score" and the second for "is my caching working".

A single run can take up to about 2 minutes, so the agent should tell you it has started before it calls. One call tests one device, mobile or desktop, so checking both takes two calls.

Yes. get_score_history reads the stored PageSpeed Insights and GTmetrix runs for the site and starts nothing. The Hub tells the agent to read it first whenever you ask what your score is, because a new test spends a shared allowance.

No. The Hub does not schedule PageSpeed tests itself. Its daily pass re-verifies sites, snapshots cache status and pulls the PageSpeed and GTmetrix reports the plugin has already stored, and it can alert on a score regression. If you want regular new tests, they have to be started by a client that can run scheduled jobs.

It does not change your site. The Hub classes run_speed_test as a write because it spends a shared PageSpeed allowance and stores a report, and a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) should not be able to cost the owner anything. Such a connection can still read stored scores with get_score_history.

09

Keep going

Track PageSpeed scores with other agents

More with Zed

Documentation

From the blog

Track PageSpeed scores, from Zed.

xSpeed Hub is free and has no site cap. Connect your sites once and ask from the agent you already use.