Title: custom plugin hooks
Last modified: September 23, 2026

---

# custom plugin hooks

 *  Resolved [moeinich](https://wordpress.org/support/users/moeinich/)
 * (@moeinich)
 * [1 week, 2 days ago](https://wordpress.org/support/topic/custom-plugin-hooks/)
 * Hi, is it possible to hook my own custom theme/plugin into this as an ability?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Fabio Montenegro](https://wordpress.org/support/users/fabiomontenegro1987/)
 * (@fabiomontenegro1987)
 * [1 week ago](https://wordpress.org/support/topic/custom-plugin-hooks/#post-19028638)
 * Hi [@moeinich](https://wordpress.org/support/users/moeinich/) . Yes, and nothing
   special is needed on this plugin’s side.
 * Register your ability with the standard API on `wp_abilities_api_init`, and include
   the MCP metadata so the adapter exposes it:
 *     ```wp-block-code
       add_action( 'wp_abilities_api_init', function () {
           wp_register_ability( 'my-theme/get-something', array(
               'label'               => 'Get Something',
               'description'         => 'What the assistant will read to decide when to call it.',
               'input_schema'        => array( 'type' => 'object', 'properties' => array() ),
               'permission_callback' => fn() => current_user_can( 'edit_posts' ),
               'execute_callback'    => fn( $input ) => array( 'ok' => true ),
               'meta'                => array( 'mcp' => array( 'public' => true ) ),
           ) );
       } );
       ```
   
 * `meta.mcp.public` is the part people usually miss: without it the ability is 
   registered but never exposed to MCP clients.
 * Once registered, it shows up automatically under **Settings › WP Abilities**,
   in a “Third-party” section named after your namespace, where it can be switched
   on or off like any built-in ability — and it is reachable through this plugin’s
   OAuth connector too.
 *  Thread Starter [moeinich](https://wordpress.org/support/users/moeinich/)
 * (@moeinich)
 * [4 days, 7 hours ago](https://wordpress.org/support/topic/custom-plugin-hooks/#post-19030881)
 * Thank you! 🙂

Viewing 2 replies - 1 through 2 (of 2 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fcustom-plugin-hooks%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/enable-abilities-for-mcp/assets/icon-256x256.png?rev=3490388)
 * [Enable Abilities for MCP](https://wordpress.org/plugins/enable-abilities-for-mcp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/enable-abilities-for-mcp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/enable-abilities-for-mcp/)
 * [Active Topics](https://wordpress.org/support/plugin/enable-abilities-for-mcp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/enable-abilities-for-mcp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/enable-abilities-for-mcp/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [moeinich](https://wordpress.org/support/users/moeinich/)
 * Last activity: [4 days, 7 hours ago](https://wordpress.org/support/topic/custom-plugin-hooks/#post-19030881)
 * Status: resolved