| 1 |
<?php |
| 2 |
/** |
| 3 |
* WordPress MCP Adapter |
| 4 |
* |
| 5 |
* @package mcp-adapter |
| 6 |
* @author WordPress.org Contributors |
| 7 |
* @copyright 2025 Plugin Contributors |
| 8 |
* @license GPL-2.0-or-later |
| 9 |
* |
| 10 |
* @wordpress-plugin |
| 11 |
* Plugin Name: MCP Adapter |
| 12 |
* Plugin URI: https://github.com/WordPress/mcp-adapter |
| 13 |
* Description: Adapter for Abilities API, letting the abilities to be used as MCP tools, resources or prompts. |
| 14 |
* Version: 0.6.1 |
| 15 |
* Requires at least: 6.9 |
| 16 |
* Tested up to: 7.0 |
| 17 |
* Requires PHP: 7.4 |
| 18 |
* Author: WordPress.org Contributors |
| 19 |
* Author URI: https://github.com/WordPress/mcp-adapter/graphs/contributors |
| 20 |
* License: GPLv2 or later |
| 21 |
* License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html |
| 22 |
* Text Domain: mcp-adapter |
| 23 |
*/ |
| 24 |
|
| 25 |
declare (strict_types = 1); |
| 26 |
|
| 27 |
namespace WP\MCP; |
| 28 |
|
| 29 |
// Exit if accessed directly. |
| 30 |
defined( 'ABSPATH' ) || exit(); |
| 31 |
|
| 32 |
/** |
| 33 |
* Define the plugin constants. |
| 34 |
*/ |
| 35 |
function constants(): void { |
| 36 |
/** |
| 37 |
* Shortcut constant to the path of this file. |
| 38 |
*/ |
| 39 |
define( 'WP_MCP_DIR', plugin_dir_path( __FILE__ ) ); |
| 40 |
|
| 41 |
/** |
| 42 |
* Version of the plugin. |
| 43 |
*/ |
| 44 |
define( 'WP_MCP_VERSION', '0.6.1' ); |
| 45 |
} |
| 46 |
|
| 47 |
constants(); |
| 48 |
require_once __DIR__ . '/includes/Autoloader.php'; |
| 49 |
|
| 50 |
// If autoloader failed, we cannot proceed. |
| 51 |
if ( ! Autoloader::autoload() ) { |
| 52 |
return; |
| 53 |
} |
| 54 |
|
| 55 |
// Load the plugin. |
| 56 |
if ( class_exists( Plugin::class ) ) { |
| 57 |
Plugin::instance(); |
| 58 |
} |
| 59 |
|