# OpenClaw + xSpeed: Manage WordPress Caching

> OpenClaw is an open-source assistant that runs a Gateway on your own machine and answers in the chat apps you already use, and with xSpeed Hub added as an MCP server it can read cache status, purge, change settings and run speed tests on every WordPress site in your workspace. You save one server, sign in once, and ask from your phone.

Page: https://xspeedcache.com/agent/openclaw/
Last updated: October 2026

- Two commands to connect, then ask from Slack, Telegram, Discord or whichever channel your Gateway serves
- A per-server tool filter can leave the write tools out of the agent altogether
- Built-in automations can send you a cache report on a schedule, and the Hub needs no scheduler of its own

## How do I connect OpenClaw to xSpeed?

### 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. Save xSpeed Hub as an MCP server

Run this on the machine that hosts your OpenClaw Gateway. Set the transport to streamable-http: OpenClaw falls back to SSE when you leave it out. With --auth oauth the command saves the server without a connection test, because sign-in has to happen first.

```bash
openclaw mcp add xspeedhub \
  --url https://app.xspeedcache.com/xspeed/mcp \
  --transport streamable-http \
  --auth oauth
```

### 3. Sign in with openclaw mcp login

OpenClaw prints an authorization URL and listens on a loopback address for the callback. Open the URL, sign in to xSpeed Hub and approve; the token exchange finishes by itself. There is no token to paste. If your browser is on another machine, copy the code from the redirect and pass it back with openclaw mcp login xspeedhub --code. Then check the connection.

```bash
openclaw mcp login xspeedhub
openclaw mcp doctor xspeedhub --probe
```

### 4. Or use a connection token (alternative)

If you prefer a header, copy the connection token from Connect AI in the Hub (only the workspace owner sees it) and save the server without OAuth. A static Authorization header is ignored while auth is oauth, so do not combine them. openclaw mcp doctor warns when a header holds a literal secret, so move the value out of any config you commit.

```bash
openclaw mcp set xspeedhub '{"url":"https://app.xspeedcache.com/xspeed/mcp","transport":"streamable-http","headers":{"Authorization":"Bearer <your connection token>"}}'
```

**Authentication:** OAuth sign-in or connection token. Run openclaw mcp login xspeedhub and approve access in the browser; OpenClaw keeps the credentials it receives with the Gateway. If you would rather use a header, save the connection token from the Hub's Connect AI page as an Authorization header on a server without OAuth.

**Check it worked:** ask "Ask xSpeed Hub for my sites, then tell me which ones have a hit ratio under 60% in the last 24 hours."

## Does OpenClaw ask before it changes my site?

OpenClaw gives you two client-side gates, and the Hub adds none. First, openclaw mcp tools xspeedhub --include limits which tools exist for the agent, so a list of read tools keeps every write out of reach. Second, when the Codex runtime runs your agent turns, MCP tool approvals follow the session's permission posture, and the default full-permission posture does not prompt. openclaw mcp configure xspeedhub --approval prompt asks on every call, and Allow Always saves a grant for that one tool with any arguments. OpenClaw's docs describe that per-call prompt for the Codex runtime; with its own embedded runtime, use the tool filter to decide what the agent can call. The Hub has no confirmation step of its own.

xSpeed Hub has no confirmation step of its own. Read tools change nothing on your sites, with one exception to know about: contact_support sends an email to xSpeed support, and a read-only connection can still call it. 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. Three things stand between a prompt and a change: your connection's scope, because a read-only connection refuses every write tool (the connection token has a Read-only everywhere switch, and a Viewer member only ever gets read access); your AI client's own tool-approval prompt; and the Hub's instructions to the agent, which tell it to confirm the target site and to ask once before a write that touches every site.

## Example session

```
You: Using xSpeed Hub, is anything off with my sites' caches this morning?
  → list_sites [read-only]: 2 sites: shop and docs
  → get_cache_status(site: shop) [read-only]: page cache on, hit ratio 81% in the last 24h
  → get_cache_status(site: docs) [read-only]: page cache on, hit ratio 52% in the last 24h
Agent: shop looks healthy at 81%. docs is lower at 52%. I can start the preloader on docs to warm it. Want me to?
You: Yes, start it.
  → start_preloader(site: docs) [changes site]: preloader started, 96 URLs queued
Agent: Started. The preloader is warming 96 URLs on docs. I will check the hit ratio again whenever you ask.
```

## What is OpenClaw?

