| @@ -44,7 +44,16 @@ | ||
| 44 | 44 | && function_exists( 'wp_register_ability_category' ); |
| 45 | 45 | |
| 46 | 46 | if ( $can_boot_mcp_adapter ) { |
| 47 | 47 | \WP\MCP\Core\McpAdapter::instance(); |
| 48 | + | |
| 49 | + // Boot the shared MCP OAuth library (wp-media/mcp-oauth) so Claude Desktop | |
| 50 | + // (and any other MCP client) can authenticate against the isolated | |
| 51 | + // `mcp-oauth-server` it registers. The library self-wires its own | |
| 52 | + // WordPress hooks and is enabled by default; Imagify has no custom OAuth | |
| 53 | + // code. It relies on the MCP adapter, so it only boots when the adapter can. | |
| 54 | + if ( class_exists( \WPMedia\MCP\OAuth\Bootstrap::class ) ) { | |
| 55 | + \WPMedia\MCP\OAuth\Bootstrap::instance(); | |
| 56 | + } | |
| 48 | 57 | } |
| 49 | 58 | } |
| 50 | 59 | add_action( 'plugins_loaded', 'imagify_init' ); |