All seven abilities are read-only. Deliberately not exposed: private messages (messages_get_threads) and friend connections (friends_get_friend_user_ids), a different risk category to group, activity and directory metadata.
Worked example: admin contact lookup
Finding a group’s admin name and email is a two-call round trip, usable from any subsite connector:
// 1. Resolve the group and get admin user ID(s)
{ "tool": "lh-mcp-buddypress-queries/get-group", "params": { "slug": "sugar-gliders" } }
// -> admin_ids: [7407]
// 2. Get that admin's name and email
{ "tool": "lh-mcp-buddypress-queries/get-group-members", "params": { "group_id": 21, "role": "admin" } }
// -> name and email of the group admin
Architectural notes
- Bootstraps entirely on
plugins_loaded(nobp_loadeddependency, unlikelh-buddypress-group-taxonomies) since it has no BuddyPress-specific class loading order requirements. Every execute callback guards withfunction_exists()/class_exists()checks instead, since BuddyPress itself may not be fully loaded atplugins_loadedtime on every request path. - Requires WordPress 6.9+ since
wp_register_ability()/wp_register_ability_category()require that version. list-groupsandget-groups-by-taxonomy(in the taxonomy plugin) share the same status-filter-after-fetch pattern, since BuddyPress core doesn’t yet support filteringgroups_get_groups()by a list of statuses directly.get-group-activitypasses the group tobp_activity_get()in itsfilterargument (object: groups,primary_id) withshow_hiddenon, so private and hidden groups’ activity is included. Before 2.2.1 the group was passed as top-level arguments, which BuddyPress ignores, so every group returned the network’s latest activity.- Plugin folder, main file, class name, and ability namespace were all renamed from
lh-buddypress-queriestolh-mcp-buddypress-queriesin v2.0.0, a breaking change for anything calling the old ability names directly.
Related plugins
- lh-buddypress-group-taxonomies: taxonomy-scoped group queries (
get-groups-by-taxonomy,list-terms,list-group-taxonomies) lh-membership: taxonomy-based (not directory-based) member listing, sameedit_userscapability precedent for email-bearing abilities