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

Scan a website for speed problems with Gemini CLI

Scanning a site's speed with Gemini CLI means typing one prompt in your terminal and getting an xSpeed Scan back: a graded report, ranked fixes and a link you can share.

list_sitesget_speed_scanrun_speed_scan

Last updated: October 2026

Example session · Gemini CLI

You: Use the xSpeed Scan MCP for a quick check on example-clinic.com before my call. How fast is it?

run_speed_scan(url: example-clinic.com, strategy: both) read-only scan mcp
→ Desktop grade C, mobile grade D. Top fixes: page cache for slow server response, then compressing images. Report link included.

Gemini CLI: Slow server response and uncompressed images. Mobile is the weaker run. A page cache and image optimization are the top two fixes in the report. Link is in the output.

You: Give me one sentence I can say on the call.

Gemini CLI: Your site builds each page from scratch for every visitor, and a page cache is the top fix in the report.

01

How Gemini CLI handles this

Gemini CLI is quick to reach for when you want a fast answer about a URL. Add the no-account xSpeed Scan MCP and you can ask how fast any public site is. Gemini calls run_speed_scan, waits 20 to 60 seconds, and prints the grade out of 100, the desktop run as the headline and the mobile run beside it, with the top failing checks in plain words. Nothing is installed on the site you are scanning, and nothing on it can change.

That makes it the natural first route for Gemini CLI: look at a prospect's site before a call, or check a competitor, from the same prompt where you do everything else. When the site is yours and sits in xSpeed Hub, add the Hub as well. Then run_speed_scan takes a site handle, and get_speed_scan reads the scan history, so you can ask what changed since last week without starting a measurement.

Ask for a single device when you only care about one. A mobile-only or desktop-only scan costs half the quota and makes that device the headline grade. The report link in the answer opens the full report, and its Markdown version is easy to feed back into the next prompt. Because it all happens in one terminal, you can chain the answer into the next step in the same session, such as asking for a short summary to paste into a message.

02

Set up Gemini CLI once

Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Gemini CLI 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 to Gemini CLI

Run this once. --scope user writes the server to ~/.gemini/settings.json so it works in every project; without it Gemini CLI saves to the project's .gemini/settings.json, which is the default.

Terminal
gemini mcp add --scope user --transport http xspeedhub https://app.xspeedcache.com/xspeed/mcp

3Authenticate with /mcp auth

Start gemini and run /mcp auth xspeedhub. A browser page opens where you sign in to xSpeed Hub and approve access, and Gemini CLI receives the redirect on a local port. There is no token to paste, and the client keeps the credentials it receives. Run /mcp afterwards to check that xspeedhub shows as connected and lists its tools.

Text
/mcp auth xspeedhub

4Add the xSpeed Scan MCP for sites you do not run

Prompts that scan a public URL use the xSpeed Scan MCP, a separate server from the Hub. Add it to Gemini CLI the same way as the Hub above, as a second server (xspeedscan, for example) with the URL https://xspeedcache.com/scan/mcp, and leave out any sign-in setting, such as an OAuth or auth option or an Authorization header, because the Scan MCP needs no account, token or sign-in. On a plan that allows one custom connector, add whichever server the prompts you use need.

Text
https://xspeedcache.com/scan/mcp
1 / 4

Full Gemini CLI 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. Gemini CLI shows a confirmation for an MCP tool call unless the server entry sets trust to true or you start Gemini CLI with --approval-mode=yolo (or --yolo), which approves every tool call. You can proceed once, always allow that tool, always allow the whole xspeedhub server, or cancel; the last two choices stop later prompts for those tools. Policy rules in ~/.gemini/policies can allow, deny or ask for a named tool by server and tool name. The Hub has no confirmation step of its own, so a trusted server, YOLO mode or an allow rule lets a write run as soon as your connection allows writes.

03

What do I ask?

Three prompts written for Gemini CLI. More for this job are below.

Prompt for Gemini CLI
Use the xSpeed Scan MCP to scan [your site URL] and tell me the desktop and mobile grades and the single biggest fix.
Prompt for Gemini CLI
With the xSpeed Scan MCP, run a mobile-only scan of my site and list the failing checks by points recovered.
Prompt for Gemini CLI
Using xSpeed Hub, read the scan history for shop and tell me if the grade has gone up or down.
04

What happens, step by step

An xSpeed Scan grades a site from 0 to 100 using server probes (time to first byte, compression, cache evidence, redirects, platform detection) plus a Lighthouse run, and names the fix for every failing check. An agent can start one two ways. Through xSpeed Hub, run_speed_scan scans a site you have connected. Through the no-account Scan MCP at https://xspeedcache.com/scan/mcp, it scans any public URL and cannot change anything. Either way you get a report link to share.

01

Check what the site already scored

get_speed_scan without a scan id returns the site's scan history, newest first, plus a summary of the latest report. It starts nothing and spends nothing, so the Hub tells the agent to read it first when you ask what a site scored.

02

Start a scan

run_speed_scan runs the full scan on a site you connected to the Hub. strategy is both (the default), desktop or mobile; one device alone costs half the engine's quota. The scan takes 20 to 60 seconds. The Hub waits about 50 seconds and, if the scan is still running, hands back a scan id.

03

Poll if it is still running

Call get_speed_scan with scan_id. While the scan runs it returns the running status and a note to ask again in about 20 seconds. The report page is live from the start and refreshes itself.

04

Read the result

The summary carries the grade, the four dimension scores, what was measured and the top fixes ranked by points recoverable, each with the xSpeed feature that fixes it. The headline grade is the desktop run. The mobile run is graded alongside it, so the agent should mention both when they differ.

05

