Last active
April 9, 2026 02:13
-
-
Save westonruter/3a37d35ef66cdd58315a7c1347d92560 to your computer and use it in GitHub Desktop.
Revisions
-
westonruter revised this gist
Apr 9, 2026 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -5,7 +5,7 @@ * Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment. * Requires at least: 6.9 * Requires PHP: 7.4 * Version: 1.1.1 * Author: Weston Ruter * Author URI: https://weston.ruter.net/ * License: GPLv2 or later -
westonruter revised this gist
Apr 9, 2026 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -19,6 +19,7 @@ 'wp_register_ability_args', static function ( array $args, string $ability_id ): array { if ( // Prevent exposing abilities in MCP except on a local dev environment. wp_get_environment_type() === 'local' && // Omit abilities which the MCP Adapter already makes available itself. -
westonruter revised this gist
Apr 9, 2026 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -21,7 +21,7 @@ static function ( array $args, string $ability_id ): array { if ( wp_get_environment_type() === 'local' && // Omit abilities which the MCP Adapter already makes available itself. ! str_starts_with( $ability_id, 'mcp-adapter/' ) ) { $args['meta']['mcp']['public'] = true; -
westonruter revised this gist
Apr 9, 2026 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php /** * Plugin Name: Expose All Abilities to MCP * Plugin URI: https://gist.github.com/westonruter/3a37d35ef66cdd58315a7c1347d92560 * Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment. * Requires at least: 6.9 * Requires PHP: 7.4 @@ -11,7 +11,7 @@ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html * Update URI: false * Gist Plugin URI: https://gist.github.com/westonruter/3a37d35ef66cdd58315a7c1347d92560 * Primary Branch: main */ -
westonruter revised this gist
Apr 9, 2026 . 1 changed file with 12 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php /** * Plugin Name: Expose All Abilities to MCP * Plugin URI: ... * Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment. * Requires at least: 6.9 * Requires PHP: 7.4 @@ -11,16 +11,23 @@ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html * Update URI: false * Gist Plugin URI: ... * Primary Branch: main */ add_filter( 'wp_register_ability_args', static function ( array $args, string $ability_id ): array { if ( wp_get_environment_type() === 'local' && // Omit abilities which MCP adapter already makes available via tools. ! str_starts_with( $ability_id, 'mcp-adapter/' ) ) { $args['meta']['mcp']['public'] = true; } return $args; }, 10, 2 ); -
westonruter revised this gist
Apr 8, 2026 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ <?php /** * Plugin Name: Expose All Abilities to MCP * Plugin URI: https://gist.github.com/westonruter/3a37d35ef66cdd58315a7c1347d92560 * Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment. * Requires at least: 6.9 * Requires PHP: 7.4 @@ -11,7 +11,7 @@ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html * Update URI: false * Gist Plugin URI: https://gist.github.com/westonruter/3a37d35ef66cdd58315a7c1347d92560 * Primary Branch: main */ -
westonruter created this gist
Apr 8, 2026 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,26 @@ <?php /** * Plugin Name: Expose All Abilities to MCP * Plugin URI: ... * Description: Forces all registered abilities (wth the Abilities API) to be exposed to AI agents, only when running on a local environment. * Requires at least: 6.9 * Requires PHP: 7.4 * Version: 1.0.0 * Author: Weston Ruter * Author URI: https://weston.ruter.net/ * License: GPLv2 or later * License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html * Update URI: false * Gist Plugin URI: ... * Primary Branch: main */ add_filter( 'wp_register_ability_args', static function ( array $args ): array { if ( wp_get_environment_type() === 'local' ) { $args['meta']['mcp']['public'] = true; } return $args; } );