How Cursor handles this
You are in Cursor with the theme repository open, you have just changed a template, and you want to see it on the live site. Rather than switch to a browser tab and wp-admin, you type the request in the agent panel: purge the cache on shop and tell me what you cleared. The agent calls list_sites, picks a type, and runs purge_cache, and each call appears in the panel as it happens.
The advantage in an editor is that the agent already knows what you changed. If the diff only touches CSS and JavaScript, it can reason that assets is enough. If you edited a template, it may choose page instead. The result comes back in the same panel: the type, the site and the number of entries cleared. A purge of type all adds the object cache and a connected Cloudflare edge to the report, and the agent can offer start_preloader as the last step.
Cursor shows each MCP call in the panel, and you can expand it to see its arguments. Run Modes under Settings, Agents, Approvals and Execution decide when it stops to ask you: the default Auto-review runs allowlisted calls at once and sends the rest to a classifier, not to you, Allowlist asks you about anything not listed, and Run Everything asks nothing. That setting is your main check, since xSpeed Hub runs a write as soon as the connection allows it. For a purge across every site, the Hub also tells the agent to say it will touch all the sites and wait for your yes.
Set up Cursor once
Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Cursor 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 mcp.json
Add the server to ~/.cursor/mcp.json to have it in every project, or to .cursor/mcp.json inside a project to scope it there. The entry is just a name and a url.
{
"mcpServers": {
"xspeedhub": {
"url": "https://app.xspeedcache.com/xspeed/mcp"
}
}
} 3Enable it and sign in
Open Customize in the sidebar, find xspeedhub and make sure it is switched on. When Cursor starts the OAuth sign-in, approve access on the xSpeed Hub page. There is no token to paste. If the server shows an error, open the Output panel with Cmd+Shift+U and pick MCP Logs.
Customize > xspeedhub (on)
Full Cursor 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. Cursor decides how to treat an MCP tool call by its Run Mode, and you can expand a call to see its arguments. MCP follows the same Run Modes as terminal commands, set under Settings > Agents > Approvals & Execution. The recommended default, Auto-review, runs allowlisted calls at once and sends the rest to a classifier, not to you. Allowlist runs only what you listed, and with an empty list it asks you every time. Run Everything runs every tool call without asking. xSpeed Hub has no confirmation step of its own, so a tool you allowlist, or any call under Run Everything, writes as soon as your connection allows writes. Auto-review is a model, and Cursor says it is not a security boundary.
What do I ask?
Three prompts written for Cursor. More for this job are below.
Look at my last commit, decide which purge type it needs on shop, and run it through xSpeed Hub.
Use xSpeed Hub to purge the assets cache on blog after this CSS change and tell me how many files were cleared.
Ask xSpeed Hub to purge every site in my workspace, then list any site where the purge failed and why.
What happens, step by step
A purge throws away stored copies so the next visitor gets a fresh page. Through xSpeed Hub an agent can purge everything, only pages, only CSS and JavaScript assets, the object cache or the REST cache, on one site or across every site in a workspace. A full purge also clears the Cloudflare edge when the site has Cloudflare connected.
01
Find the site
The agent calls list_sites when you have more than one site, then matches the name you used to a site handle. If the name could mean two sites, the Hub tells it to ask you rather than guess.
02
Pick the purge type
purge_cache takes a type: all, page, assets, object or rest. all clears the page cache, the object cache and, when they are connected, the Cloudflare edge and CDN. After a theme or CSS change, assets is enough; after a content edit, page; after a deploy, all.
03
Purge
The call runs straight away on that site once your connection allows writes. For every site at once the agent passes site: "all", and the Hub runs the sites one after another with a one-second pause.
04
Clear only the edge if that is all you need
purge_cloudflare empties the Cloudflare edge cache on its own, without touching the copies on your server. A page or assets purge does not reach Cloudflare; a purge of type all does when Cloudflare is connected.
05
Warm it again
start_preloader rebuilds the cache in the background so the first visitors after the purge are not the ones paying for it.
Reference
| Tool | purge_cache (write) |
|---|---|
| Purge types | all, page, assets, object, rest |
| What all covers | Page cache, object cache, plus the Cloudflare edge and CDN when connected |
| Every site at once | site: "all" or a list of handles, one result per site |
| Fan-out pacing | Sites run one after another with a 1 second pause |
| Edge only | purge_cloudflare, a separate write tool |
| Re-warm | start_preloader after the purge |
| Read-only access | purge_cache is refused on a connection token with Read-only everywhere on, and for a Viewer sign-in |
| Confirmation | None on the Hub; your client's prompt is the gate |
Rules worth keeping
- Name the site. With several sites, an unclear name should make the agent ask, and the Hub tells it to.
- A purge of every site is one call with site: "all". The Hub tells the agent to confirm it with you once before it runs.
- Purge the narrowest type that fixes the problem, then warm the cache, so visitors do not all hit uncached pages at once.
- A fan-out result is reported per site. Treat some sites failing as a partial result, not a failure of the whole call.
Good to know with Cursor
Under Run Everything, purge_cache and every other write tool run without a prompt, and that includes a purge across every site. Switch Run Mode to Allowlist (Settings > Agents > Approvals & Execution), list the Hub's read tools, and leave purge_cache off so it asks; under the default Auto-review, unlisted calls go to a classifier that Cursor says is not a security boundary. Run Modes apply to local agents only, and Cursor says Cloud Agents never ask, so give a Cloud Agent a connection token with Read-only everywhere on. Name the site in your request too: with several sites behind the Hub, a bare "purge it" makes the agent stop and ask which one, which is the Hub's instruction working as intended.
More prompts for this job
They work in any client connected to xSpeed Hub.
Use xSpeed Hub to purge the page cache on blog.
I just changed the theme CSS on shop. Use xSpeed Hub to purge only the assets cache there.
With xSpeed Hub, purge every site in my workspace and tell me which ones failed.
Use xSpeed Hub to purge shop, then purge its Cloudflare edge cache too.
With xSpeed Hub, purge the docs site and start the preloader so it is warm again.
Using xSpeed Hub, what purge type should I use after updating a plugin that changes the checkout page?
Frequently asked questions
Keep going
Purge the cache with other agents
More with Cursor
Documentation
- How to enable Page Cache
- How to warm your cache ahead of visitors
- Managing your fleet with xSpeed Hub
- How to write prompts for xSpeed Hub
- Cursor + xSpeed
- Every AI agent that works with xSpeed
From the blog