Operations integration
Wordfence AI agent tool reference
WP MCP adds Wordfence ops on the theme dispatcher pair, reached through one adapter over Wordfence's own classes so an install without a class answers cleanly instead of fataling. Reads: get-wordfence-status (open issues by severity, last scan, firewall mode, brute force settings including the real forgot-password limit, whether Wordfence is blocking WordPress application passwords, with the setting to change when it is, whether Wordfence's setup is complete, and the license tier as none, free or paid), list-wordfence-scan-issues, list-wordfence-blocked-attacks, list-wordfence-blocks and list-wordfence-login-failures, each built from allowlisted fields only (never the API key or alert email) and passed through a redactor that also masks secret-shaped query parameters in attack URLs. The lists mask personal data: emails inside attack URLs, descriptions and block reasons, and the username tried in a failed login, while the IP stays in full so the agent can block or unblock it. Writes are destructive and ask for confirm:true with a preview: block-wordfence-ip and unblock-wordfence-ip go through the same calls Wordfence's own Blocking screen makes, so its firewall resyncs, and ignore-wordfence-scan-issue through its Scan screen. Each is snapshotted first as an image of the Wordfence rows it touches, so rollback-operation puts them back exactly. Every op takes Wordfence's own admin capability (network-wide on multisite).
Wordfence in plain language: Wordfence MCP.
In practice
How Wordfence work goes with an agent.
Wordfence data lives in its own tables and settings: wfIssues for scan findings, wfHits for requests it blocked, wfBlocks7 for active IP blocks, wfLogins for failed logins. An agent triaging an incident needs those, but not the API key or the alert email sitting next to them. WP MCP reads each table with an allowlist of fields, masks secret-looking query parameters in attack URLs, and goes through Wordfence's own classes for the three writes. It runs at Wordfence's own admin capability, network-wide on multisite.
Give me a Wordfence status: open issues by severity, last scan, and firewall mode.
Runs get-wordfence-status on theme-read. It returns issue counts by severity, last scan time and result, firewall mode and the brute force settings, with no keys. Read only.
Which IPs hit wp-login most in the last hours, and are any already blocked?
Runs list-wordfence-login-failures and list-wordfence-blocks, then compares the addresses. Failure rows include the IP in full and the username tried, masked to its first character. Read only.
Block 198.51.100.4 for 24 hours and show me what you will do first.
Runs block-wordfence-ip with duration 86400. The call returns a preview and runs only with confirm:true. It refuses the caller's own IP and any allowlisted IP. The Wordfence rows are snapshotted first.
Ignore scan issue 52, it is a known false positive, but only until the file changes.
Runs ignore-wordfence-scan-issue with how ignoreC. Using ignoreP would ignore it always. The issue row is snapshotted, so rollback-operation restores its earlier status.
What your AI can do
Real Wordfence operations, every write reversible.
- Read the scan summary, firewall mode and brute force settings
- See whether Wordfence is blocking application passwords, which stops MCP clients from connecting
- Read the setup state and license tier, never the key
- List scan issues, blocked attacks, active IP blocks and login failures
- Block or unblock an IP through Wordfence's own Blocking calls
- Ignore a scan issue through Wordfence's own Scan calls
- Roll back a block, unblock or ignore exactly
Example prompts
Example Wordfence prompts.
What does Wordfence show, open issues and recent blocked attacks?
Block the IP that is hammering wp-login, and show me the preview first.
Unblock 203.0.113.9; it was one of our own people.
Under the hood
The Wordfence calls, under the hood.
theme-read({ operation: "list-wordfence-blocked-attacks" }), allowlisted fields, secrets masked
theme-write({ operation: "block-wordfence-ip", args: { ip: "203.0.113.9" }, confirm: true }), preview first; snapshotted, reversible
Safety and access
What can be undone on Wordfence, and what costs what.
Recoverable on Wordfence
- block-wordfence-ip, unblock-wordfence-ip and ignore-wordfence-scan-issue each snapshot the Wordfence rows they touch before they run.
- rollback-operation puts back every block row on the IP, or the scan issue row, exactly.
- Unblocking removes every block on that IP, and a rollback restores all of them.
Wordfence limits and opt-ins
- All three writes are destructive operations and need confirm:true, with a preview shown first.
- A block on the caller's own IP, or on an IP Wordfence allowlists, is refused.
- A block is permanent unless a duration in seconds is given.
- There is no operation to start a scan, change firewall settings or edit Wordfence options. Those stay in Wordfence's own screens.
Free or Pro: The Wordfence integration is free. It runs on the theme dispatcher pair as theme-read and theme-write, so it adds no extra tools. With Wordfence inactive, the operations stay listed but answer wordfence_inactive and touch nothing. There is no opt-in filter. The writes are protected by confirm:true with a preview, the capability check, and the snapshot. Pro adds nothing to this integration.
In the free plugin
The Wordfence integration is in the free plugin.
The core Wordfence tools ship in the free, GPL plugin with the full snapshot and undo engine, and no trial clock. Pro adds 133 more tools, including Elementor deep editing, the other page builders, the forms adapter pack and, for some integrations, extra operations. The pricing page lists what each tier includes.
Frequently asked
Wordfence MCP: questions, answered.
Can an agent read the Wordfence API key or alert email?
No. Reads build their answers from allowlisted fields only and pass through a redactor that also masks secret-shaped parameters in attack URLs. The API key and alert email are never returned.
Is blocking an IP reversible?
Yes. Each block, unblock or ignore is snapshotted first as an image of the Wordfence rows it touches, so rollback-operation puts them back exactly. The writes ask for confirm:true with a preview.
Why can my MCP client not connect on a Wordfence site?
Wordfence can disable WordPress application passwords, which blocks every application password client, WP MCP included. get-wordfence-status reports application_passwords_disabled and, when it is on, names the Wordfence setting under Brute Force Protection that turns it off.
Does the Wordfence integration expose usernames or IPs?
IPs, yes: blocks, attacks and login failures return the IP in full, because blocking and unblocking need it. Usernames, no: the username tried on a failed login is masked to its first character (a*** style, or j***@example.com when it is an email), and emails inside attack URLs, descriptions and block reasons are masked the same way. It never returns the Wordfence API key, the alert email or other stored settings. Treat the output as sensitive and keep it out of public tickets.
What can it filter scan issues by?
The status argument takes new, ignoreP, ignoreC or all, with new as the default, and limit goes up to 200. Issues come back ordered by severity then time, each with its type, severity name, message and the file it names, taken from Wordfence's own data without loading any class from it.
What does unblocking an IP remove?
Every Wordfence block on that IP, of any type and expiry, in one call. The preview reports how many block rows exist before it runs, and the response says how many were removed. If the IP has no block, the call is refused. Everything removed is restored by rollback-operation.
Related integrations
More integrations for the same agent.
MCP for Solid Security
FreeOperations, 1 tools.
MCP for Sucuri Security
FreeOperations, 1 tools.
MCP for All In One WP Security
FreeOperations, 1 tools.
MCP for Limit Login Attempts Reloaded
FreeOperations, 1 tools.
MCP for UpdraftPlus
FreeOperations, 2 tools.
MCP for Duplicator
FreeOperations, 1 tools.
Browse the full Integrations hub, or read more on Wordfence MCP and the WordPress MCP plugin.