/kivo-wise:wp-abilities-mcpfrom kivo-wise
Registers and manages WordPress Abilities API for AI agents in Acorn projects. Covers wp_register_ability, roots/acorn-ai, wordpress/mcp-adapter, ACF 6.8 abilities, and MCP discovery.
Ships in kivo-wise. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
WordPress core (6.9+) has the Abilities API: a registry of named, schema-described actions with a permission callback. The MCP Adapter (wordpress/mcp-adapter) projects those abilities to MCP clients over HTTP or STDIO. roots/acorn-ai adds an Acorn-friendly base class resolved from the container. Register the domain action once as an ability; REST and MCP exposure are flags on it, not separate code.
Runner placeholders come from the session context: {{runner.wp}} (Lando default lando wp), {{runner.acorn}} (lando wp acorn), {{runner.composer}} (lando composer), {{runner.cache}}. Never run wp or composer on the host.
roots/acorn-ai and wordpress/mcp-adapter, or writing the project .mcp.json.discover-abilities, ability:list or /wp-abilities/v1/abilities.{{runner.wp}} core version.roots/acorn-ai and wordpress/mcp-adapter are installed, and where (which composer.json).{{runner.wp}} eval 'foreach (wp_get_abilities() as $a) echo $a->get_name(), PHP_EOL;'. Core registers core/get-site-info, core/get-user-info, core/get-environment-info; ACF 6.8 registers its own when enabled (references/acf-abilities.md).category; register yours on wp_abilities_api_categories_init (or reuse site / user).wp_abilities_api_init, from a service provider boot(). Calling wp_register_ability() anywhere else is rejected with _doing_it_wrong. The registry is created lazily after init, so a hook added in boot() is always in time.
roots/acorn-ai: {{runner.acorn}} make:ability ListProjects creates app/Ai/Abilities/ListProjectsAbility.php; list the class in config/ai-wordpress.php abilities. Override name(), category(), inputSchema(), permission() and meta() (see the traps in references/acorn-ai.md).wp_register_ability('ns/name', [...]) yourself; keep the callback thin and delegate to a class resolved with app().label, a description written like a tool description, an object input_schema (always, even with no properties), an output_schema, and meta.annotations (readonly, destructive, idempotent)./wp-json/wp-abilities/v1/abilities/<name>/run: meta.show_in_rest => true (in WordPress 7.1, meta.public => true seeds it). Read-only abilities answer GET with input in the query; destructive + idempotent ones DELETE; the rest POST.meta.mcp.public => true. The default server lists three tools (abilities mcp-adapter/discover-abilities, get-ability-info, execute-ability, which MCP clients see as mcp-adapter-discover-abilities and so on, / becoming -); public abilities are reached through them, not as separate tools. For direct tools, create a custom server on mcp_adapter_init.{{runner.wp}} mcp-adapter serve --server=mcp-adapter-default-server --user=<login>. HTTP: /wp-json/mcp/mcp-adapter-default-server with an application password.{{runner.cache}}), then verify.sage-theme | acorn-mu-plugin | radicle-app | |
|---|---|---|---|
roots/acorn-ai goes in | the Composer project that requires Acorn (theme composer.json) | the plugin composer.json | root composer.json |
config/ai-wordpress.php | theme config/ | plugin config/ | project config/ |
| Provider registration | acorn-ai's provider is package-discovered; your own provider in the theme's withProviders() | package discovery or the plugin's provider list in its boot configuration | package discovery; your providers in composer.json extra.acorn.providers |
wordpress/mcp-adapter | Bedrock root as a wordpress-plugin (activate it), or a library in the theme + McpAdapter::instance() | library in the plugin vendor/; WordPress never loads its plugin file, so the plugin calls \WP\MCP\Core\McpAdapter::instance() (early on init, gated per environment) | root Composer installs it in the content plugins/ dir (activate it); define WP_MCP_AUTOLOAD as false in the Bedrock config because the classes come from the root autoloader |
| ACF abilities | available when ACF ≥ 6.8 and enable_acf_ai is on | same | ACF not installed by default: no acf/* abilities |
{{runner.acorn}} ability:list (acorn-ai) or the wp eval loop from step 1 shows the name.{{runner.wp}} mcp-adapter list shows mcp-adapter-default-server (and custom servers).echo '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"mcp-adapter-discover-abilities","arguments":{}}}' | {{runner.wp}} mcp-adapter serve --server=mcp-adapter-default-server --user=<login> lists your ability.GET /wp-json/wp-abilities/v1/abilities/<name> as an authenticated user returns it when show_in_rest is true..mcp.json.| Symptom | Cause | Fix |
|---|---|---|
_doing_it_wrong: "must be registered on wp_abilities_api_init" | wp_register_ability() called in boot() directly or on init | Wrap it in add_action('wp_abilities_api_init', …) |
| acorn-ai ability silently missing | Ability::category() returns null by default and core requires a registered category | Override category() and register the category on wp_abilities_api_categories_init |
| "Ability category … is not registered" | Category registered on the wrong hook or after the ability | Use wp_abilities_api_categories_init |
Execute returns ability_callback_exception (argument count) on an acorn-ai ability | Without an input_schema, core calls the callback with no argument, but the acorn-ai wrapper expects array $input | Always return an object schema from inputSchema() |
Ability missing from discover-abilities | No meta.mcp.public => true (a top-level meta.public is not read by adapter 0.5.0) | Add 'mcp' => ['public' => true] to meta() |
REST run returns 404 rest_ability_not_found | meta.show_in_rest false (default) | Set show_in_rest (or public on 7.1) |
| REST run rejects the method | Method must follow annotations (readonly → GET) | Call with the method the annotations imply |
mcp-adapter is "not a registered wp command" while the plugin is active | Its autoloader looked for a plugin-local vendor/autoload.php and stopped | Define WP_MCP_AUTOLOAD false (classes from the root autoloader), or install it where its own vendor/ exists |
| MCP client gets garbage before the JSON-RPC stream | serve without --server prints "Using server: …" to stdout; PHP notices printed to stdout | Always pass --server=; keep WP_DEBUG_DISPLAY off for the serve command |
execute-ability denied | permission_callback false for the --user (or no user: logged out) | Pass --user= with the needed capability; review the callback |
{{runner.acorn}} ability:list crashes reading properties | Older acorn-ai reads WP_Ability properties instead of getters | Use the wp eval loop from step 1, or update/patch the package |
wp-abilities-api skill.permission_callback: wp-security-escaping. Plain REST routes or Acorn routes: acorn-routes-api.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
25 skills in this plugin
/acf-nativeUse when building or reviewing ACF field behaviour or the post save flow - validate before publish, required/maxlength settings, hiding a field (conditional_logic), dynamic choices, running code after save - acf/validate_value, acf/load_field, acf/prepare_field, acf/save_post, acf.getField, wp_insert_post_data, save_post - including projects where ACF may not be installed (Radicle). Maps each need to the native mechanism verified in local source. For ACF Composer scaffolding use acorn-scaffolding; for escaping ACF output use wp-security-escaping./acorn-backgroundUse when work must run outside the request, on a schedule, or be logged in an Acorn project - WP-Cron vs Action Scheduler vs Laravel queues (make:job, ShouldQueue, queue:work, failed_jobs), console commands (make:command, wp acorn <command>), Schedule::command and schedule:run from system cron, Laravel Redis and Cache vs transients, logging channels (Log::, LOG_CHANNEL, stderr, storage/logs). For tables use acorn-data; for object cache tuning use wp-performance./acorn-dataUse when storing or querying data through Acorn's database layer - Eloquent models (app/Models, models over wp_posts, postmeta, users), custom tables, migrations (make:migration, migrate --force on deploy), seeders and factories, the DB facade, table prefix errors ("Table wp_wp_x doesn't exist"), and choosing post meta vs options vs a post type vs a custom table. For queues use acorn-background; for endpoints use acorn-routes-api; for post type registration use acorn-scaffolding./acorn-livewireUse when creating, wiring or fixing a Livewire 4 component in an Acorn app - make:livewire --class, app/Livewire, wire:model modifiers (.live, .blur, .debounce), wire:key, attributes (#[Locked]/#[Computed]/#[Validate]/#[On]), lifecycle hooks, @livewireScripts, the /livewire-<hash>/update route, installing livewire/livewire on Radicle. For errors that start after a deploy (419, RangeError, stale HTML) use roots-debugging; for JSON endpoints use acorn-routes-api; for Alpine-only UI use tailwind-vite-assets./acorn-routes-apiUse when adding or fixing an HTTP endpoint or virtual page in an Acorn project - Acorn routes (routes/web.php, routes/api.php, withRouting, Route::get, controllers, middleware, route:list) versus register_rest_route (permission_callback, /wp-json, X-WP-Nonce); webhooks, JSON APIs, CORS, throttle, API-key or JWT auth, "Target class [auth] does not exist", 404 on a defined route. For Livewire use acorn-livewire; for models use acorn-data; for nonces and capabilities in depth use wp-security-escaping./acorn-scaffoldingUse when generating a new artifact in an Acorn project - a Gutenberg block (ACF Composer acf:block, InnerBlocks, $styles, or a native block.json block via make:block), a post type or taxonomy (Poet config/poet.php, config/post-types.php), an ACF field group, partial or options page (acf:field, acf:options), a provider, View Composer, Blade component or command (make:provider, make:composer, make:component). For changing existing Acorn code use acorn-stack; for ACF hooks use acf-native; for block CSS and JS use tailwind-vite-assets.npx claudepluginhub hekivo/kivo-wise --plugin kivo-wiseOther plugins' skills for the same job