MCP abilities

Add Group Members

lh-mcp-buddypress-actions/add-group-members Idempotent

Adds users to a BuddyPress group through BuddyPress, so group hooks run, and reports the outcome per user. A pending membership request or invitation is accepted rather than duplicated (BuddyPress fires its usual accept actions); otherwise the user joins with groups_join_group. role makes new members mods or admins; existing members are reported as already_member with their role unchanged (use set-group-member-role). Only members of the site the call runs on (the connector's site, or site_id) can be added: with LH Membership, approved members only. The site's own rules come first: they can refuse any join through the lh_mcp_buddypress_actions_refuse_change filter, and a real run is refused while the site has plugins this call did not load (a site_id call from another site), so use that site's own connector. Statuses: added, would_add (dry run), already_member, banned (left banned), not_site_member, not_found (no such user, or spam or deleted) and refused (a site rule, BuddyPress or a join hook turned it down, or an unconfirmed membership row exists). Callers with install_plugins are not restricted: the site member requirement, site rules and the refusal for unloaded site plugins are skipped, and warnings still say when site plugins were not loaded. dry_run defaults to true. note is recorded in LH Audit Trail with each join. Requires bp_moderate, or being an admin of the group. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
group_idintegerYesThe BuddyPress group ID.
user_idsarray of integerYesWordPress user IDs to act on, at most 100.
dry_runbooleanNotrueDefault true: report what would happen and change nothing. Pass false to make the change.
notestringNoOptional. Why this was done, recorded with each change in LH Audit Trail.
rolestringNo"member"Role for users who are added: member (default), mod or admin. Existing members keep their role. One of: member, mod, admin.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Remove Group Members

lh-mcp-buddypress-actions/remove-group-members Destructive Idempotent

Removes or bans users from a BuddyPress group through BuddyPress, so group hooks run, and reports the outcome per user. Uses groups_remove_member, or groups_ban_member with ban. Never leaves a group without an admin: removing or banning its last admin is refused, and a group admin must be demoted with set-group-member-role before being banned. Statuses: removed, banned, would_remove and would_ban (dry run), not_member, already_banned, not_found (no such user, or spam or deleted), refused (last admin, an admin to ban, a site rule, or BuddyPress turned it down). The site's own rules come first: they can refuse any change through the lh_mcp_buddypress_actions_refuse_change filter, and a real run is refused while the site has plugins this call did not load (a site_id call from another site), so use that site's own connector. Callers with install_plugins are not restricted: site rules and the refusal for unloaded site plugins are skipped, and warnings still say when site plugins were not loaded. dry_run defaults to true. note is recorded in LH Audit Trail with each change. Requires bp_moderate, or being an admin of the group. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
group_idintegerYesThe BuddyPress group ID.
user_idsarray of integerYesWordPress user IDs to act on, at most 100.
dry_runbooleanNotrueDefault true: report what would happen and change nothing. Pass false to make the change.
notestringNoOptional. Why this was done, recorded with each change in LH Audit Trail.
banbooleanNofalseBan instead of remove, so the user cannot rejoin. Default false.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.

Set Group Member Role

lh-mcp-buddypress-actions/set-group-member-role Idempotent

Promotes or demotes existing members of a BuddyPress group between member, mod and admin, and reports the outcome per user. Goes through BuddyPress (groups_promote_member and groups_demote_member), so group hooks run. Only confirmed, unbanned members change; it never adds anyone (use add-group-members). Demoting the group's last admin is refused. Statuses: changed, would_change (dry run), unchanged (already that role), not_member, banned, not_found (no such user, or spam or deleted) and refused (last admin, a site rule, or BuddyPress turned it down). The site's own rules come first: they can refuse any change through the lh_mcp_buddypress_actions_refuse_change filter, and a real run is refused while the site has plugins this call did not load (a site_id call from another site), so use that site's own connector. Callers with install_plugins are not restricted: site rules and the refusal for unloaded site plugins are skipped, and warnings still say when site plugins were not loaded. dry_run defaults to true. note is recorded in LH Audit Trail with each change. Requires bp_moderate, or being an admin of the group. Pass site_id to act on another site you belong to.

ParameterTypeRequiredDefaultDescription
group_idintegerYesThe BuddyPress group ID.
user_idsarray of integerYesWordPress user IDs to act on, at most 100.
dry_runbooleanNotrueDefault true: report what would happen and change nothing. Pass false to make the change.
notestringNoOptional. Why this was done, recorded with each change in LH Audit Trail.
rolestringYesThe role to set: member, mod or admin. One of: member, mod, admin.
task_idintegerNoOptional. The lh-tasks task this call is working on. Pass with claim_token: the call is refused unless you hold that claim, and a successful call renews it.
claim_tokenstringNoOptional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_idintegerNoOptional. ID of another site in the network to act on; list-my-sites gives the sites you belong to. Permissions are checked on that site. Omit for this site.