MCP server
Let AI agents manage your WordPress fleet through the Model Context Protocol.
FleetWP speaks the Model Context Protocol two ways, with the same tools and the same token:
- Hosted: connect any MCP client that supports remote servers to
https://app.fleetwp.io/api/mcp. Nothing to install. - Local: run
@fleetwp/mcpalongside an agent that launches MCP servers as local commands (Claude Desktop, Claude Code).
Either way the agent can do exactly what its token allows, through the same checks as the REST API.
Hosted server
- In FleetWP, open Agents & API and create a token (see
Authentication). Copy it; it starts with
fwp_. - In your MCP client, add a remote (Streamable HTTP) server:
- URL:
https://app.fleetwp.io/api/mcp - Header:
Authorization: Bearer fwp_your_token_here
- URL:
Check the connection from a terminal:
curl -s https://app.fleetwp.io/api/mcp \
-H "Authorization: Bearer fwp_your_token_here" \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'The hosted server is stateless and always answers in plain JSON. A missing or invalid token is rejected with HTTP 401. When a single tool is refused (for example a read-only token asking for a backup), that call returns an error result and the connection stays up.
Local server
The server reads FLEETWP_URL and FLEETWP_TOKEN from its environment. In an
MCP client config:
{
"mcpServers": {
"fleetwp": {
"command": "npx",
"args": ["-y", "@fleetwp/mcp"],
"env": {
"FLEETWP_URL": "https://app.fleetwp.io",
"FLEETWP_TOKEN": "fwp_your_token_here"
}
}
}
}Tools
| Tool | Description | Token scope |
|---|---|---|
list_sites | List all sites in the workspace | read |
get_site | Show details for one site | read |
list_backups | List a site's backups | read |
create_backup | Start a backup (type: full / db / files); returns a job_id | write |
restore_backup | Restore a backup onto the live site (destructive); returns a job_id | write |
cancel_backup | Stop a queued or running backup | write |
set_backup_schedule | Set automatic backups and how many to keep | write |
update_site | Update plugins (by plugin file as get_inventory lists them, e.g. akismet/akismet.php), themes and/or WordPress core; returns a job_id | write |
list_plugin_versions | WordPress.org versions a plugin can roll back to | read |
rollback_plugin | Install an earlier version of a plugin (destructive); returns a job_id | write |
set_plugin_state | Activate or deactivate plugins | write |
install_packages | Install plugins or themes from WordPress.org | write |
switch_theme | Switch the active theme | write |
lock_update | Lock a plugin or theme against updates (unlocking stays in the dashboard) | write |
site_login_url | Generate a one-click admin login URL | write |
get_activity | Recent activity, for the workspace or one site | read |
log_activity | Log maintenance done outside FleetWP against a site | write |
get_inventory | Live plugin, theme and core list with available updates | read |
get_security | Open security findings, for one site or the whole fleet | read |
list_site_tweaks | Security fixes (Site Tweaks) and which are applied | read |
apply_security_fix | Apply or revert security fixes | write |
get_performance | Latest performance sample and recent trend | read |
get_uptime | Recent uptime checks | read |
get_errors | Deduped PHP error log | read |
get_broken_links | Broken links from the last scan | read |
run_scan | Run a fresh security, performance, broken-link, update, domain, server or database scan | write |
get_domain_health | Domain, SSL and email health, for one site or every site with problems | read |
list_visual_checks | A site's recent visual checks (screenshots before and after updates) | read |
get_visual_check | One visual check's pages, what changed, and image links | read |
get_server_health | A site's disk, PHP, OPcache, scheduled tasks and caching, from the last scan | read |
get_database_health | A site's database size, largest tables, autoloaded options and clutter | read |
get_store_health | WooCommerce card-testing activity and checkout exposure, for one store or every store | read |
clean_database | Clean up database clutter, backing up the database first | write |
list_reports | Saved reports with their dashboard links, and each kind's schedule | read |
generate_report | Build and save a site, security or performance report now | write |
set_report_schedule | Set when a site saves each kind of report | write |
get_site_settings | A site's name and which features are on | read |
update_site_settings | Rename a site or turn features on or off (not available to agent tokens) | write |
list_ignored | What's ignored on a site, by kind | read |
ignore_issue | Hide a known PHP error, broken link, security finding or domain check | write |
unignore_issue | Bring an ignored issue back | write |
update_connector | Install the latest FleetWP connector (not available to agent tokens) | write |
get_job | Check one backup, restore, update or database cleanup by job_id | read |
list_jobs | Recent backups, restores, updates and other operations | read |
Each tool also carries standard MCP hints (read-only, destructive, idempotent)
so clients can ask for confirmation before risky actions. restore_backup, update_site,
rollback_plugin, set_plugin_state, switch_theme and clean_database are marked
destructive.
Scope your token
Give the agent a token whose scope matches what you want it to do. A read token lets it observe the fleet without being able to trigger backups, updates, or logins.