# NanoClaw + xSpeed: Manage WordPress Caching

> NanoClaw is a small open-source assistant that runs each agent in its own container on Anthropic's Claude Agent SDK and answers in WhatsApp, Telegram, Slack or Discord, and with xSpeed Hub added to an agent group it can read cache status, purge, change settings and run speed tests on your WordPress sites from a chat message. You add one server with the ncl command line, restart the group, and ask with the trigger word.

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

- Ask about your sites from the chat app you already use
- One MCP server on one agent group, sent a token you can set to Read-only everywhere
- Scheduled tasks post a report-only cache check to a chat

## How do I connect NanoClaw 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. Add xSpeed Hub to your agent group

Copy the connection token from Connect AI in the Hub (only the workspace owner sees it). Then run this on the machine that hosts NanoClaw, with your agent group's ID from ncl groups list. The header goes in as a JSON object, because NanoClaw refuses credentials inside the URL. NanoClaw may ask an admin to approve the change.

```bash
ncl groups config add-mcp-server --id <group-id> --name xspeedhub \
  --url https://app.xspeedcache.com/xspeed/mcp \
  --headers '{"Authorization":"Bearer <your connection token>"}'
```

### 3. Restart the group and ask

The new server takes effect after a restart. Then message your agent with its trigger word, @Andy by default, and ask something that names xSpeed Hub.

```bash
ncl groups restart --id <group-id>
```

### 4. Or ask Claude Code to wire it into your fork (alternative)

NanoClaw is customised by changing your own copy, and its README says to tell Claude Code what you want. Run Claude Code inside your NanoClaw folder and paste this if you would rather not type the commands yourself.

```
Add the remote MCP server https://app.xspeedcache.com/xspeed/mcp to my agent group as xspeedhub, with an Authorization: Bearer header holding my xSpeed Hub connection token, then restart the group.
```

**Authentication:** Connection token. NanoClaw describes no browser sign-in for an MCP server inside an agent's container, so send the connection token from the Hub's Connect AI page as an Authorization: Bearer header. Only the workspace owner can see that token.

**Check it worked:** ask "@Andy use xSpeed Hub to list my sites and tell me which ones have page caching turned off."

## Does NanoClaw ask before it changes my site?

Whether NanoClaw asks you before an MCP tool runs depends on how your fork and its admins are set up; its documentation gates adding a server behind approval but describes no per-tool prompt for calls. xSpeed Hub has no confirmation step of its own, so a write runs as soon as the agent calls it and your connection allows writes. The Hub tells the agent to confirm the target site and to ask once before a write that touches every site, which in NanoClaw shows up as a question in the chat. The firm stop is the token: with Read-only everywhere on, the Hub refuses every write tool. Keep it on for scheduled tasks.

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: @Andy use xSpeed Hub to purge the page cache on every site. I just changed the footer.
  → list_sites [read-only]: 4 sites: shop, blog, docs, landing
Agent: That purges the page cache on all 4 sites, and each one serves uncached pages until it warms again. Purge all 4?
You: Yes, all of them.
  → purge_cache(site: all, type: page) [changes site]: 3 purged, 1 failed: landing was unreachable