Scan a site you do not run

For any other public URL, the agent uses the Scan MCP at https://xspeedcache.com/scan/mcp. There is no account and no sign-in. It takes a url, returns the same graded report and a link at xspeedcache.com/scan/r/<id>, and is limited to 4 scans per caller per 10 minutes.

06

Fix, wait, re-scan

After a change, wait several minutes and scan again with fresh: true. Without it, the scan service reuses any report from the last 10 minutes and the agent will show you the old number.

05

Reference

Hub routerun_speed_scan, then get_speed_scan with scan_id; only for sites connected to your Hub
Scan MCP routehttps://xspeedcache.com/scan/mcp, no account, 5 tools, read-only, any public URL
Scan MCP limit4 scans per caller per 10 minutes
Why run_speed_scan is a writeIt spends a shared scan allowance and stores a report; it changes nothing on the site
Read-only Hub connectionrun_speed_scan is refused; get_speed_scan still works. Applies to the connection token with Read-only everywhere on and to a Viewer sign-in; an OAuth sign-in gets the scopes the client asks for
Duration20 to 60 seconds; the Hub waits about 50 seconds, then returns a scan id
Poll argumentscan_id on the Hub tool, scanId on the Scan MCP tool
strategyboth (default), desktop or mobile; one device costs half the quota and becomes the headline
freshtrue forces a new measurement; otherwise a report from the last 10 minutes is reused
Report linkxspeedcache.com/scan/r/<id>; add .md for a Markdown twin an agent can read
Report visibilityHub scans are filed unlisted; Scan MCP scans are public in the scan directory by default
06

Rules worth keeping

  • Read before you spend. Ask for the scan history first; start a new scan only when you want a fresh measurement or something changed.
  • A report link is not private. An unlisted report is kept out of the scan directory and search, but anyone with the URL can open it. A scan started through the Scan MCP is public by default.
  • run_speed_scan changes nothing on your site, but the Hub classes it a write, so a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) refuses it and your client may prompt for it. Use get_speed_scan, or the Scan MCP for a public URL, when you want a strictly read-only route.
  • Compare like with like. A scan that lost its Lighthouse run is marked partial and is not comparable with a full one, and the lab grade is not the same as real-visitor Core Web Vitals, which the report shows separately.
  • A scan cannot reach private, local or password-protected sites, and a site behind a bot challenge returns a report that says its server checks were not measured.

Good to know with Gemini CLI

Gemini CLI shows a confirmation for an MCP tool call unless the server entry sets trust or you start it with --approval-mode=yolo (or --yolo), which approves every tool call. You can proceed once, always allow that tool, always allow the whole server, or cancel. A trusted Scan MCP server is harmless, because every tool on it is read-only. A trusted Hub server is different: run_speed_scan is write-classed there, so with trust set, in yolo mode, or after you choose always allow for it, it runs with no prompt and each scan spends the shared speed-test allowance. Trust the Scan MCP if you like, but leave the Hub untrusted. A policy rule can allow get_speed_scan by server and tool name and leave run_speed_scan on a prompt, and a read-only Hub connection (the connection token with Read-only everywhere on, or a Viewer sign-in) refuses scans in a script.

07

More prompts for this job

Prompts about your own sites work in any client connected to xSpeed Hub. A prompt that scans a site you do not run, or names the scan server, needs the xSpeed Scan MCP from the setup above.

Prompt
Using xSpeed Hub, what did the shop site score on its last speed scan? Do not start a new one.
Prompt
Use xSpeed Hub to run a speed scan on blog and give me the three fixes that recover the most points, plus the report link.
Prompt
With xSpeed Hub, scan only the mobile view of shop and tell me the grade.
Prompt
I changed the theme this morning. Use xSpeed Hub to run a fresh scan on docs and compare it with the previous report.
Prompt
Use the xSpeed Scan MCP to grade [competitor URL] and tell me what its biggest weaknesses are.
Prompt
The speed scan on shop is still running. Ask xSpeed Hub to check it again and tell me when it finishes.
08

Frequently asked questions

Add the xSpeed Scan MCP, which needs no account and no key, then ask Gemini to scan a URL. It grades any public site and links a shareable report. The limit is four scans per caller per ten minutes.

Trusting the read-only Scan MCP is low risk. For xSpeed Hub, think twice, since trust, like yolo mode, skips the prompt and run_speed_scan is a write-classed tool that spends the shared allowance. A Hub connection token set to Read-only everywhere refuses it either way.

run_speed_scan runs the full xSpeed Scan: server probes plus Lighthouse, a 0 to 100 grade across four dimensions, the fix for every failing check and a shareable report link. run_speed_test returns a raw PageSpeed Insights score with Core Web Vitals and no graded report.

Yes, through the xSpeed Scan MCP at https://xspeedcache.com/scan/mcp. It needs no account and no sign-in, accepts any public URL and is read-only. The Hub route only scans sites you connected to your own workspace.

The Scan MCP allows 4 scans per caller per 10 minutes. Scanning the same URL again within 10 minutes returns the existing report unless the agent passes fresh: true. A Hub scan spends a shared allowance of the scan service, which is why the Hub treats it as a write tool.

Reports started from the Hub are filed as unlisted, which keeps them out of the public scan directory and search results, but the link itself still opens for anyone who has it. Reports started through the Scan MCP are public by default.

The headline grade is the desktop run, because it is the one you can reproduce in your own browser. The mobile run is graded on the same rubric and returned alongside it. Google ranks on mobile, so when the two differ the agent should tell you both.

09

Keep going

Scan a site's speed with other agents

More with Gemini CLI

Documentation

From the blog

Scan a site's speed, from Gemini CLI.

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