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

How to write prompts for xSpeed Hub

AI & MCP 6 min read Updated Oct 2026

Write prompts your AI client turns into the right xSpeed Hub calls: name the server and the site, read before you write, and reach every site in one call.

Once your AI client is connected to xSpeed Hub, it can call 29 tools across every site in your workspace: 16 that read and 13 that write. The model picks those tools from the words you type. A prompt that names the server, names the site and says whether you want a reading or a change gets the right call the first time.

This page assumes the connection already works. If it does not, start with xSpeed Hub MCP and the setup guide for your client.

Name the server

Most people have more than one MCP server in their client: a content server for WordPress, GitHub, a browser, the xSpeed Scan MCP. Some of them have tools with the same name. The Hub and the Scan MCP both have run_speed_scan, and a site’s own MCP server also has purge_cache. When two servers could answer, the model guesses.

Start the prompt with the server, using the name your client knows it by. The setup guides on this site name it xspeedhub, and “xSpeed Hub” works too:

Use xSpeed Hub to check the cache status on my blog.

Name the site

Every site-scoped tool takes a site argument: a short handle such as blog or acme, not the full URL. To see your handles, ask the Hub:

Use xSpeed Hub to list my sites with their handles and status.

That calls list_sites, which returns each site’s handle, URL and connection status. A site whose status is not verified will fail the calls sent to it, so reconnect it before you trust a fleet-wide answer.

If your account has one site, the agent can leave site out and the Hub uses that site. With more than one, put the handle in the prompt. The Hub tells the agent to ask which site you mean when a request does not name one, but a handle in the prompt saves the round trip.

Sites live in workspaces. If you belong to several, name the workspace too (“in the Acme workspace”); the agent passes it as the workspace argument, and list_workspaces shows which workspaces this connection reaches. See Teams, Roles, and Workspaces in xSpeed Hub.

Read before you write

Ask for a reading first, then decide on the change. The read tools change nothing on your sites:

  • get_cache_status: whether the cache is on, the hit ratio and the cache stats.
  • get_health: full diagnostics for one site, including the environment checks.
  • get_settings: the current settings of one module.
  • get_score_history and get_speed_scan: past PageSpeed runs and xSpeed Scan reports. Neither starts a new test.

Saying “read first, change nothing yet” in the prompt keeps the first turn to these tools. Then ask for the change in a second prompt, once you have seen the numbers.

Use xSpeed Hub to read get_cache_status and get_health on blog.
Tell me why the hit ratio is low. Change nothing yet.

Reach several sites in one call

Seven tools accept site: "all" or a list of handles, and return one result per site from a single call:

ToolKind
purge_cacheWrite
toggle_cacheWrite
update_settingsWrite
start_preloaderWrite
stop_preloaderWrite
optimize_siteWrite
run_benchmarkRead

"all" means every site in the workspace the call targets, which is your default workspace unless you name another. The Hub runs the sites one after another with a pause of about a second between them, so twenty sites take about twenty seconds.

The answer is a summary plus a row per site. Some sites can succeed while others fail, so ask the agent to report the failed rows by name rather than a single “done”.

Use xSpeed Hub to purge the page cache on every site in one call.
List any site that failed and the error it returned.

Every other site tool works on one site per call. For those, the agent makes one call per site.

Who approves a change

xSpeed Hub has no confirmation step of its own. A write tool (a purge, a settings change, a cache toggle, or a speed test that spends the shared allowance) runs as soon as your connection allows writes. Two things stand between a prompt and a change:

  • Your connection’s scope. A read-only connection refuses every write tool. The connection token has a Read-only everywhere switch, sites can be set to Read-only or No access one by one, single tools can be denied, and a Viewer member only ever gets read access. See Scoped AI Connections in xSpeed Hub.
  • Your AI client’s own tool-approval prompt. Keep the write tools on it. Each client’s guide in AI agents shows how.

The Hub also tells the agent to confirm the target site and to ask once before a write that touches every site. That is an instruction to the agent, not a lock. Writing “ask me before you change anything” in your prompt is the same: a request the model may follow, not a control.

One read tool acts: contact_support emails xSpeed support with your account email and site list, and a read-only connection can still call it.

Grade any public URL with no account

The xSpeed Scan MCP at https://xspeedcache.com/scan/mcp grades any public website with no account and no sign-in. It is read-only and cannot change anything. Use it for a site you do not run, or before you install anything. Name it, so the model does not reach for the Hub’s tool of the same name:

Use the xSpeed Scan MCP to grade https://example.com
and give me the three fixes worth the most points.

It allows 4 scans per caller per 10 minutes, and its reports are public in the scan directory by default. Setup and the full tool list are in xSpeed Scan MCP.

Example prompts by job

Each prompt below names the server, names the site and keeps the read ahead of the write. The linked page has more prompts for that job and the setup for that client.

Purge the cache

Use xSpeed Hub to purge only the page cache on shop,
then read get_cache_status and confirm the purge time.

More in Purge WordPress cache with Claude Code.

Find out why pages are not cached

Use xSpeed Hub to find out why pages on blog are not cached.
Read get_cache_status, get_health and the page cache settings.
Report the warning rows and change nothing.

More in Debug page caching with Claude.

Tune one setting

Use xSpeed Hub to show the minify settings on blog with get_settings.
Suggest one change and wait for my yes before calling update_settings.

More in Tune cache settings with Cursor.

Warm the cache

Use xSpeed Hub to start the preloader on every site in one call,
then read get_preloader_status for each site that started.

More in Warm WordPress cache with Codex.

Track PageSpeed

Use xSpeed Hub to read get_score_history for blog.
If the last mobile run is more than a week old, run one mobile run_speed_test.

More in Track PageSpeed with ChatGPT.

Raise the PageSpeed score

Use xSpeed Hub to preview optimize_site on blog with dry_run and the safe level.
Show me the plan. Apply nothing until I approve it.

A dry run is still a write tool, so a read-only connection refuses it. More in Raise PageSpeed with Claude Code.

Manage every site

Use xSpeed Hub to list my sites, read get_cache_status on each,
and rank them by hit ratio, lowest first.

More in Manage every site with Claude.

Scan a site’s speed

Use xSpeed Hub to read the scan history for shop with get_speed_scan.
Run a new run_speed_scan only if the last report is older than today.

More in Scan site speed with Gemini CLI. The Redis and Cloudflare jobs follow the same pattern: see Set up Redis cache with Claude Code and Manage Cloudflare with Claude Code.

Bring an existing speed report

Copy the exact scan ID and the full report link into your AI brief. The full Markdown report is https://xspeedcache.com/scan/r/{scanId}.md. Keep the requested and final URLs, device, analysis time, replay/partial flags and both device results so the assistant does not mistake an old or partial result for a new improvement. An unlisted report is still accessible to anyone holding its link.

The currently available Hub get_speed_scan can read a report summary. A full-detail exact-report handoff with optional site/workspace binding is being prepared separately; until that version is deployed, use the Markdown report for complete evidence. Do not send unsupported detail or report-import parameters to an older catalog.

Before applying anything, the assistant should resolve the correct site/workspace, verify its permitted tools, then use available read-only tools to inspect the installed plugin capabilities and current configuration. A report does not grant site access. A public plugin/Hub fingerprint does not confirm that this browser or AI client is authenticated.

optimize_site does not accept scan_id or a report URL. It applies its own plan and cannot promise 100 or a full rollback. Its PHP HTML verification cannot execute JavaScript; browser/console checks and a same-device re-test are still required after approved changes. The direct plugin and Hub tool schemas can differ, so use the live catalog for the connection in use.