> For the complete documentation index, see [llms.txt](https://docs.acpt.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.acpt.io/integrations/abilities-api.md).

# Abilities API

Expose everything ACPT can do to AI agents and MCP clients via the WordPress Abilities API

{% hint style="warning" %}
The [WordPress Abilities API](https://developer.wordpress.org/apis/abilities-api/) is a **WordPress 6.9+** core feature. This integration registers ACPT's abilities but does nothing on sites running an older WordPress version — see [Requirements](#requirements) below.
{% endhint %}

The Abilities API is a standard way for WordPress core, plugins, and themes to declare **discrete, machine-readable actions** — each with a name, a human description, a JSON Schema for its input and output, a permission check, and a PHP callback. AI agents, MCP (Model Context Protocol) servers, and other automated tools can discover these actions and call them safely, without scraping the admin UI or guessing at internal APIs.

ACPT registers **57 abilities** covering everything you can build with the plugin: custom post types, taxonomies, meta field groups/boxes/fields, field values, option pages, forms, dynamic blocks, and Custom Content Types (tables, table groups, and records). An AI agent connected to your site can, for example, design a new content model end-to-end — "create a Movie post type with a Genre taxonomy and a Release Date field" — by calling these abilities directly.

{% hint style="info" %}
The 15 **Custom Content Types (CCT)** abilities are registered alongside the rest, but the operations they perform need the CCT feature enabled (**ACPT → Settings → Content settings**) and a valid ACPT license — otherwise the call returns a normal failure envelope.
{% endhint %}

### In this section

* [How it works](/integrations/abilities-api/how-it-works.md) — architecture, ability naming, the response envelope, permissions, and error handling
* [Custom post types](/integrations/abilities-api/custom-post-types.md)
* [Taxonomies](/integrations/abilities-api/taxonomies.md)
* [Meta field groups, boxes & fields](/integrations/abilities-api/meta-fields.md)
* [Field values](/integrations/abilities-api/field-values.md)
* [Option pages](/integrations/abilities-api/option-pages.md)
* [Forms](/integrations/abilities-api/forms.md)
* [Dynamic blocks](/integrations/abilities-api/dynamic-blocks.md)
* [Custom Content Types](/integrations/abilities-api/custom-content-types.md)
* [Agent Connector for WP](/integrations/abilities-api/agent-connector-for-wp.md) — using ACPT's abilities through Agent Connector's MCP server
* [Extending](/integrations/abilities-api/extending.md) — filters for developers, adding your own abilities
* [Full reference](/integrations/abilities-api/reference.md) — every ability in one table

## Requirements

* **WordPress 6.9 or later.** The Abilities API ships in WordPress core starting with 6.9. On earlier versions, `wp_register_ability()` doesn't exist and ACPT's integration stays inactive — no abilities are registered, and nothing else in ACPT is affected.
* **The "Enable Abilities API" setting**, which is **disabled by default**.

## Enabling it

Go to **ACPT → Settings → Content settings** and toggle **Enable Abilities API** on — it's off by default, alongside the other feature toggles described in [Content settings](/settings/settings/content-settings.md).

Internally, this toggle just flips the `enable_abilities_api` option, which ACPT reads into a `ACPT_ENABLE_ABILITIES_API` constant at boot. The integration checks **both** that constant **and** that `wp_register_ability()` actually exists before doing anything:

```php
// src/Integrations/AbilitiesAPI/ACPT_AbilitiesAPI.php
protected function isActive(): bool
{
    if (!defined("ACPT_ENABLE_ABILITIES_API")) {
        return false;
    }

    if (!ACPT_ENABLE_ABILITIES_API) {
        return false;
    }

    return function_exists('wp_register_ability');
}
```

So it's always safe to leave the setting on — on a site that later gets upgraded to WordPress 6.9, the abilities simply start appearing without any further action from you.

## Using the abilities from an MCP client

Every ACPT ability is registered with `show_in_rest` and with `mcp.public` set to `true` in its `meta`. That is what the official [WordPress MCP Adapter](https://github.com/WordPress/mcp-adapter) needs to discover and run an ability, so with the adapter active, its default MCP server exposes all of ACPT's abilities. No other plugin is required.

Through the MCP Adapter, each call runs as the WordPress user the MCP client authenticates as, and ACPT's own capability checks apply (see [Permissions](/integrations/abilities-api/how-it-works.md#permissions)). This lets you give an agent a user account limited to what it needs.

[Agent Connector for WP](/integrations/abilities-api/agent-connector-for-wp.md) is another way to reach the same abilities. It adds an audit log, but replaces ACPT's capability checks with its own admin-only gate, and gives agents extra tools of its own.

## A first call, end to end

Once enabled on WordPress 6.9+, here's what creating a custom post type through the Abilities API looks like from PHP:

```php
$ability = wp_get_ability('acpt/save-post-type');

// post_name/singular_label/plural_label are the only required fields - everything else
// (icon, supports, labels, settings) is optional and gets filled in with the same
// defaults the admin UI's creation wizard pre-selects (public, visible in wp-admin,
// title + editor support, etc.) if you don't send it. Send an explicit empty value
// (e.g. "supports": []) instead of omitting a field if you deliberately want it empty.
$result = $ability->execute([
    'post_name'      => 'movie',
    'singular_label' => 'Movie',
    'plural_label'   => 'Movies',
]);

if (is_wp_error($result)) {
    echo 'Error: ' . $result->get_error_message();
} else {
    // $result === ['success' => true, 'message' => '...', 'data' => [ ...the created post type... ]]
}
```

Any MCP server or AI agent wired into WordPress's Abilities API sees the exact same `acpt/save-post-type` ability, with the same schema and description, and can call it the same way — that's the entire point of the integration. See [How it works](/integrations/abilities-api/how-it-works.md) for the full request/response contract, and [Custom post types](/integrations/abilities-api/custom-post-types.md#defaults-when-fields-are-omitted) for exactly what gets pre-filled.