OpenClaw is an open-source assistant. You run one Gateway process on your own machine, and it connects chat apps such as Slack, Telegram, Discord, Signal, WhatsApp and Matrix to an AI agent that can run tools, so you can message your assistant from anywhere.

MCP, the Model Context Protocol, is how OpenClaw reaches services outside your machine. Saved MCP servers live under mcp.servers in its config, and a remote one takes a url and a transport. Adding xSpeed Hub that way gives the agent the Hub's caching tools: status, purge, settings, preloader, object cache, Cloudflare and speed tests, for every site in your workspace.

## Why use OpenClaw with xSpeed?

- **Ask where you already chat**: The Gateway answers in your chat apps, so checking a cache or warming a site from your phone is a message, not a laptop session.
- **Filter tools before the agent sees them**: A per-server include list decides which Hub tools become OpenClaw tools. A reads-only list means the agent has no purge or toggle to call.
- **A scheduler that is already there**: Automations run a prompt on a cron schedule and deliver the answer to a channel, so a daily hit-ratio report needs no extra service.

## Good to know

- Leave the transport out and OpenClaw uses SSE. Set --transport streamable-http for the Hub.
- openclaw mcp login runs on the Gateway host and listens on loopback. If your browser is elsewhere, use the --code fallback the command prints.
- A static Authorization header is ignored for a server while auth is oauth. Use one method per server.

## Prompts to try

- Use xSpeed Hub to show the cache hit ratio for every site and flag anything under 70%.
- With xSpeed Hub, purge the page cache on blog, then start the preloader and tell me how many URLs it queued.
- Use xSpeed Hub to run a mobile PageSpeed test on shop and compare it with the stored score history.
- Using xSpeed Hub, is Redis reachable on docs? Check before you touch the object cache.
- Use xSpeed Hub to send me the Cloudflare status for every site that has Cloudflare connected.

## Schedule a report-only cache check

OpenClaw has a built-in scheduler, called automations. This job runs every morning in a fresh session, reads the cache status of each site, and posts the result to a Slack channel. The Hub has no scheduler for agent prompts, so the timer is OpenClaw's. An isolated run is unattended: nobody is there to approve a tool call. If a rule or approval mode pre-approves writes, a scheduled job can run them with no one watching, so keep scheduled jobs to reads unless you mean it. The --tools list names only the two read tools this report needs.

```bash
openclaw automations create "0 8 * * *" \
  "Use xspeedhub to read the cache status of every site. List any site with page caching off or a hit ratio under 70%. Only read; do not purge or change anything." \
  --name "xSpeed daily cache report" \
  --tz "America/Los_Angeles" \
  --session isolated \
  --tools "xspeedhub__list_sites,xspeedhub__get_cache_status" \
  --announce \
  --channel slack \
  --to "channel:C1234567890"
```

## What can OpenClaw do with xSpeed?

