How Paperclip handles this
In Paperclip a purge is a ticket, not a chat message. Your release agent finished deploying a theme change, and you open a task for the web agent: purge the stale pages on shop and record what was cleared. Paperclip wakes the agent, the agent calls list_sites and purge_cache, and the tool calls and their results sit on the task with a trace you can read later. If the ticket says to wait for a reply before any change, the agent posts its plan and stops.
Paperclip does not call MCP tools itself, so the Hub sits on the agent it runs. On the adapter route, claude mcp add was run as the OS user the heartbeat runs as, and a sign-in in one interactive claude session left credentials that the headless runs reuse. On the connector route, the Hub is attached on Paperclip's Connectors page, where each of its tools is set to Allowed, Ask first or Off. Either way the result is the plugin's report: type, site, entries cleared, and for a purge of type all the object cache and a connected Cloudflare edge. The agent can follow with start_preloader and note the queued URLs on the ticket.
The route decides the approval. The Claude Code adapter runs headless with dangerouslySkipPermissions on by default, and a server added on the adapter does not pass through Paperclip's action permissions or review queue, so a purge there runs as soon as the agent calls it. On the connector route, purge_cache can be set to Ask first, which holds the call until a person approves it. xSpeed Hub has no confirmation step of its own, so one of those two has to hold the purge. For a purge of every site the Hub also tells the agent to confirm once, which is guidance to the model, not a lock.
Set up Paperclip once
Already connected? Skip to the prompts. Alternatives and troubleshooting are on the Paperclip 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 the agent Paperclip runs
For a Claude Code agent, run this on the machine that hosts it, as the same OS user the Paperclip heartbeat runs as. Paperclip's docs say MCP wiring lives at the adapter and runtime layer, and user scope makes the Hub available to every Claude Code agent that user runs.
claude mcp add --transport http --scope user xspeedhub https://app.xspeedcache.com/xspeed/mcp
3Sign in once, or use a token
Start claude interactively as that same user, run /mcp, choose xspeedhub and approve access on the xSpeed Hub page. Claude Code keeps the credentials, so later headless runs need no browser; claude mcp get xspeedhub shows the status. On a host with no browser, add the server with the connection token from Connect AI in the Hub instead, ideally with Read-only everywhere on.
# Interactive sign-in claude /mcp # Or a token, no browser claude mcp add --transport http --scope user xspeedhub https://app.xspeedcache.com/xspeed/mcp \ --header "Authorization: Bearer <your connection token>"
Full Paperclip 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. Paperclip's Claude Code adapter runs headless with dangerouslySkipPermissions on by default, which lets the agent call MCP tools without asking. Set it to false and a tool that needs approval does not run. A server added on the adapter does not pass through Paperclip's action permissions or review queue. A Paperclip connector does: each Hub tool is set to Allowed, Ask first or Off, and because the Hub publishes no annotations Paperclip classifies them by name, which can under-classify, so start every write Off. xSpeed Hub has no confirmation step of its own, so a write that gets past those settings runs as soon as your connection allows writes. For unattended routines, send a connection token with Read-only everywhere on, which makes the Hub refuse every write tool.
What do I ask?
Three prompts written for Paperclip. More for this job are below.
Ticket: use xSpeed Hub to purge the page cache on shop after today's theme deploy, and record the count on this task.
With xSpeed Hub, propose the right purge type on blog for the change in this ticket. Post the plan and wait for my reply before you run it.
Use xSpeed Hub to purge every site in my workspace after the plugin update and post one line per site, including any 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 Paperclip
The Hub publishes no tool annotations, so on the connector route Paperclip classifies its tools by name, which can under-classify. Check where purge_cache landed before you rely on it, start it Off, and promote it to Ask first on purpose. Refresh actions can widen what agents may call, so look at the list again after a refresh. Keep purges out of routines: a routine creates a task on a cron schedule and wakes the agent with nobody watching, and with the adapter skipping prompts a weekly purge would run unreviewed. If a routine only needs to report, give that agent a connection token with Read-only everywhere on, which makes the Hub refuse every write.
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 Paperclip
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
- Paperclip + xSpeed
- Every AI agent that works with xSpeed
From the blog