What You’ll Learn
- How the Abilities API enables discovery of MainWP capabilities
- Available ability categories and endpoints
- How to execute abilities and handle responses
- Error handling for AI agent integrations
Introduction
WordPress Developer Blog
Handbook
Full framework documentation
GitHub
Source and issues
How It Works
The Abilities API adds a discovery layer to WordPress. AI agents and automation tools query/wp-abilities/v1/abilities to see all available actions, their input schemas, output schemas, and behavioral annotations. This enables dynamic discovery of what operations are possible and automated parameter validation.
MainWP MCP Server
Connect Claude, VS Code Copilot, and Cursor to your MainWP Dashboard through the Model Context Protocol. The MCP Server exposes MainWP abilities as tools that AI assistants can call directly.
Prerequisites
- WordPress 6.9 or later
- MainWP Dashboard 6.0 or later
- WordPress user with
manage_optionscapability - API key with appropriate permissions
Base URL
All Abilities API endpoints use the WordPress Abilities namespace:Authentication
The Abilities API accepts any WordPress REST API authentication method.Bearer Token
Use the same API keys generated in Dashboard > API Access > API Keys > Add API Keys:Application Passwords
Create an Application Password in Dashboard > API Access > Application Passwords:Discovery Endpoints
These endpoints let you explore what abilities are available.List All Abilities
Get Single Ability
List Categories
Sites Abilities
30 abilities for site management
Updates Abilities
13 abilities for update management
Clients Abilities
11 abilities for client management
Tags Abilities
7 abilities for tag management
Executing Abilities
Endpoint
HTTP Methods
Each ability specifies whether it reads or modifies data:- GET — Read-only abilities (marked
readonly: true) - POST — Abilities that create, update, or delete data
Input Handling
GET requests: Omit theinput parameter to use schema defaults. URL-encoded JSON in query strings does not work reliably.
Response Format
Success
Abilities return their defined output schema directly:Errors
Error responses follow WordPress REST API conventions:Ability Annotations
Each ability includes metadata describing its behavior:
These annotations help AI agents make informed decisions about which abilities to call and in what order.
Error Reference
Abilities API Errors
MainWP-Specific Errors
Feature-Gated Abilities
Some abilities require optional MainWP modules:
If the required module is inactive, these abilities return a
mainwp_module_not_available error.
Related Resources
- MCP Server - Connect AI assistants to MainWP
- Sites Abilities - Site management abilities
- REST API Overview - Alternative REST API
- Batch Operations - Monitor batch jobs