- [Purge the WordPress cache with OpenClaw](https://xspeedcache.com/agent/openclaw/purge-cache/): Clear stale pages after a deploy, an edit or a plugin update, on one site or all of them.
- [Find out why WordPress pages are not cached with OpenClaw](https://xspeedcache.com/agent/openclaw/troubleshoot-cache/): Work out why a site misses the cache, serves slow pages or shows a low hit ratio, using read-only checks first.
- [Scan a website for speed problems with OpenClaw](https://xspeedcache.com/agent/openclaw/speed-scan/): Get a graded speed report with the fix for every failing check and a link you can share, for your own site or any public URL.
- [Run and track PageSpeed tests with OpenClaw](https://xspeedcache.com/agent/openclaw/pagespeed-tests/): Read the PageSpeed scores a site already has, run a new test when something changed, and tell a Lighthouse score from a cache benchmark.
- [Raise a WordPress site's PageSpeed score with OpenClaw](https://xspeedcache.com/agent/openclaw/optimize-site/): Preview and apply xSpeed's recommended settings to a site, check the pages still work, and be told plainly what caching cannot fix.
- [Tune WordPress cache settings with OpenClaw](https://xspeedcache.com/agent/openclaw/cache-settings/): See which modules a site has, read their current settings, change them, and turn page caching on or off.
- [Warm the WordPress cache with OpenClaw](https://xspeedcache.com/agent/openclaw/preload-cache/): Fill the page cache before visitors arrive, for example right after a purge or a deploy.
- [Set up the Redis object cache with OpenClaw](https://xspeedcache.com/agent/openclaw/object-cache/): Connect a site to Redis or Memcached so database results survive between requests.
- [Manage Cloudflare caching with OpenClaw](https://xspeedcache.com/agent/openclaw/cloudflare/): Check the Cloudflare connection, clear the edge cache and switch development mode on or off for a site.
- [Manage every WordPress site at once with OpenClaw](https://xspeedcache.com/agent/openclaw/fleet/): Run one action across all of your sites, or a chosen few, and read the result site by site.

## Which way should I connect?

| Surface | Endpoint | Reaches | Auth | Tools |
| --- | --- | --- | --- | --- |
| [xSpeed Hub MCP](https://xspeedcache.com/docs/hub-mcp/) | `https://app.xspeedcache.com/xspeed/mcp` | Every site in your workspace, one connection | OAuth sign-in in the browser, or a connection token in an Authorization header | 29 tools (16 read, 13 write), seven of them can act on every site at once |
| [xSpeed Cache Site MCP](https://xspeedcache.com/docs/mcp-server/) | `https://your-site.com/xspeed/mcp` | One WordPress site | OAuth sign-in by a site admin, or the site's own token in an Authorization header | The full per-site tool set plus run_command for the WP-CLI surface |
| [xSpeed Scan MCP](https://xspeedcache.com/docs/scan-mcp/) | `https://xspeedcache.com/scan/mcp` | Any public URL, read-only | None. No account. | 5 tools: run_speed_scan, get_speed_scan and three product-info tools |
| [WP-CLI](https://xspeedcache.com/docs/wp-cli-commands/) | `wp xspeed …` | The site whose server the agent has a shell on | Your server login | Every xSpeed command: cache, purge, preloader, objcache, cf, score, settings and more |

## Frequently asked questions

### How do I add xSpeed Hub to OpenClaw?

Run openclaw mcp add xspeedhub with the url https://app.xspeedcache.com/xspeed/mcp, the streamable-http transport and --auth oauth, then run openclaw mcp login xspeedhub and approve access in the browser. openclaw mcp doctor xspeedhub --probe confirms the connection.

### Do I need an API key?

No. OpenClaw signs in to the Hub with OAuth and keeps the credentials it receives with the Gateway. If you prefer a header, the workspace owner can copy the connection token from the Hub's Connect AI page and save it as an Authorization header on a server that does not use OAuth.

### Will OpenClaw change my site without asking?

It depends on your setup. The Hub has no confirmation step of its own, so a write tool runs as soon as your connection allows writes. In OpenClaw you can leave write tools out with a tool filter, or, when the Codex runtime runs your turns, set the server to prompt on every call. The default full-permission posture does not prompt. A connection token with Read-only everywhere on, or a Viewer member's sign-in, refuses every write.

### Can OpenClaw run xSpeed jobs on a schedule?

Yes, through its automations scheduler. Create a job with a cron expression and a prompt, and OpenClaw runs it in a fresh session and posts the result to a channel. The Hub has no scheduler of its own. A scheduled run is unattended, so keep scheduled jobs to reads such as a daily hit-ratio report unless you intend them to write.

### Which tools does OpenClaw get?

The 29 tools of the xSpeed Hub MCP server, named with the server first, for example xspeedhub__purge_cache. Sixteen only read; thirteen change a site or spend the shared speed-test allowance. Use a tool filter to expose fewer.

### Can I use OpenClaw with one site and no Hub?

Yes. The xSpeed Cache plugin has its own MCP server at your-site.com/xspeed/mcp, switched on from xSpeed Cache, AI and agents, MCP in wp-admin. The Hub is the better fit once you have more than one site.

### How do I disconnect OpenClaw?

Run openclaw mcp logout xspeedhub to clear the stored credentials, and openclaw mcp unset xspeedhub to remove the server. Rotating or disconnecting the connection token in the Hub revokes only clients that send that token, so it does not end an OAuth sign-in; that is removed in OpenClaw.

## Also works with

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

## Sources

- OpenClaw docs: Manage saved MCP servers: https://docs.openclaw.ai/cli/mcp/registry
- OpenClaw docs: Transports and OAuth: https://docs.openclaw.ai/cli/mcp/transports
- OpenClaw docs: Automations: https://docs.openclaw.ai/automation/cron-jobs
- OpenClaw docs: Manage automations: https://docs.openclaw.ai/automation/cron-jobs/managing-jobs
- OpenClaw docs: Automation payloads: https://docs.openclaw.ai/automation/cron-jobs/payloads
- OpenClaw docs: Tool policy: https://docs.openclaw.ai/gateway/config-tools/tool-policy
