diff --git a/src/Abilities/AcfFieldsResource.php b/src/Abilities/AcfFieldsResource.php index c6f596a..5b318b7 100644 --- a/src/Abilities/AcfFieldsResource.php +++ b/src/Abilities/AcfFieldsResource.php @@ -30,6 +30,13 @@ public static function register(): void 'permission_callback' => '__return_true', 'execute_callback' => [new self, 'execute'], 'meta' => [ + // Provide the resource URI/mimeType in BOTH locations for adapter + // cross-compatibility: WordPress/mcp-adapter >= 0.5.0 reads meta.mcp.uri + // (canonical), while < 0.5.0 reads only top-level meta.uri. Keeping both + // works on every adapter version without triggering 0.5.0 deprecation + // notices (the mcp.* copy is matched first). + 'uri' => 'acf://fields', + 'mimeType' => 'application/json', 'mcp' => [ 'type' => 'resource', 'public' => true, diff --git a/src/Abilities/BlockCatalogResource.php b/src/Abilities/BlockCatalogResource.php index b0b5589..3185b00 100644 --- a/src/Abilities/BlockCatalogResource.php +++ b/src/Abilities/BlockCatalogResource.php @@ -25,6 +25,13 @@ public static function register(): void 'permission_callback' => '__return_true', 'execute_callback' => [new self, 'execute'], 'meta' => [ + // Provide the resource URI/mimeType in BOTH locations for adapter + // cross-compatibility: WordPress/mcp-adapter >= 0.5.0 reads meta.mcp.uri + // (canonical), while < 0.5.0 reads only top-level meta.uri. Keeping both + // works on every adapter version without triggering 0.5.0 deprecation + // notices (the mcp.* copy is matched first). + 'uri' => 'blocks://catalog', + 'mimeType' => 'application/json', 'mcp' => [ 'type' => 'resource', 'public' => true, diff --git a/src/Abilities/SiteMapResource.php b/src/Abilities/SiteMapResource.php index 66a5a6c..7cf80d4 100644 --- a/src/Abilities/SiteMapResource.php +++ b/src/Abilities/SiteMapResource.php @@ -30,6 +30,13 @@ public static function register(): void 'permission_callback' => '__return_true', 'execute_callback' => [new self, 'execute'], 'meta' => [ + // Provide the resource URI/mimeType in BOTH locations for adapter + // cross-compatibility: WordPress/mcp-adapter >= 0.5.0 reads meta.mcp.uri + // (canonical), while < 0.5.0 reads only top-level meta.uri. Keeping both + // works on every adapter version without triggering 0.5.0 deprecation + // notices (the mcp.* copy is matched first). + 'uri' => 'site://pages', + 'mimeType' => 'application/json', 'mcp' => [ 'type' => 'resource', 'public' => true, diff --git a/src/Abilities/ThemeJsonResource.php b/src/Abilities/ThemeJsonResource.php index 3f9fee0..4d3a743 100644 --- a/src/Abilities/ThemeJsonResource.php +++ b/src/Abilities/ThemeJsonResource.php @@ -24,6 +24,13 @@ public static function register(): void 'permission_callback' => '__return_true', 'execute_callback' => [new self, 'execute'], 'meta' => [ + // Provide the resource URI/mimeType in BOTH locations for adapter + // cross-compatibility: WordPress/mcp-adapter >= 0.5.0 reads meta.mcp.uri + // (canonical), while < 0.5.0 reads only top-level meta.uri. Keeping both + // works on every adapter version without triggering 0.5.0 deprecation + // notices (the mcp.* copy is matched first). + 'uri' => 'theme://json', + 'mimeType' => 'application/json', 'mcp' => [ 'type' => 'resource', 'public' => true,