02 August 2026

WP-CLI Is Now Available in the Agiler CLI and MCP

WP-CLI is now available through both the Agiler CLI and the hosted Agiler MCP server. You can inspect a site, manage plugins and themes, update WordPress, change options, and run other non-interactive WP-CLI tasks without setting up a separate local environment or opening an SSH session.

Commands run inside the selected project’s WordPress runtime, against its live files and database. Agiler supplies the project path, database connection, and project environment variables, then records the command’s status, exit code, duration, and output for later inspection.

Run WP-CLI from your terminal

Once you have selected a default project, pass WP-CLI arguments to agiler wp execute:

agiler config set project-id <project-uuid>

agiler wp execute "core version"
agiler wp execute "plugin list --format=json"
agiler wp execute --timeout 120 "plugin update --all"

The leading wp is optional, so agiler wp execute "wp core version" works too. By default, the CLI waits for the command to finish and prints its output along with the final status.

For longer work, submit the command asynchronously and inspect it later:

command_id=$(agiler wp execute --async --quiet "plugin update --all")

agiler wp get "$command_id"
agiler wp history --limit 10

agiler wp get returns the command metadata and output. Output is paginated when necessary, and the CLI prints the next invocation when more lines remain. agiler wp delete <command-id> removes a completed command or cancels one that is still pending.

Give an MCP agent access to WP-CLI

The Agiler MCP server exposes the same lifecycle as four tools:

ToolWhat it does
wp_runRun a WP-CLI command, synchronously or asynchronously
wp_listList recent commands and their statuses
wp_getFetch a command and a page of its output
wp_cancel_or_deleteCancel a pending command or delete its history

That lets an agent investigate a WordPress site directly from a conversation. For example:

On project <project-id>, run plugin list --update=available --format=json and summarize the available updates. Do not make any changes.

The MCP command omits the leading wp. For work that may outlast a single tool call, an agent can use wp_run with async=true, poll the command with wp_get, and report back when it reaches success, error, or cancelled.

Because WP-CLI commands can change a site, the write tools are marked as destructive for MCP clients that surface approval controls. Access is also gated by the projects.wp:execute API-key scope. The MCP server only exposes the WP-CLI tools when the connected key has that scope, so you can give an agent narrowly scoped access instead of a key with full control of your account.

Built for non-interactive automation

This is WP-CLI execution, not a remote shell. Each command is parsed as WP-CLI arguments; shell pipelines, redirection, and command substitution are not available. Interactive commands such as wp shell and wp db cli, prompts, aliases, and remote target flags are rejected. If a valid WP-CLI command normally asks for confirmation, include --yes so it can complete unattended.

Commands can run for up to 180 seconds. Standard output and standard error are captured together, retained in command history, and available through the CLI or MCP even after the original request finishes.

WP-CLI support is available now. Install or update the CLI with Homebrew:

brew install agilercloud/tap/agiler
# Existing installation:
brew upgrade agilercloud/tap/agiler

For agent access, connect to the hosted MCP endpoint at https://mcp.agiler.io/v1. See the CLI reference and MCP setup guide for authentication and configuration.