Since version: v1.8.0
Filter acf_tablefield/abilities/mcp_public
This filter decides per ability whether it is public for the MCP Adapter. When it returns false, the ability is not listed by mcp-adapter-discover-abilities and cannot be run through MCP. The ability stays available in the Abilities REST API. The default comes from the setting Enable Table Field Abilities for MCP in the plugin settings (tab Features), which is off by default, see Enable the abilities. The filter runs at priority 10 and overrides the setting per ability, so use a priority greater than 5. The filter runs when the abilities are registered, so add it in the functions.php of a theme or in a plugin. It sets the meta mcp.public of the ability. A MCP server that runs as a long-running process, e.g. started with wp mcp-adapter serve (STDIO), registers the abilities once when it starts, so restart or reconnect it after changing the filter. A MCP server over HTTP registers them anew with every request. To hide an ability from the Abilities REST API, use the filter abilities/show_in_rest.
Parameters
add_filter( 'acf_tablefield/abilities/mcp_public', '__return_false' );
-
$publicWhether the ability is public for MCP. Default: the setting Enable Table Field Abilities for MCP, off by default.
-
$ability_nameThe full name of the ability, e.g.
acf-tablefield-pro/add-row.