apply_filters( 'riff_mcp', bool $on )

Filters whether AI assistants may use Riff's abilities over MCP. On, and with the MCP Adapter plugin active, /wp-json/mcp/riff serves each of them as a tool to a signed-in user, and the adapter's default server lists them. Each still does only what that user may do. Off, there is no such server, and the default server does not list them.

Parameters

$onbool
Whether it is on, from Settings › Riff. Default false.

More Information

A host that offers it on every site turns it on with add_filter( 'riff_mcp', '__return_true' ).

Usage

add_filter( 'riff_mcp', function ( $on ) {
	return $on;
} );

Source

return (bool) apply_filters( 'riff_mcp', rest_sanitize_boolean( get_option( self::OPTION, false ) ) );

Changelog

VersionDescription
6.5.0Introduced.