search

WP Rocket MCP: Manage WordPress Caching From Your AI Assistant

WP Rocket is the caching plugin most people reach for to speed up WordPress. Its newest feature changes how you work with it.

Instead of clicking through settings screens, you can now ask an AI assistant to read your configuration, suggest improvements, and even apply them for you. It works through the Model Context Protocol (MCP) and the WordPress Abilities API.

This guide explains what the WP Rocket MCP integration is, what it can do, and how to set it up. By the end, a client like Claude, Cursor, or ChatGPT can manage your caching and performance in plain language.

What Is the WP Rocket MCP Integration?

The Model Context Protocol (MCP) is a standard that lets an AI assistant connect to outside tools and data. Anthropic introduced it in late 2024, and many AI apps now support it.

The Model Context Protocol is an open standard for connecting AI assistants to the systems where data lives. Anthropic describes it as a “USB-C port for AI applications”, one standard way to plug a model into many tools.

WP Rocket builds on the WordPress Abilities API. That is a way for a plugin to register actions other software can call, such as “read the settings” or “change a setting”.

WP Rocket registers a small set of these actions. Its bundled MCP Adapter then exposes them to any connected AI client as tools it can use.

In plain terms: WP Rocket describes what it can do, and your AI assistant calls those actions for you.

What You Can Do With It

WP Rocket registers eight abilities in two groups: options and insights. Together they let an assistant audit your setup and act on it.

AbilityGroupWhat it does
get-optionsOptionsReturns your current WP Rocket settings as data
set-optionOptionsChanges a single setting (for example, enable lazy load)
get-recommendationsInsightsSuggestions to improve, ranked for your site
get-insights-scoresInsightsYour overall Rocket Insights performance scores
get-page-insights-scoreInsightsThe score for one specific page
add-page-insightsInsightsAdds a URL to Rocket Insights and tests it
retest-page-insightsInsightsRe-runs the test for a tracked page
remove-page-insightsInsightsRemoves a page from Rocket Insights

The two you will use most are get-options and set-option.

Before it changes a list-type setting, WP Rocket tells the assistant to read your settings first. That way it does not erase entries you already have, such as your list of URLs to exclude from caching.

Before You Start: Requirements

This is a new capability, so the pieces need to be recent. Here is what you need.

  • WordPress 6.9 or newer. WP Rocket checks for this version before it turns the feature on.
  • WP Rocket 3.22 or newer. The abilities were added in the 3.22 line, which also bundles the MCP Adapter that exposes them over the REST API. On a WP Rocket 3.22+ site the adapter is already present, so you do not need to install a separate adapter plugin.
  • An MCP client. Any Model Context Protocol app works, such as Claude Desktop or Cursor.
  • A way to add a small code snippet to your site: a functions file, a must-use plugin, or a code snippets plugin.

At the time of writing, the abilities ship in the WP Rocket 3.22 beta and are off by default. Treat this as an early feature and test it on a staging site before you use it on a live site.

Step 1: Enable WP Rocket’s Abilities

WP Rocket keeps these abilities off by default, so nothing is exposed without your say-so. You turn them on with one line of code, called a filter.

The filter is named rocket_enable_abilities, and it stays off until you switch it on like this.

add_filter( 'rocket_enable_abilities', '__return_true' );

Add that line to a must-use plugin or your theme’s functions file. Once it is active, and the requirements above are met, the abilities become available to your MCP client.

Step 2: Connect Your AI Client

Once the abilities are on, the MCP Adapter that ships with WP Rocket publishes an MCP endpoint on your site. It lives at /wp-json/mcp/mcp-adapter-default-server, and you point your AI client at that URL.

You sign in with a WordPress application password, and most desktop clients connect through a small proxy that talks to the endpoint for you. Here is the full setup.

  1. Create an application password. In wp-admin, open Users, go to your profile, and scroll to Application Passwords. Name it “MCP”, generate it, and copy the value. WordPress shows it only once.
  2. Add your site to the client. Open your client’s MCP configuration file (for example, claude_desktop_config.json for Claude Desktop or ~/.cursor/mcp.json for Cursor) and add the block below. It runs the @automattic/mcp-wordpress-remote proxy, which forwards requests to your site.
{
  "mcpServers": {
    "wp-rocket": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://your-site.com/wp-json/mcp/mcp-adapter-default-server",
        "WP_API_USERNAME": "your-username",
        "WP_API_PASSWORD": "your-application-password"
      }
    }
  }
}

Replace the three values with your own: the endpoint URL for your domain, your WordPress username, and the application password you just created. Then restart the client.

To confirm it worked, ask the assistant to list the tools it can see. The WP Rocket abilities should appear.

