Docs
← Back to site

AI and MCP (Abilities API)New

4 min readUpdated November 18, 2026

WP WAF Manager tells WordPress what it can do through the Abilities API, built into WordPress 6.9 and later. AI tools and MCP clients, such as Claude, can then read your Cloudflare setup and, if you allow it, make changes: deploy WAF rules, purge cache, turn on Under Attack mode or block an IP. They work as the WordPress user they sign in as, with the same access that user has on the plugin screens.

What you need#

  • WordPress 6.9 or later.
  • WP WAF Manager 1.0.27 or later, connected to Cloudflare.
  • For MCP clients: the MCP Adapter plugin, active on the same site.
  • A WordPress user who can use the plugin: the minimum role set in Settings → Access Control, and on the User Access list if you use one.

Choose what AI tools may do#

Go to WAF Manager → Settings → AI & MCP.

AI and MCP settings with the abilities choice, the MCP server address and the 16 abilities

Abilities for AI tools has three choices:

Choice What AI tools can do
Read and change (default) All 16 abilities: read everything, and deploy rules, change settings, purge cache and manage IP Access Rules
Read only The 9 read abilities. Nothing in Cloudflare or the plugin can change
Off No abilities and no MCP server

Click Save Settings. The Status lines show whether the Abilities API is available, whether the MCP Adapter is active, the plugin’s MCP server address and the abilities on offer.

Connect an MCP client#

The plugin adds its own MCP server, with every ability as a separate tool:

https://your-site.com/wp-json/wpwafmanager/mcp

Its server ID is wpwafmanager. The MCP Adapter’s default server, /wp-json/mcp/mcp-adapter-default-server, reaches the same abilities through its discover and execute tools.

Over HTTP, from any computer#

  1. In WordPress, go to Users → Profile → Application Passwords, enter a name such as “Claude” and click Add New Application Password. Copy the password. WordPress shows it only once and requires HTTPS for application passwords.
  2. Add the server to your MCP client. For Claude Desktop, add this to its configuration file, with your site address, username and the application password:
{
  "mcpServers": {
    "wp-waf-manager": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://your-site.com/wp-json/wpwafmanager/mcp",
        "WP_API_USERNAME": "your-username",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}
Code
{
  "mcpServers": {
    "wp-waf-manager": {
      "command": "npx",
      "args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
      "env": {
        "WP_API_URL": "https://your-site.com/wp-json/wpwafmanager/mcp",
        "WP_API_USERNAME": "your-username",
        "WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

Restart the client. The WP WAF Manager tools appear in its tool list.

Warning

The application password works like the user’s own password for the REST API. Use a user who needs this access, give each client its own password, and revoke it on the profile screen when you stop using it.

With WP-CLI, on the same server#

When the client runs where WP-CLI can reach the site, it can start the server over STDIO:

{
  "mcpServers": {
    "wp-waf-manager": {
      "command": "wp",
      "args": [
        "--path=/path/to/wordpress",
        "mcp-adapter",
        "serve",
        "--server=wpwafmanager",
        "--user=your-username"
      ]
    }
  }
}
Code
{
  "mcpServers": {
    "wp-waf-manager": {
      "command": "wp",
      "args": [
        "--path=/path/to/wordpress",
        "mcp-adapter",
        "serve",
        "--server=wpwafmanager",
        "--user=your-username"
      ]
    }
  }
}

The abilities#

Every ability that takes a zone accepts the zone ID or the domain. A subdomain such as www.example.com finds its zone.

Ability What it does Type
wpwafmanager/get-overview Plugin version, connected accounts (never their credentials), active profile and which rules are on Read
wpwafmanager/list-zones Zones in the active account with plan and status Read
wpwafmanager/get-waf-rules The rule settings and the five expressions they build; can preview a change without saving it Read
wpwafmanager/get-zone-rules Custom rules live on a zone, each marked as the plugin’s or not Read
wpwafmanager/get-zone-settings SSL mode, Always Use HTTPS, cache level, browser cache TTL and other zone settings Read
wpwafmanager/get-zone-analytics Requests, bandwidth, cache rate and threats from the last Zone Status sync Read
wpwafmanager/get-security-events Recent firewall events for a zone Read
wpwafmanager/list-ip-access-rules Account-wide IP Access Rules Read
wpwafmanager/list-dns-records A zone’s DNS records Read
wpwafmanager/deploy-waf-rules Deploys the saved rules to the zones given, keeping other custom rules unless told to replace them Change
wpwafmanager/update-waf-rule-settings Changes rule settings and saves them to the active profile Change
wpwafmanager/purge-cache Purges everything, or up to 100 URLs, hostnames, prefixes or cache tags Change
wpwafmanager/update-zone-setting Changes one zone setting, such as Under Attack mode or SSL mode Change
wpwafmanager/create-ip-access-rule Allows, blocks or challenges an IP, range, country or ASN Change
wpwafmanager/delete-ip-access-rule Removes an IP Access Rule Change
wpwafmanager/sync-zone-analytics Refreshes the Zone Status figures Change

The abilities check everything the screens check: a bad value is refused before anything is sent to Cloudflare. A change runs with the user’s own access, so an AI tool can do nothing that user couldn’t do on the screens.

Without MCP: the REST API#

The abilities are also on the WordPress REST API, for scripts and other tools. List them, then run one:

curl -u your-username:"xxxx xxxx xxxx xxxx xxxx xxxx" \
  "https://your-site.com/wp-json/wp-abilities/v1/abilities?category=wpwafmanager"

curl -u your-username:"xxxx xxxx xxxx xxxx xxxx xxxx" \
  "https://your-site.com/wp-json/wp-abilities/v1/abilities/wpwafmanager/list-zones/run"

WordPress picks the HTTP method from each ability’s type. Read abilities run with GET. The two changes that remove nothing, create-ip-access-rule and sync-zone-analytics, run with POST and their input in a JSON body, such as {"input": {"mode": "block", "target": "ip", "value": "203.0.113.9"}}. The other changes are marked destructive and safe to repeat, so they run with DELETE and their input in the query string, such as ?input[zone]=example.com.

Troubleshooting#

  • No WP WAF Manager tools in the client: check Settings → AI & MCP. It must not be Off, the status must say the MCP Adapter is active, and the site must run WordPress 6.9 or later.
  • 401 or 403 errors: the username or application password is wrong, or the user doesn’t have the plugin’s minimum role or isn’t on the User Access list.
  • Only 9 tools: the setting is Read only.
  • A Cloudflare error comes back: the API token is missing that screen’s permission. See Connecting to Cloudflare.
Share:

Was this helpful?

This website uses cookies to enhance your browsing experience and ensure the site functions properly. By continuing to use this site, you acknowledge and accept our use of cookies.

Accept All Accept Required Only