What is the WordPress malware cleanup MCP?
WP Malware Cleanup MCP is a Python MCP server by Wbcom Designs that connects to WordPress sites over SSH and WP-CLI to find and remove malware. Scans are read only, destructive tools need confirm=True and show a preview first, and one setup can cover a single site or a fleet. It is GPL licensed.
It is a Python MCP server for people who clean hacked WordPress sites. It logs in over SSH, uses WP-CLI on the host, and lets an AI assistant run scans and cleanup steps while you approve each change.
The README argues that signature scanners miss reinfection. This server hunts the persistence chain: rogue admins, cron hooks, drop-in files, poisoned htaccess rules, SSH key backdoors and payloads hidden in the database.
What an agent can do with it
- Scan quickly, fully or deeply, or by category such as uploads, webshells, themes, cron and wp-config.
- Verify core files and plugins, flag known vulnerable plugin versions and list recently created administrators.
- Back up the database, quarantine files, reinstall core, plugins and themes, reset passwords and regenerate salts.
- Track many sites in one fleet, run batch scans and generate cleanup reports.
Who it is for
Best for
- Freelancers and agencies who repair client sites that keep getting reinfected, and who also use WordPress Developer MCP Server for routine admin.
- Hosts that need the same scan across many accounts, using existing SSH access.
Not for
- Sites without SSH and WP-CLI access.
- Anyone without a backup. The README warns that some operations are irreversible and says to back up files and the database first.
How the safety model works
Tools are grouped into safe, moderate and destructive tiers. Destructive tools show a preview manifest and need confirm=True, deletions quarantine first, and a failed scan is reported as incomplete rather than clean.
Use it with UiChemy
This server repairs and secures a site. When the rebuilt site needs new pages, UiChemy Composer writes HTML, CSS and JS for WordPress, and LocalWP agent tools suit local staging. Click Get Started on uichemy.com.
Connect WordPress Malware Cleanup MCP Server: Scan and Clean Over SSH to your AI client
git clone https://github.com/vapvarun/wp-malware-cleanup-mcp.git ~/.claude/wp-malware-cleanup-mcpCheck requirements
The README asks for macOS 13 or later, Homebrew, a CLI that supports MCP, uv, Python 3.12, and for each WordPress server SSH access with WP-CLI and WordPress 5.0 or later.
Clone and install
Clone the repository, create a Python 3.12 virtual environment with uv and install requirements.txt. sshpass is needed for password based SSH.
Register the server
Register server.py with the virtual environment Python, for example with claude mcp add as shown in the README, then restart the client.
Add a site
Tell the assistant the host, user, WordPress path and key or password. Passwords are passed per call and are not stored on disk.
Scan first
Run a read only scan, review the findings, take a backup, and only then approve any preview manifest.
Client configuration
{
"mcpServers": {
"wp-malware-cleanup": {
"command": "/ABSOLUTE/PATH/TO/wp-malware-cleanup-mcp/.venv/bin/python",
"args": ["/ABSOLUTE/PATH/TO/wp-malware-cleanup-mcp/server.py"]
}
}
}Endpoints and ports
~/.wp-sites/sites.jsonSite configurations~/.wp-malware-cleanup/quarantine/Files moved out of a site~/.wp-malware-cleanup/threat_intelligence.dbLocal SQLite signaturesWhat you can do with it
- Persistence chain huntingIt looks for drop-in backdoors, zero byte decoys, option payloads, cron guards and rogue SSH keys, not only visible shells.
- Preview and confirmDestructive tools show a manifest and run only when called with confirm=True.
- Quarantine firstDeleted files are moved to a recoverable quarantine, and cleanup refuses to run without a recent backup.
- Incomplete is not cleanAn unreachable host or missing binary marks the scan as incomplete and the site as error.
- Fleet scaleMultiple sites, host groups and batch scans share one registry.
- Threat databaseA local SQLite database can learn signatures from cleanups and sync community signatures.
- Nothing on the siteThe README says nothing needs to be installed on the infected site itself.
Tools it exposes
wp_scan
Read only scans with a depth or category scope.
wp_scan_wpconfig / wp_scan_ssh_keys / wp_scan_snippets
Check wp-config.php, authorized_keys and snippet plugins.
wp_list_admins / wp_find_recent_users / wp_audit_user
Review administrator accounts.
wp_backup_database / wp_quarantine_file
Create a backup and move a file to recoverable quarantine.
wp_reinstall_core / wp_reinstall_all_plugins
Replace core or plugins from WordPress.org after confirmation.
wp_reset_passwords / wp_regenerate_salts
Reset credentials and invalidate sessions after confirmation.
wp_clean_cron_events / wp_clean_malicious_htaccess
Remove malicious cron events and htaccess rules.
wp_batch_scan / wp_fleet_status
Scan and summarize many sites.
wp_generate_report
Produce a cleanup report.
Frequently asked questions
What is the WordPress malware cleanup MCP?
It is an open source Python MCP server from Wbcom Designs that uses SSH and WP-CLI to scan WordPress sites for malware and persistence, then cleans them with previews, backups and quarantine. An AI assistant drives it in plain language while you approve each change.
How do I install WP Malware Cleanup MCP?
Clone the repository, create a Python 3.12 virtual environment with uv, install requirements.txt, and register server.py with your MCP client. The README gives a claude mcp add example and a JSON config for desktop clients, then asks you to restart the client.
Does it need anything installed on the infected site?
No. The README says the tool works over your existing SSH access and WP-CLI, so nothing is installed on the site being cleaned. The server host needs Python 3.12 and uv, and password based SSH also needs sshpass.
Is the cleanup reversible?
Partly. Scans are read only and file deletion goes to quarantine first. The README still marks several tools as irreversible, such as password resets and core replacement, and tells you to take a full file and database backup before any cleanup.
Can it clean many WordPress sites at once?
Yes. You can register 20 or more sites, group sites that share a hosting account, run batch scans and view a fleet scorecard. Batch updates only apply to sites that scanned clean, and destructive steps still need confirm=True.
Does it catch malware that comes back after cleanup?
The README targets reinfection specifically, checking drop-in files, cron hooks, rogue admins, SSH keys and database payloads. No scanner can promise a clean result, so re-scan after cleanup and harden the site as the README workflow suggests.
Is it free?
Yes. The README states it is free and open source under GPL-2.0-or-later. You pay only for your own servers and for the AI client you use to drive it, and the README points to a separate threat research site by the same team.
Is it a replacement for a security plugin?
No. It is an incident response toolkit you run on demand over SSH, not a firewall or real time scanner. For ongoing protection keep a maintained security plugin and backups, and see InstaWP MCP for disposable staging sites.


