Connect Claude or ChatGPT to Your Site's Cache With the xSpeed MCP Server

Updated November 30, 2026 · 7 min read

Summarize with:
Share:

The xSpeed MCP server lets an AI assistant such as Claude, Claude Code, Cursor or ChatGPT work on your WordPress site’s cache: check whether pages are cached, purge, preload, read and change settings, and time the home page. It’s built into the free xSpeed Cache plugin that xCloud turns on by default for new WordPress sites, so there’s nothing extra to host and no API key to buy. You turn it on with one click in wp-admin, paste a snippet into your AI app, and revoke it any time.

This guide shows how to connect, which connection type to choose, how approvals for risky actions work, and how to rotate or disconnect.

What you need

  • A WordPress site on xCloud with xSpeed Cache active. New sites created from the dashboard get it by default; see which sites start with xSpeed Cache if yours doesn’t.
  • An administrator account on that WordPress site. Only administrators can connect, rotate or disconnect.
  • An AI app that supports MCP (Model Context Protocol), the open standard that lets an assistant call tools. Claude Code, Claude Desktop, claude.ai, Cursor and ChatGPT’s custom connectors all do.

The screenshots below were taken with xSpeed Cache 1.4.10 on an xCloud Nginx site.

xSpeed MCP vs xCloud MCP

Both are MCP servers, but they control different things. Use the one that matches the job, or connect both.

xSpeed MCP server xCloud MCP
Runs on Your WordPress site, inside the xSpeed Cache plugin xCloud
Controls One site’s cache: status, purge, preload, cache settings, database cleanup Your xCloud account: servers, sites, backups, deployments, security
Connect from wp-admin → xSpeed Cache → AI & agents → MCP Server Your AI app; see Connect xCloud MCP for the address
Sign-in A token for this site, or browser approval as a WordPress administrator Browser sign-in to your xCloud account, or an API key

For what the account-wide server can do, read what you can ask xCloud MCP to do.

Step 1: Open wp-admin from xCloud

In xCloud, open your site and click Magic Login at the top right of the Site Overview page. wp-admin opens in a new tab, signed in as an administrator, with no password to type.

The xCloud Site Overview page for a WordPress site, with the Magic Login button marked at the top right.

To change which WordPress user Magic Login signs in as, see Magic Login in xCloud.

Step 2: Click Connect on the MCP Server page

In wp-admin, go to xSpeed Cache → AI & agents → MCP Server. The page says Not connected until you connect. Click Connect.

The xSpeed Cache MCP Server page in wp-admin, showing Not connected and the Connect button marked.

The status changes to Connected, and xSpeed creates a private token for this site. The connection has read and write access: the assistant can read status and settings, purge, preload and change ordinary settings. For read-only access, see For developers.

Step 3: Copy the snippet for your AI app

Under Add this MCP server to your AI client, pick the tab your app uses and click Copy:

Tab Use it for What you paste
Claude Code (CLI) Claude Code A one-line command. Run it once in your terminal.
JSON config Claude Desktop, Cursor and other apps with an MCP config file A block to add to the app’s MCP config file.
Remote (OAuth) claude.ai connectors, ChatGPT custom connectors and other apps that only ask for a URL Just the server URL. You approve access in your browser.
AI prompt Not recommended A message to paste into a chat. It puts your token in the conversation.

The Add this MCP server to your AI client card with the Claude Code (CLI), JSON config, AI prompt and Remote (OAuth) tabs marked; the token is hidden.

The Claude Code (CLI) and JSON config snippets keep the token out of web addresses and logs. Treat the token like a password: anyone who has it can control this site’s cache.

After you paste the snippet, restart the AI app or reload its MCP servers, then ask it “Is caching on for my site?” to check the connection.

Step 4 (optional): Connect with the site URL instead of a token

Apps that add an MCP server by URL use the Remote (OAuth) tab. Copy the server URL shown on the tab and add it as a custom connector in your AI app. There is no token field.

The Remote (OAuth) tab on the MCP Server page, with the server URL to copy marked.

Your AI app opens a page on your site. Sign in as an administrator and approve access: the Connect to xSpeed page shows your site, the account you’re signed in as and the access level. Click Approve to connect, or Deny to refuse. Approving grants the same read and write access as the token.

What you can ask the assistant

Once connected, ask in plain words. The assistant picks the right tool. For example:

  • “Is page caching on, and how many pages are cached?”
  • “Purge the page cache, then preload the site.”
  • “Time my home page with and without cache.”
  • “Turn on CSS minification and show me the setting afterwards.”
  • “Scan the database for post revisions and spam comments I can clean up.”

