# Tune WordPress cache settings with Paperclip

> Tuning cache settings with Paperclip means assigning a ticket to an agent that Paperclip runs, letting it read xSpeed settings through xSpeed Hub and post a proposal, and approving the write before it happens.

Page: https://xspeedcache.com/agent/paperclip/cache-settings/
Last updated: October 2026

You run Paperclip on your own server with a Claude Code agent whose job includes the company blog. Readers have noticed that the newest posts take a while to show up on the blog's listing pages. You open a ticket and assign it: review the cache settings on blog and propose an expiry for a site that publishes every day. The agent wakes, calls list_modules for the module list and status, then get_settings for the cache module, and starts from the stored values instead of a guess.

What comes back is a comment on the ticket rather than a chat reply: the cache expiry on blog is 168 hours, a week, so a listing page can keep showing last week's posts until something purges it. The proposal is 24 hours and nothing else. The Hub tells the agent to briefly confirm intent before update_settings, and on a ticket that means it waits for your reply. Once you approve, it calls update_settings and records the old and new values on the task, which is your way back, because the Hub keeps no undo. A wrong key or value refuses the whole call with nothing stored, and credential fields are refused over the Hub.

What differs in Paperclip is that the agent runs headless, so the usual approval prompt may not exist. Paperclip's Claude Code adapter runs with dangerouslySkipPermissions on by default, which lets the agent call MCP tools without asking, and a server added with claude mcp add on the host bypasses Paperclip's action permissions and review queue. The governed route is the Connectors page: each Hub tool is set to Allowed, Ask first or Off, and since the Hub publishes no annotations Paperclip classifies them by name. Start update_settings and toggle_cache on Off or Ask first.

## Set up Paperclip once

### 1. Put 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.

### 2. Add 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.

```bash
claude mcp add --transport http --scope user xspeedhub https://app.xspeedcache.com/xspeed/mcp
```

### 3. Sign 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.

```bash
# 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 setup: https://xspeedcache.com/agent/paperclip/

### 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.

## Prompts

- Ticket: use xSpeed Hub to read the cache module on blog and propose an expiry for a daily publishing site. Wait for my reply.
- Weekly review: use xSpeed Hub to compare the cache expiry on every site and post the outliers on this task. Read only.
- With xSpeed Hub, apply the approved expiry on blog and note the old value on the ticket.

## Example session

```
You: Ticket: use xSpeed Hub to review the cache settings on blog and propose an expiry for a site that publishes daily. Do not write without my reply.
  → list_modules(site: blog) [read-only]: cache on, minify on, lazy on
  → get_settings(site: blog, module: cache) [read-only]: cache expiry 168 hours, 3 excluded URLs
Agent: blog keeps cached pages for 168 hours, a week, so listing pages can show last week's posts until something purges them. Proposal: 24 hours, nothing else changed. Reply to approve.
You: Approved, 24 hours.
  → update_settings(site: blog, module: cache, values: { cache_expiry: 24 }) [changes site]: stored, cache expiry now 24 hours