If the client cannot reach the endpoint, check two things. Make sure the MCP Adapter is active (WP Rocket bundles it, or you can install the standalone WordPress MCP Adapter plugin), and make sure the abilities filter from Step 1 is enabled.

Clients with built-in support for remote MCP servers can skip the proxy and point straight at the endpoint URL.

An application password gives real access to your site. Use a dedicated account where you can, store the password in a password manager, and revoke it the moment you stop using the connection.

Step 3: Ask in Plain Language

Now you talk to your site instead of clicking through tabs. The assistant turns your request into the right ability, runs it, and reports back.

Here are prompts that map cleanly to the abilities:

  • “What WP Rocket caching and file optimization settings are on right now?” runs get-options.
  • “Turn on lazy load for images and enable Remove Unused CSS.” reads your settings, then runs set-option for each change.
  • “What does WP Rocket recommend I improve on this site?” runs get-recommendations.
  • “Add my homepage to Rocket Insights, test it, and show the score.” runs add-page-insights and get-page-insights-score.

Because the assistant reads before it writes, you can also ask it to explain a setting first, then decide. To understand what each toggle actually changes, pair this with how to improve WordPress loading time.

How Rocket Insights Recommendations Work

The get-recommendations ability returns WP Rocket’s own suggestions for your specific site, not generic tips. Each one carries a flag called mcp_actionable.

That flag tells the assistant whether it can apply the fix directly.

  • mcp_actionable: true means the fix maps to a setting the assistant can change with set-option, such as turning on lazy load.
  • mcp_actionable: false means the fix needs a manual step, so the assistant should explain it rather than apply it.

The recommendations also report a status. If it is still loading, the assistant waits and retries. If it is completed, it shows the list.

This makes the flow feel like a review. You get a ranked list, and you approve the items you want. Many of them target your Core Web Vitals.

Use It Safely

The same power that makes this useful also means an assistant can change how your site loads. Treat AI-driven changes like any performance change: verify them.

A few options can break layout or scripts on some themes, especially Remove Unused CSS and delay JavaScript. Keep these habits.

  • Work on a staging copy first, then apply the same changes to your live site once you have checked them.
  • Ask the assistant to list exactly which options it changed, so you have a record.
  • Clear the cache and check your key pages after changes.
  • Keep the enable filter in place only while you need it. Removing it hides the abilities again.

One quick note, because the names cause confusion. WP Rocket is the caching plugin from WP Media covered here. Rocket.net is a separate hosting company with its own MCP integration. This guide is about the WP Rocket plugin.

FAQs

Common questions about the WP Rocket MCP integration:

Which WP Rocket and WordPress versions do I need?
You need WordPress 6.9 or newer and WP Rocket 3.22 or newer. At the time of writing the feature is in the WP Rocket 3.22 beta and is off by default.
Do I need to be a developer to use it?
Enabling it takes one line of code and a one-time connection in your AI client. After that, using it is plain language: you ask questions and approve changes, with no code required.
Which AI clients can connect to WP Rocket?
Any Model Context Protocol client, including Claude Desktop and Cursor. Because MCP is a shared standard, you are not tied to one AI vendor.
Can it change my settings, or only read them?
Both. The get-options and get-recommendations abilities read data, while set-option changes a setting. WP Rocket tells the assistant to read your current settings before it changes a list-type option, so it does not erase entries you already have.
Is it safe to let an AI apply performance changes?
It is as safe as any performance change, which means you should verify it. Options like Remove Unused CSS and delay JavaScript can break some themes. Test on staging, ask the assistant to list what it changed, clear the cache, and check your key pages.
Is this the same as the Rocket.net MCP?
No. WP Rocket is a caching plugin from WP Media, and this guide covers its abilities. Rocket.net is a separate managed hosting company with its own MCP integration. The names are similar, but they are different products.
Does this replace the WP Rocket dashboard?
No, it complements it. The settings screen is still there and remains the source of truth. The MCP integration is just a faster way to check and adjust those same settings through conversation.

Summary

WP Rocket’s MCP integration turns caching work into a conversation. It builds on the WordPress Abilities API and the Model Context Protocol.

A connected AI client can read your settings, surface recommendations for your site, and apply the safe ones for you. Enable it with the rocket_enable_abilities filter, connect your client, and start on a staging site.

Used carefully, it is a fast way to keep WP Rocket tuned without hunting through tabs.

Join the Discussion
0 Comments  ]

Leave a Comment

To add code, use the buttons below. For instance, click the PHP button to insert PHP code within the shortcode. If you notice any typos, please let us know!

Savvy WordPress Development official logo