To see every tool your assistant can call, open Tools your AI agent can call on the MCP Server page. Tools that can change your site are marked. Tools that need xSpeed Pro, such as PageSpeed runs and Critical CSS, only appear when Pro is active.

The assistant can’t connect, rotate or disconnect the MCP server itself, and on a normal connection it can’t change stored passwords or API keys, or where the object cache connects. Those stay with you in wp-admin.

Step 5: Approve actions that can’t be undone

Some actions delete data, such as cleaning the database or importing settings from another cache plugin. When the assistant asks for one, nothing runs. Instead, every wp-admin screen shows a notice with the exact action and its options, and Approve and Deny buttons.

A wp-admin notice saying an AI assistant wants to run a database clean on this site, with the Approve and Deny buttons marked.

  • Click Approve to let the assistant run that exact action once. It must repeat the same request within 10 minutes.
  • Click Deny to refuse it. The assistant gets the same answer if it asks again.
  • If you do nothing, the request expires after 15 minutes.

An approval covers only the action and options you saw. If the assistant changes an option, it needs a new approval. Before you approve a database cleanup, take a backup of the site if you might want the data back.

Step 6: Check what the assistant did

At the bottom of the MCP Server page, open Activity log. It lists every tool call an assistant sent to this site, newest first, with the options it used. Failed or refused calls are marked in red with the reason, and the eye and pencil icons show read and write calls.

The Activity log section of the MCP Server page, listing recent tool calls such as purge_cache and clean_database.

Click Clear, then Confirm clear, to empty the log.

Step 7: Rotate or disconnect

Both buttons are at the top of the MCP Server page while it’s connected.

The Connected status card on the MCP Server page, with the Rotate and Disconnect buttons marked.

  • Rotate creates a new token and stops the old one at once. Use it if the token may have leaked, for example after pasting it into a chat. Click Rotate, then Rotate token to confirm. The page stays Connected; copy the new snippet into your AI app.
  • Disconnect removes the token and every browser (OAuth) approval. Click Disconnect, then Disconnect again in the confirmation that appears. The status changes to Not connected, and any AI app using this site stops working until you click Connect again.

If the connection fails

  • The app says it is unauthorized: the token was rotated or disconnected. Copy the current snippet from MCP Server again.
  • The app is locked out for a while: after 10 failed attempts with a wrong token, xSpeed blocks that address for 15 minutes. Fix the token, then try again after the wait.
  • Remote (OAuth) sign-in fails on an OpenLiteSpeed site: older OpenLiteSpeed sites can block the sign-in pages. Follow Fix MCP OAuth connection failures on OpenLiteSpeed sites, or connect with the Claude Code (CLI) or JSON config tab, which doesn’t use OAuth.
  • A tool you expected is missing: it needs xSpeed Pro, or the feature behind it is switched off on this site.

For developers

The same actions are available in WP-CLI, from the site’s web terminal or over SSH, run from the site’s folder:

wp xspeed mcp connect --read-only   # connect with read-only access
wp xspeed mcp rotate --read-only    # new token, read-only
wp xspeed mcp status                # connected, access level, endpoint
wp xspeed mcp activity              # recent tool calls
wp xspeed mcp disconnect            # revoke the token

A read-only connection can use every read tool; purges, setting changes, cleanups and other writes are refused. The dashboard doesn’t offer read-only yet, so use --read-only here. The MCP endpoint is https://example.com/xspeed/mcp, with https://example.com/wp-json/xspeed/v1/mcp as a fallback for sites without pretty permalinks.

Frequently asked questions

Do I need an AI API key or a paid plan to use the xSpeed MCP server?

No. The MCP server is part of the free xSpeed Cache plugin, and it needs no API key and no AI Provider. Only a few tools, such as PageSpeed runs and Critical CSS, need xSpeed Pro; they are hidden from the assistant when Pro is not active.

Can the assistant delete data without asking me?

No. Actions that can’t be undone, such as a database cleanup or importing settings from another plugin, wait for you. A notice in wp-admin shows what the assistant asked to run, and nothing happens until you click Approve. The request expires after 15 minutes.

How is this different from xCloud MCP?

xCloud MCP manages your xCloud account: servers, sites, backups and deployments. The xSpeed MCP server runs inside one WordPress site and only controls that site’s xSpeed Cache: status, purges, preloading and cache settings. You can connect both to the same AI assistant.

Can I give the assistant read-only access?

Yes, but not from the dashboard yet. Connect with the read-only WP-CLI command from the For developers section, in the site’s web terminal or over SSH. The assistant can then read cache status and settings, and every change it tries is refused.

If you run into any issues while connecting your AI assistant, feel free to reach out to our support team.