*/ public static function get_subscribed_events(): array { return [ // @filter mcp_adapter_default_server_config 'mcp_adapter_default_server_config' => 'customize_mcp_server', ]; } /** * Customizes the MCP server name and description for Imagify. * * Only `server_name` and `server_description` are overridden. All other * keys — including `server_id`, `server_route`, `server_route_namespace`, * and `tools` — are preserved so the canonical REST endpoint path and the * adapter's built-in tool set remain intact. * * @param array $config Default server configuration supplied by the adapter. * @return array Modified configuration with Imagify name/description. */ public function customize_mcp_server( array $config ): array { $config['server_name'] = 'imagify-plugin'; $config['server_description'] = __( 'Image optimization tools for WordPress powered by Imagify.', 'imagify' ); return $config; } }