How Zed handles this
You are in Zed with the theme open, you changed a template, and the live site has not caught up. In the agent panel you type: purge the cache on shop. The agent calls list_sites to match the name, then purge_cache with the type that fits, and the results appear in the thread. Zed calls the servers an agent talks to context servers, and xSpeed Hub is one of them.
Zed confirms before it runs any tool action by default. Its tool permission default is confirm, which means every tool call stops for your answer, reads included. A simple purge can therefore show you three prompts in a row: list_sites, then purge_cache, then start_preloader. That feels slow for read tools, but it keeps each write in front of you. Once you trust a read tool, the Always for tool button in the prompt, or a per-tool entry in settings, lets that one tool run without asking.
What returns is the plugin's report: the purge type, how many entries cleared, and for all the object cache and a connected Cloudflare edge. xSpeed Hub has no confirmation of its own, so Zed's prompt and your connection scope are the gates. For a purge across every site, the Hub also tells the agent to say that it will touch all the sites and wait for your yes, which Zed's own prompt then repeats.
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.
{
"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.
Settings → AI → MCP Servers
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.
What do I ask?
Three prompts written for Zed. More for this job are below.
Use xSpeed Hub to purge the page cache on blog after my template change and tell me how many pages were cleared.
Ask xSpeed Hub for the cache status of shop, then purge only assets if the hit ratio is under 70%.
With xSpeed Hub, purge every site in my workspace and list the failures.
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 Zed
Because Zed prompts for every call by default, a read such as get_cache_status stops you just like a purge does, so read the tool name on the prompt before you confirm rather than approving by habit. Do not set the global default to allow to speed reads up, because that auto-approves every tool, writes included, and purge_cache would run without a prompt. Allow reads one tool at a time instead, and leave purge_cache on confirm. A connection token with Read-only everywhere on, or a sign-in as a Viewer member, is the safer choice when you only want the agent to look.
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 Zed
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
- Zed + xSpeed
- Every AI agent that works with xSpeed
From the blog