Agent: Purged shop, blog and docs. landing did not answer, so its old footer is still cached. Want me to try landing again in a few minutes?
```

## What is NanoClaw?

NanoClaw is an open-source AI assistant that runs agents in their own containers. It is built on Anthropic's Claude Agent SDK and is meant to be small enough to read, so you own a fork of the code and change it to fit what you need rather than editing a settings file.

You talk to it from a chat app such as WhatsApp, Telegram, Discord or Slack, and an agent answers when you use its trigger word. A remote MCP server is added to an agent group's container configuration with the ncl command line, and the group is restarted to pick it up. MCP, the Model Context Protocol, is how xSpeed Hub describes its caching tools, so one server gives that agent status, purge, settings, preloader, object cache, Cloudflare and speed tests for every site in your workspace.

## Why use NanoClaw with xSpeed?

- **Ask from your phone**: The chat app you already use becomes the front end. One message from WhatsApp, Telegram, Slack or Discord and the agent asks xSpeed Hub for the answer.
- **You own the agent**: NanoClaw runs on your machine in containers you control. The Hub is one server on one agent group, and you remove it the same way you added it.
- **A report that arrives on its own**: A scheduled task can read every site each morning and post a short cache report to a chat, through a token that cannot change anything.

## Good to know

- The token is stored in the agent group's container configuration on your host. Keep that machine and its backups private, or hold the token in NanoClaw's credential gateway instead, following its gateway documentation.
- The server is added per agent group. Add it to each group that should reach your sites, and restart that group afterwards.
- NanoClaw needs Docker on your own machine, and the setup is yours to maintain. Whether it prompts before a tool call depends on your fork.
- Rotating or disconnecting the connection token in the Hub cuts off NanoClaw and any other client that sends the same token.

## Prompts to try

- @Andy use xSpeed Hub to show the cache hit ratio for every site and flag anything under 70%.
- @Andy with xSpeed Hub, purge the page cache on blog, then start the preloader.
- @Andy use xSpeed Hub to read the PageSpeed score history for shop. Do not run a new test.
- @Andy with xSpeed Hub, check whether Redis is reachable on shop.
- @Andy use xSpeed Hub to tell me whether the preloader on docs has finished.

## Post a report-only cache check on a schedule

NanoClaw runs a prompt on a cron schedule in the agent group's own session. A scheduled task has no chat attached, so the prompt has to say where to send the result. The Hub has no scheduler for agent prompts, so the timer is NanoClaw's. Nobody is there to say yes to a write, so keep the prompt to reads and send it through a token with Read-only everywhere on. Pause, resume, cancel or run a task by hand with ncl tasks.

```bash
ncl tasks create \
  --group <group-id> \
  --name "xSpeed cache report" \
  --recurrence "0 8 * * 1-5" \
  --prompt "Use xSpeed Hub to read the cache status of every site and send a short report to telegram listing any site with page caching off or a hit ratio under 70%. Read only: do not purge, toggle, change settings or run speed tests."
```

## What can NanoClaw do with xSpeed?

- [Purge the WordPress cache with NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/object-cache/): Connect a site to Redis or Memcached so database results survive between requests.
- [Manage Cloudflare caching with NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 NanoClaw](https://xspeedcache.com/agent/nanoclaw/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 connect NanoClaw to xSpeed Hub?

Copy the connection token from Connect AI in xSpeed Hub. Run ncl groups config add-mcp-server with the name xspeedhub, the URL https://app.xspeedcache.com/xspeed/mcp and an Authorization Bearer header holding the token, then restart the group with ncl groups restart. You can also ask Claude Code to make the same change in your NanoClaw fork.

### Do I need an API key?

You need the Hub's connection token, which only the workspace owner can see on the Connect AI page. NanoClaw describes no browser sign-in for an MCP server inside its container, so the token is the route here.

### Will NanoClaw change my site without asking?

It can. Whether NanoClaw prompts before a tool call depends on your fork, and xSpeed Hub has no confirmation step of its own, so a write runs once the agent calls it. The Hub tells the agent to confirm before a write that touches every site. For a firm stop, turn on Read-only everywhere on the token, which makes the Hub refuse every write tool.

### Can NanoClaw send me a regular cache report?

Yes. ncl tasks create runs a prompt on a cron schedule. Name the chat destination in the prompt, because a scheduled task has no conversation attached, and keep it read only.

### Where does NanoClaw keep the xSpeed Hub server?

In the container configuration of the agent group you added it to. NanoClaw stores it in its database and writes it to the group's container.json when the container starts, so the server belongs to that group only.

### Can one message act on all of my sites?

Yes, for the Hub tools that accept every site, such as purge_cache and start_preloader. The Hub returns a result per site, so the agent can tell you in the chat which sites failed.

### How do I disconnect NanoClaw?

Remove the server from the agent group with ncl groups config remove-mcp-server and restart the group. To cut access on the Hub side too, rotate or disconnect the connection token on the Connect AI page.

## 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/) · [OpenClaw](https://xspeedcache.com/agent/openclaw/) · [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/)

## Sources

- NanoClaw on GitHub: https://github.com/nanocoai/nanoclaw
- NanoClaw: ncl groups commands: https://github.com/nanocoai/nanoclaw/blob/main/src/cli/resources/groups.ts
- NanoClaw: agent templates and MCP servers: https://github.com/nanocoai/nanoclaw/blob/main/docs/templates.md
- NanoClaw: scheduled tasks: https://github.com/nanocoai/nanoclaw/blob/main/docs/scheduled-tasks.md
