FleetWP Docs
Developers

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/mcp alongside 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

  1. In FleetWP, open Agents & API and create a token (see Authentication). Copy it; it starts with fwp_.
  2. In your MCP client, add a remote (Streamable HTTP) server:
    • URL: https://app.fleetwp.io/api/mcp
    • Header: Authorization: Bearer fwp_your_token_here

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

ToolDescriptionToken scope
list_sitesList all sites in the workspaceread
get_siteShow details for one siteread
list_backupsList a site's backupsread
create_backupStart a backup (type: full / db / files); returns a job_idwrite
restore_backupRestore a backup onto the live site (destructive); returns a job_idwrite
update_siteApply updates, optionally limited to specific pluginswrite
site_login_urlGenerate a one-click admin login URLwrite
get_activityRecent activity, for the workspace or one siteread
log_activityLog maintenance done outside FleetWP against a sitewrite
get_inventoryLive plugin, theme and core list with available updatesread
get_securityOpen security findings, for one site or the whole fleetread
list_site_tweaksSecurity fixes (Site Tweaks) and which are appliedread
apply_security_fixApply or revert security fixeswrite
get_performanceLatest performance sample and recent trendread
get_uptimeRecent uptime checksread
get_errorsDeduped PHP error logread
get_broken_linksBroken links from the last scanread
get_jobCheck one backup, restore or update by job_idread
list_jobsRecent backups, restores and updatesread

Each tool also carries standard MCP hints (read-only, destructive, idempotent) so clients can ask for confirmation before risky actions. restore_backup and update_site 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.

On this page