Repository navigation
FAQ
An MCP (Model Context Protocol) server that lets Claude Code scan, clean, and harden WordPress sites via SSH. It connects to your WordPress servers, runs WP-CLI commands, and manages the entire malware cleanup process.
- Hosting companies managing client WordPress sites
- WordPress agencies with 20-100+ client sites
- Freelance developers handling cleanup for clients
- Security teams doing WordPress incident response
Yes, as long as you have SSH access and WP-CLI is installed on the server. Works with shared hosting, VPS, dedicated servers, cloud hosting (AWS, DigitalOcean, etc.), and managed WordPress hosts.
Yes. The tool is designed for production use:
- Quarantine moves files instead of deleting (recovery possible)
- Database is backed up before any cleanup
- Passwords are never stored on disk
- All actions are logged for audit trails
- File hashes are verified before operations
Only WP-CLI, which most managed WordPress hosts already have. No agents, plugins, or daemons needed on the server side.
Yes. Set auth_type="password" when adding a site. You'll need to pass the password parameter with every command. The password is never written to disk - it's passed via environment variable and discarded after the SSH session.
Only if using password authentication. Install with brew install sshpass on macOS or apt install sshpass on Ubuntu.
There's no hard limit. The tool has been tested with 30+ sites. For 100+ sites, consider splitting into groups and running parallel Claude Code sessions.
Depends on the site size:
- Small site (few plugins): 1-2 minutes
- Medium site (20+ plugins): 3-5 minutes
- Large site (50+ plugins, lots of content): 5-10 minutes
Minimal impact. Scans run WP-CLI commands which have low overhead. The deep pattern scan (grep) may briefly increase disk I/O on the server. Running scans during low-traffic hours is recommended for large sites.
wp_full_scan gives a summary report. wp_full_scan_verbose shows the output of every individual command, useful for debugging or understanding exactly what was checked.
Some legitimate code triggers detections. Known false positives:
- BuddyBoss
.htaccessfiles in uploads directories -
bbpressandwbcomteamplugin names matching suspicious patterns - Base64 encoding in image-handling plugins
- Minified JavaScript files
Use wp_read_file() to inspect flagged files before taking action.
For most infections, wp_complete_cleanup handles everything in 16 steps. Use manual cleanup when:
- You want to preserve specific files/users
- The infection is unusual and needs custom handling
- You want more control over each step
Each step is independent. If the process stops mid-way:
- Completed steps are already applied
- The database backup from Step 1 is still available
- Re-run
wp_complete_cleanupor continue manually from where it stopped
Partially:
- Quarantined files can be restored from the quarantine directory
- Database can be restored from the backup
- Passwords and salts cannot be reversed (by design - they were compromised)
- Deleted malware files are gone (that's the point)
Typically no visible downtime. The site stays accessible throughout. Users will need to log in again after:
- Salt regeneration (invalidates all sessions)
- Password reset (old passwords no longer work)
Every scan and cleanup action automatically records findings to a local SQLite database. Quarantined file hashes are stored so the same malware is instantly recognized on other sites.
The local database is private to your machine. You can optionally export and share discoveries with the community via wp_threat_export() and submitting a PR.
wp_threat_db_sync()This downloads the latest community-contributed malware signatures from GitHub.
At ~/.wp-malware-cleanup/threat_intel.db (SQLite). Back it up - it contains your accumulated intelligence.
- SSH keys: Referenced by path, never copied or transmitted through the MCP protocol
-
Passwords: Passed as runtime parameters, never written to disk, transmitted via
SSHPASSenvironment variable only for the duration of the SSH command -
Site configs: Stored in
~/.wp-malware-cleanup/sites.jsonwith hostnames and paths, but never passwords
The tool requires SSH access to servers - if someone has SSH access, they already have full control. The tool makes legitimate security operations easier, it doesn't grant new access.
-
wp_generate_report(anonymize=true)- Safe for public sharing, all identifying info removed -
wp_generate_report(anonymize=false)- Contains hostnames, IPs, usernames. Keep private. - Case studies in
docs/case-studies/are auto-anonymized
- Verify hostname and port:
ssh -p PORT user@host - Check if SSH is running on the server
- Check firewall rules allow your IP
- Try
wp_test_connection("site-name")for diagnostics
Install WP-CLI on the server:
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp- Check SSH key permissions:
chmod 600 ~/.ssh/id_rsa - Verify the SSH user can access the WordPress directory
- Verify the user can run WP-CLI:
ssh user@host "wp --info"
Some malware hides in the database rather than files:
- Run
wp_check_db_injections("site-name")specifically - Check
wp_delete_malware_options("site-name", dry_run=True)for DB markers - Inspect
wp_optionsfor suspicious entries manually
- Check that
database_v2.pyexists in the MCP server directory - Run
wp_threat_db_stats()- if it errors, the DB module isn't loading - Check the MCP server logs for import errors
Getting Started
Running as a Service
Threat Intelligence
Reference
Project
- GitHub Repo
- WP Vanguard (threat research)
- Wbcom Designs
- License: GPL-2.0-or-later