Agent: Applied. The ticket notes the old value, 168, in case you want it back.
```

## How it works

1. **List the modules**: list_modules returns every Free and Pro module available on one site, with its settings schema and status. It tells the agent which module slugs exist, such as minify or gzip, and what each setting accepts.
2. **Read the current settings**: get_settings takes a module slug and returns its settings. Credential fields come back masked, so an agent cannot read a stored API token or password back in plain text.
3. **Change them**: update_settings takes the module and a values object of setting keys. The site checks the whole object first. If any key is unknown, any value is outside the schema, or a field is pinned by a constant in wp-config.php, it refuses the write, writes nothing and says which keys and why, sometimes with a "did you mean" hint.
4. **Turn page caching on or off**: Page caching has its own tool, toggle_cache, because it installs or removes the cache drop-in and the WP_CACHE constant. Asking update_settings to set cache_enabled does not work and is refused. If another caching plugin owns the drop-in, the site declines to enable xSpeed and returns blocked: true with the reason.
5. **Check the effect**: The result of a settings write is the stored settings. A module can add a warning when a setting is saved but has no effect on this server, for example Brotli on a server without the module for it, and the agent should pass that on. run_benchmark then times cached against uncached to see whether the change helped.
6. **Apply to many sites only after reading one**: update_settings and toggle_cache accept site: "all" or a list of handles. Each site validates against its own schema and answers in its own row, so a module missing on one site fails that row and the others still apply. Read one site first, then apply.

## Reference

| | |
| --- | --- |
| Discover | list_modules (read): Free and Pro modules, settings schema, status, per site |
| Read settings | get_settings (read): argument module; credential fields masked |
| Change settings | update_settings (write): arguments module and values; validated by the site |
| Bad input | The whole write is refused and nothing is written; the error names the keys and reasons |
| Page cache on or off | toggle_cache (write): argument enabled; cache_enabled in update_settings is refused |
| Blocked by another plugin | toggle_cache returns blocked: true with blocked_reason when another plugin owns the cache drop-in |
| Every site at once | update_settings and toggle_cache accept site: "all" or a list of handles, one result per site |
| Pro modules | A Pro module on a site without an active licence cannot be read or written; the site refuses |
| Credential fields | Refused by default over MCP; set them in the xSpeed dashboard, not through the agent |
| Read-only connection | The connection token with Read-only everywhere on, or a Viewer member's sign-in: update_settings and toggle_cache are refused; list_modules and get_settings still work. An OAuth sign-in gets the scopes the client asks for, read and write by default, clamped to the member's role |
| Confirmation | None on the Hub; the Hub tells the agent to briefly confirm intent for these two, and your client's prompt is the gate |

## Rules

- Read before you write. Ask for list_modules and get_settings first, so the agent changes real keys with valid values instead of guessing.
- update_settings and toggle_cache change how a live site behaves. They run as soon as your connection allows writes. The Hub tells the agent to briefly confirm intent first, which is guidance to the agent, so your client's approval prompt and a read-only connection (the connection token with Read-only everywhere on, or a Viewer sign-in) are the gates. The switch does not limit an OAuth sign-in.
- For site: "all", the Hub tells the agent to confirm once with "this will touch all N sites", then make one call. The result is per site, and some sites failing is a partial result to report, not a blanket success or failure.
- Do not ask an agent to set credentials such as a Cloudflare token or Redis password. The site refuses those writes by default, and they belong in the xSpeed dashboard.
- If a settings result says a value is saved but inactive on this server, relay that. Do not tell the user the feature is enabled.

## Good to know with Paperclip

If the agent reaches the Hub through the adapter with dangerouslySkipPermissions left on, update_settings runs the moment the agent decides to call it, and only the instruction in your ticket holds it back. Set it to false, or use the connector route with the writes on Ask first, or send a connection token with Read-only everywhere on so the Hub refuses every write. A routine that reviews settings each week should use that read-only token. User scope is shared by every Claude Code agent the same OS user runs.

## More prompts for this job

They work in any client connected to xSpeed Hub.

- Use xSpeed Hub to list the modules on shop and tell me which ones are off.
- Ask xSpeed Hub for the current minify settings on blog.
- With xSpeed Hub, turn on HTML minification on blog, then benchmark the cache and tell me if it helped.
- Use xSpeed Hub to turn page caching off on staging while I debug, and tell me when it is off.
- Using xSpeed Hub, read the gzip settings on shop first, then enable the same options on every site.
- Use xSpeed Hub to set the page cache lifespan on docs to 30 days, and if the site refuses it, tell me why.

## Frequently asked questions

### Will a Paperclip agent wait for my approval before changing a setting?

Only if your setup makes it wait. The Claude Code adapter skips permission prompts by default, and xSpeed Hub has no confirmation step of its own. Use the Connectors page with update_settings on Ask first or Off, set dangerouslySkipPermissions to false, or connect read-only with a token that has Read-only everywhere on.

### Can a Paperclip routine review settings on every site?

Yes. A routine fires on a cron schedule and gives a task to an agent, which can read each site's settings with get_settings and post the differences on the task. Keep the routine read only and apply changes from a ticket you approve.

### How does an agent know which settings exist?

It calls list_modules for the site, which returns every available module with its settings schema and status, then get_settings for the one module it wants to change. The schema says which keys exist and what values each accepts.

### What happens if the agent sends a wrong setting key?

The site refuses the whole update and writes nothing. The error names the keys it rejected and why, such as an unknown key, a value outside the allowed range, or a field fixed by a constant in wp-config.php, and it can suggest the nearest valid key.

### How do I turn page caching on or off with an agent?

Use toggle_cache with enabled set to true or false. It installs or removes the cache drop-in and the WP_CACHE constant. Setting cache_enabled through update_settings does not work. If another caching plugin already owns the drop-in, the site will not enable xSpeed and says why.

### Can one prompt change settings on all of my sites?

Yes. update_settings and toggle_cache accept site: "all", and the Hub runs the sites one after another with a one-second pause and returns a result per site. Each site checks the values against its own schema, so a site that lacks the module fails its own row while the others apply.

### Can the agent change my Cloudflare or Redis credentials?

Not by default. Writing credential fields over MCP is off unless the site owner allows it, and the site refuses the write and names the fields. Set credentials in the xSpeed dashboard. Credential values also come back masked when an agent reads settings.

## Tune cache settings with other agents

[Claude Code](https://xspeedcache.com/agent/claude-code/cache-settings/) · [Claude](https://xspeedcache.com/agent/claude/cache-settings/) · [Claude Cowork](https://xspeedcache.com/agent/claude-cowork/cache-settings/) · [ChatGPT](https://xspeedcache.com/agent/chatgpt/cache-settings/) · [Codex](https://xspeedcache.com/agent/codex/cache-settings/) · [Cursor](https://xspeedcache.com/agent/cursor/cache-settings/) · [GitHub Copilot in VS Code](https://xspeedcache.com/agent/github-copilot/cache-settings/) · [Windsurf](https://xspeedcache.com/agent/windsurf/cache-settings/) · [Gemini CLI](https://xspeedcache.com/agent/gemini-cli/cache-settings/) · [Antigravity](https://xspeedcache.com/agent/antigravity/cache-settings/) · [Zed](https://xspeedcache.com/agent/zed/cache-settings/) · [Kiro](https://xspeedcache.com/agent/kiro/cache-settings/) · [OpenCode](https://xspeedcache.com/agent/opencode/cache-settings/) · [OpenClaw](https://xspeedcache.com/agent/openclaw/cache-settings/) · [Hermes Agent](https://xspeedcache.com/agent/hermes-agent/cache-settings/) · [Grok Build](https://xspeedcache.com/agent/grok-build/cache-settings/) · [ChatGPT dots](https://xspeedcache.com/agent/chatgpt-dots/cache-settings/) · [Grok](https://xspeedcache.com/agent/grok/cache-settings/) · [Grok Bot](https://xspeedcache.com/agent/grok-bot/cache-settings/) · [Muse](https://xspeedcache.com/agent/muse/cache-settings/) · [Manus](https://xspeedcache.com/agent/manus/cache-settings/) · [Kimi Code](https://xspeedcache.com/agent/kimi/cache-settings/) · [NanoClaw](https://xspeedcache.com/agent/nanoclaw/cache-settings/)

## More with Paperclip

- [Purge the WordPress cache with Paperclip](https://xspeedcache.com/agent/paperclip/purge-cache/)
- [Find out why WordPress pages are not cached with Paperclip](https://xspeedcache.com/agent/paperclip/troubleshoot-cache/)
- [Scan a website for speed problems with Paperclip](https://xspeedcache.com/agent/paperclip/speed-scan/)
- [Run and track PageSpeed tests with Paperclip](https://xspeedcache.com/agent/paperclip/pagespeed-tests/)
- [Raise a WordPress site's PageSpeed score with Paperclip](https://xspeedcache.com/agent/paperclip/optimize-site/)
- [Warm the WordPress cache with Paperclip](https://xspeedcache.com/agent/paperclip/preload-cache/)
- [Set up the Redis object cache with Paperclip](https://xspeedcache.com/agent/paperclip/object-cache/)
- [Manage Cloudflare caching with Paperclip](https://xspeedcache.com/agent/paperclip/cloudflare/)
- [Manage every WordPress site at once with Paperclip](https://xspeedcache.com/agent/paperclip/fleet/)

## Documentation

- How to enable Page Cache: https://xspeedcache.com/docs/page-cache/
- How to minify CSS and JavaScript: https://xspeedcache.com/docs/minify/
- How to add cache rules and bypasses: https://xspeedcache.com/docs/rules-and-bypass/
- Site MCP tool reference: https://xspeedcache.com/docs/mcp-tool-reference/
