WP Manifestindependent plugin directory
manifest / ai / wp-abilities-lab

WP Abilities Lab

Registers custom WordPress abilities for MCP exposure.

★ 1stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/elpuas/wp-abilities-lab/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

A minimal WordPress plugin that registers custom abilities using the WordPress Abilities API. These abilities can be discovered and executed by AI agents via the WordPress MCP Server.

What is the Abilities API?

The WordPress Abilities API creates a central registry of capabilities, making WordPress functions discoverable and accessible to:

  • AI agents and automation tools
  • MCP (Model Context Protocol) clients
  • External integrations

The MCP Adapter bridges the Abilities API to MCP, enabling AI assistants like Claude to discover and invoke WordPress abilities programmatically.

Requirements

  • PHP 8.1+
  • WordPress 6.9+ (includes the Abilities API in core)

Installation

  1. Upload the wp-abilities-lab folder to /wp-content/plugins/
  2. Activate the plugin through the Plugins menu in WordPress
  3. Ensure the MCP Adapter plugin is active for AI agent discovery

Registered Abilities

Ability Description
create_posts Allows the creation of new WordPress posts programmatically

Usage

Once activated, the plugin registers the create_posts ability with the WordPress Abilities API. This ability becomes discoverable by:

  1. The WordPress MCP Server plugin
  2. AI agents connecting via MCP
  3. Any tool querying the abilities registry

Example: Querying Registered Abilities

// Get all registered abilities (requires Abilities API)
$abilities = wp_get_abilities();

foreach ( $abilities as $ability ) {
    echo $ability->get_label() . ': ' . $ability->get_description();
}

Extending This Plugin

To add more abilities, use the wp_register_ability() function on the wp_abilities_api_init hook:

add_action( 'wp_abilities_api_init', function() {
    wp_register_ability(
        'my-plugin/my-custom-ability',
        [
            'label'       => 'My Custom Ability',
            'description' => 'Description of what this ability does.',
            // Add execute_callback, input_schema, permission_callback as needed
        ]
    );
} );

Note: Ability names must include a namespace prefix (e.g., my-plugin/my-ability) and can only contain lowercase alphanumeric characters, dashes, and forward slashes.

Notes

  • The plugin gracefully handles the absence of the Abilities API by showing an admin notice
  • No execution logic is included yet—this is a registration-only skeleton
  • The plugin does not modify the MCP Server or add REST routes

License

GPL-2.0-or-later