Wordfence MCP · Free
Wordfence MCP: security triage with an AI agent, keys kept out.
A Wordfence MCP server lets an AI agent answer the questions you open Wordfence for: what the last scan found, who is hammering wp-login, which IPs are blocked. WP MCP reads Wordfence's own tables through an allowlist and keeps its three writes behind a preview and a snapshot.
Self-hosted · snapshot before every write · one-click undo
› Who is hammering wp-login? Block the worst IP for a day
theme-read list-wordfence-login-failures, usernames masked
theme-write block-wordfence-ip, preview returned
⛨ wfBlocks7 rows for that IP
✓ 198.51.100.4 blocked for 24 hours. rollback-operation lifts it.
What it is
What a Wordfence MCP server does.
Most of this integration is reading. Wordfence keeps scan findings in wfIssues, blocked requests in wfHits, active blocks in wfBlocks7 and failed logins in wfLogins, with the API key and alert email stored close by. A Wordfence MCP server should give an agent the incident data and never those secrets.
WP MCP builds every answer from allowlisted fields, masks emails inside attack URLs, descriptions and block reasons, masks the username tried in a failed login, and keeps the IP in full so it can be acted on. The writes are three, all destructive and all confirmed: block an IP, unblock an IP, and ignore a scan issue, each through the same calls Wordfence's own screens make.
Read and change
What WP MCP can read and change in Wordfence.
It can read
- Open scan issues by severity, last scan time and result, firewall mode and brute force settings
- Whether Wordfence is blocking application passwords, and the setting that changes it
- Scan issues filtered by status, with type, severity and the file named
- Recent blocked attacks, active IP blocks and failed logins
- Setup state and licence tier as none, free or paid, never the key
It can change
- Block an IP, permanently or for a set number of seconds (confirm:true)
- Unblock an IP, removing every Wordfence block on it (confirm:true)
- Ignore a scan issue always or until it changes (confirm:true)
These are the real ability and operation names the agent calls. TheWordfence AI agent tool reference page lists the calls in detail.
Example prompts
Three things to ask first.
Give me a Wordfence summary: open issues by severity, last scan and firewall mode.
Which IPs failed the most logins recently, and are any of them blocked already?
Ignore scan issue 52 until the file changes; it is a known false positive.
Safety
Every Wordfence write has a way back.
Each block, unblock or ignore is snapshotted as an image of the Wordfence rows it touches: every wfBlocks7 row on that IP, or the wfIssues row. rollback-operation writes those rows back exactly, so an unblock that removed three blocks restores all three.
Snapshot before every write
No tool that writes can skip it. The before-state is saved first, the change is applied second.
One-click undo
Restore a single change with rollback-operation or a whole agent run with rollback-session, from the agent or from wp-admin.
Preview, then confirm
All three writes return a preview and run on confirm:true. Blocking the IP the request comes from, or an IP Wordfence allowlists, is refused so nobody locks themselves out.
Free or Pro
Free.
Wordfence support is in the free plugin and runs on the theme-read and theme-write pair, so it adds no extra tools. Pro adds nothing to this integration apart from unlimited snapshot history with an active licence; the free plugin keeps the last 20 snapshots, which covers the block, unblock and ignore writes.
The free plugin is GPL and has no trial clock. See pricing for what each tier includes.
How to connect
Connect Wordfence MCP in four steps.
- 01Install WP MCP
Upload the free wpmcp plugin and activate it. It needs WordPress 6.9 or newer and PHP 8.1 or newer, and it runs entirely on your own server.
- 02Check the requirement
Wordfence active. Every operation needs Wordfence's admin capability, network-wide on multisite.
- 03Connect your client
Add the site to Claude Code, Claude Desktop, Cursor or any MCP client with a WordPress application password, or the WP-CLI stdio bridge locally. OAuth 2.1 with full or read-only access is there too, once the site owner switches it on.
- 04Ask for the change
Describe what you want done in Wordfence. WP MCP snapshots the target, makes the change, and leaves a Restore button next to it in wp-admin.
Step-by-step guides: Claude,Claude Code andCursor. The docscover the safety model in full.
Frequently asked
Wordfence MCP: questions, answered.
What is Wordfence MCP?
It is Wordfence's scan, firewall and login data made readable by AI agents over the Model Context Protocol, with IP blocking and issue ignoring as confirmed writes. WP MCP exposes it to Claude, Cursor or any MCP client.
Is Wordfence MCP free?
Yes. The Wordfence operations are part of the free WP MCP plugin and work with free or paid Wordfence.
Can the agent start a scan or change firewall rules?
No. There is no operation to start a scan, change the firewall or edit Wordfence options. Those stay in Wordfence's own screens; the writes are limited to IP blocks and ignoring scan issues.
What personal data does it return?
IP addresses, in full, because blocking needs them. Emails in attack URLs, descriptions and block reasons are masked, and so is the username in a failed login. Treat the output as sensitive all the same.
Why is my MCP client refused on a Wordfence site?
Wordfence can disable WordPress application passwords, which stops every application password client. get-wordfence-status reports it and names the Brute Force Protection setting to turn off.
Does Wordfence MCP work with Claude, Claude Code and Cursor?
Yes. Claude Code and Cursor connect to WP MCP over HTTP with a WordPress application password, and Claude Desktop uses the desktop bundle from the WP MCP Connection screen. Clients that can only sign in with OAuth, such as the claude.ai custom connector, need OAuth switched on first with one line in wp-config.php, because it ships off. Once connected, the Wordfence tools are available in every client the same way.
Keep exploring
MCP for Wordfence →
Read Wordfence scan issues, blocked attacks, IP blocks and login failures, and block or unblock an IP, with secrets masked and blocking reversible.
WP Rocket MCP →
A WP Rocket MCP server lets an AI agent clear the cache after a change and adjust how WP Rocket optimises the site, without a trip to its settings tabs.
AIOSEO MCP →
An AIOSEO MCP server lets an AI agent work on All in One SEO without anyone opening the AIOSEO panel on each post.
Fluent Forms MCP →
A Fluent Forms MCP server lets an AI agent read what a form collects and work through the submissions it received.
JetEngine MCP →
A JetEngine MCP server lets an AI agent read the custom fields JetEngine defines and fill them in across your listings.
Browse all integrations, comparefree and Pro, read the docs, or see how the WordPress MCP server works.