Digital Sovereignty for everyone

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.

Parameter Type Required Default Description
group_id integer Yes The BuddyPress group ID.
user_ids array of integer Yes WordPress user IDs to act on, at most 100.
dry_run boolean No true Default true: report what would happen and change nothing. Pass false to make the change.
note string No Optional. Why this was done, recorded with each change in LH Audit Trail.
role string No "member" Role for users who are added: member (default), mod or admin. Existing members keep their role. One of: member, mod, admin.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Create xProfile Field

lh-mcp-buddypress-actions/create-xprofile-field

Creates an xProfile field at the end of a field group, with its options and type settings in the same call. The type must be registered for this call (see list-xprofile-field-types); types with options need options, and settings are checked against the type’s settings_schema, refusing unknown keys. Visibility, member types, signup position and autolink are saved as the Profile Fields screen saves them, and refused for types that do not support them. Fields are per site, so use site_id for another site. Defaults to a dry run that checks everything and reports the field that would be created; pass dry_run false to create it. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
group_id integer Yes The field group to add it to, as list-xprofile-groups gives it.
type string Yes A field type key from list-xprofile-field-types.
name string Yes The field name members see.
description string No Help text shown with the field. Basic HTML is allowed.
is_required boolean No Whether members must fill it in. Only for types whose supported_features include required.
can_delete boolean No Whether the field can be deleted from the Profile Fields screen.
order_by string No For types with options: custom (the order given in options), asc or desc (alphabetical). One of: custom, asc, desc.
options array of object No For types whose supports_options is true (see list-xprofile-field-types): the complete list of choices, in order. Names must be unique, since member data stores the chosen name. At most one is_default unless the type supports_multiple_defaults.
default_visibility string No A visibility level ID, such as public, loggedin, friends or adminsonly. Only for types that support allow_custom_visibility.
allow_custom_visibility string No Whether members can change the field’s visibility. Only for types that support allow_custom_visibility. One of: allowed, disabled.
member_types array of string No Member types the field applies to; null means members with no member type. An empty list means none. Omit to leave it unrestricted on create, or unchanged on update.
signup_position integer No Position on the signup form; 0 takes it off the form. Only for types that support signup_position.
do_autolink boolean No Whether values link to a member search for that value. Only for types that support do_autolink.
settings object No Type-specific settings, keyed by the type’s settings_schema from list-xprofile-field-types. Unknown keys are refused. On update, keys not given keep their values.
dry_run boolean No true Default true: check the input and report what would happen, changing nothing. Pass false to make the change.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Create xProfile Field Group

lh-mcp-buddypress-actions/create-xprofile-group

Creates an xProfile field group on a site, placed after its existing groups. Field groups are per site, so use site_id for another site. Defaults to a dry run, which reports the group that would be created and any existing group with the same name; pass dry_run false to create it. Add fields to it with create-xprofile-field. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
name string Yes The group name, shown as a tab on profiles.
description string No Optional text shown with the group.
can_delete boolean No true Whether the group can be deleted from the Profile Fields screen.
dry_run boolean No true Default true: report what would be created and change nothing. Pass false to create it.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Get xProfile Data

lh-mcp-buddypress-actions/get-xprofile-data Read-only Idempotent

Returns members’ stored values for chosen xProfile fields or a whole field group, raw rather than formatted for display. Give user_ids and either field_ids or group_id. Each user has a status (found, not_found or not_site_member) and, when found, one entry per field with field_id, name, type and value as a list of strings, empty when the member has none. Values of field types from plugins may be kept outside xProfile, so they can read empty here; warnings say so. Read-only. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
user_ids array of integer Yes The members to read.
field_ids array of integer No The fields to read. Give this or group_id.
group_id integer No Read every field in this field group. Give this or field_ids.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Get xProfile Field

lh-mcp-buddypress-actions/get-xprofile-field Read-only Idempotent

Returns one xProfile field with its options and its current settings, keyed by its type’s settings schema. Returns group_id, name, description, type, type_registered, is_required, can_delete, field_order, option_order, order_by, default_visibility, allow_custom_visibility, do_autolink, member_types, signup_position (0 when not on the signup form), options (for types that support them) and settings, with settings_schema_source as in list-xprofile-field-types. When the field’s type is not registered for this call (with site_id, usually a type from that site’s own plugins), settings and options are empty and warnings says so. Field IDs are per site, so use site_id for another site’s field. Read-only; never returns member data. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
field_id integer Yes The xProfile field ID, as list-xprofile-groups gives it.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List xProfile Field Types

lh-mcp-buddypress-actions/list-xprofile-field-types Read-only Idempotent

Lists the xProfile field types registered on a site, with what each supports and the schema of its settings. Call it before creating or updating a field. Each type has key, name, category, class, supports_options, supports_multiple_defaults, accepts_null_value, supports_richtext, has_settings_section, supported_features, default_visibility and settings_schema_source: type (the type describes its own settings), polyfill (described by this plugin), none (no settings) or unknown (settings this plugin cannot describe, so settings_schema is left out and type-specific settings cannot be set). Field options of selectbox, radio, checkbox and similar types are options, not settings. unregistered_types_in_use lists field types the site’s fields use that are not registered for this call, with a field count; with site_id these usually come from that site’s own plugins, which are not loaded. Pass type for one type. Read-only. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
type string No "" Optional. Only this field type key, e.g. datebox. Omit for all.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

List xProfile Groups

lh-mcp-buddypress-actions/list-xprofile-groups Read-only Idempotent

Lists a site’s BuddyPress xProfile field groups in display order, optionally with each group’s fields. xProfile is per site on LocalHero, so with site_id this returns that site’s groups, not the calling site’s. Each group has id, name, description, group_order and can_delete; with include_fields true, each also has fields (id, name, type, is_required, field_order, in order), without field options or member data. Read-only; reads through BuddyPress (bp_xprofile_get_groups). Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
include_fields boolean No false Also return each group’s fields. Default false.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

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.

Parameter Type Required Default Description
group_id integer Yes The BuddyPress group ID.
user_ids array of integer Yes WordPress user IDs to act on, at most 100.
dry_run boolean No true Default true: report what would happen and change nothing. Pass false to make the change.
note string No Optional. Why this was done, recorded with each change in LH Audit Trail.
ban boolean No false Ban instead of remove, so the user cannot rejoin. Default false.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Reorder xProfile Fields

lh-mcp-buddypress-actions/reorder-xprofile-fields Idempotent

Sets the order of the fields in an xProfile field group, moving fields into it from other groups when listed. field_ids must list every field now in the group, in the new order, plus any to move in; each gets an explicit position, so fields that share a position are separated. The fullname field cannot leave the base group. Fields are per site, so use site_id for another site. Defaults to a dry run reporting each field’s position and group before and after; pass dry_run false to make the change. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
group_id integer Yes The field group to order.
field_ids array of integer Yes Top-level field IDs in the new order: every field in the group, plus any to move in.
dry_run boolean No true Default true: report the new order and change nothing. Pass false to make the change.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

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.

Parameter Type Required Default Description
group_id integer Yes The BuddyPress group ID.
user_ids array of integer Yes WordPress user IDs to act on, at most 100.
dry_run boolean No true Default true: report what would happen and change nothing. Pass false to make the change.
note string No Optional. Why this was done, recorded with each change in LH Audit Trail.
role string Yes The role to set: member, mod or admin. One of: member, mod, admin.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Set xProfile Data

lh-mcp-buddypress-actions/set-xprofile-data Idempotent

Sets or clears members’ values for xProfile fields in one batch, and reports each change with the value before and after. Each entry names a user_id, a field_id and a value: a string, or a list of strings for checkbox and multiselectbox fields; an empty string or list clears the value. Values for fields with options must be option names exactly as get-xprofile-field lists them. Values go through BuddyPress (xprofile_set_field_data and xprofile_delete_field_data), so its validation, filters and hooks run. The user must be a member of the site, and a field and user pair may appear only once. Field types from plugins may store values outside xProfile; warnings say so. Statuses: set, would_set, cleared, would_clear, unchanged, invalid (the type or its options refused the value, or a required field would be cleared), not_found (no such user or field), not_site_member, duplicate, refused (field type not registered for this call) and failed (BuddyPress did not save it). dry_run defaults to true. Read values back with get-xprofile-data. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
entries array of object Yes The values to set, one per user and field.
dry_run boolean No true Default true: check every entry and report what would change, changing nothing. Pass false to save.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Update Group

lh-mcp-buddypress-actions/update-group Idempotent

Changes a BuddyPress group’s name, description or slug and reports the values before and after. Anything left out stays unchanged, and group status is not touched. Goes through BuddyPress (groups_edit_base_group_details), so group hooks run; members are not notified and no activity item is posted. Statuses: updated, would_update (dry run), unchanged (nothing differs) and refused (a site rule, or BuddyPress turned it down). A slug is rejected if another group uses it now or used it before, if BuddyPress reserves it, or if it starts with wp, which BuddyPress would strip. After a slug change BuddyPress redirects the old URL to the new one. 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 the change. Requires bp_moderate, or being an admin of the group; changing the slug requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
group_id integer Yes The BuddyPress group ID.
dry_run boolean No true Default true: report what would happen and change nothing. Pass false to make the change.
note string No Optional. Why this was done, recorded with each change in LH Audit Trail.
name string No Optional. The new group name, as plain text. Leave out to keep the current name.
description string No Optional. The new group description. BuddyPress removes any HTML it does not allow. Leave out to keep the current description.
slug string No Optional. The new URL slug, cleaned as a WordPress slug. Renaming a group does not change its slug unless this is given. Requires bp_moderate.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

Update xProfile Field

lh-mcp-buddypress-actions/update-xprofile-field Destructive Idempotent

Changes an xProfile field’s name, description, options, settings, visibility, member types, signup position or other properties. Only the keys given change; options, when given, replace the whole list, and settings are checked against the type’s settings_schema, refusing unknown keys. The type can change only while the field holds no member data. Fields whose type is not registered for this call cannot be updated. Move or reorder fields with reorder-xprofile-fields. Fields are per site, so use site_id for another site. Defaults to a dry run reporting each change; pass dry_run false to make them. Requires bp_moderate. Pass site_id to act on another site you belong to.

Parameter Type Required Default Description
field_id integer Yes The xProfile field ID, as list-xprofile-groups gives it.
type string No A new field type key. Refused once the field holds member data, for types that keep their data outside the xProfile data table, and for the fullname field.
name string No The field name members see.
description string No Help text shown with the field. Basic HTML is allowed.
is_required boolean No Whether members must fill it in. Only for types whose supported_features include required.
can_delete boolean No Whether the field can be deleted from the Profile Fields screen.
order_by string No For types with options: custom (the order given in options), asc or desc (alphabetical). One of: custom, asc, desc.
options array of object No For types whose supports_options is true (see list-xprofile-field-types): the complete list of choices, in order. Names must be unique, since member data stores the chosen name. At most one is_default unless the type supports_multiple_defaults. On update this replaces every option; omit it to keep them. Option IDs change on every save of a field with options, because BuddyPress re-creates them; member data is kept, since it stores names.
default_visibility string No A visibility level ID, such as public, loggedin, friends or adminsonly. Only for types that support allow_custom_visibility.
allow_custom_visibility string No Whether members can change the field’s visibility. Only for types that support allow_custom_visibility. One of: allowed, disabled.
member_types array of string No Member types the field applies to; null means members with no member type. An empty list means none. Omit to leave it unrestricted on create, or unchanged on update.
signup_position integer No Position on the signup form; 0 takes it off the form. Only for types that support signup_position.
do_autolink boolean No Whether values link to a member search for that value. Only for types that support do_autolink.
settings object No Type-specific settings, keyed by the type’s settings_schema from list-xprofile-field-types. Unknown keys are refused. On update, keys not given keep their values.
dry_run boolean No true Default true: check the input and report what would happen, changing nothing. Pass false to make the change.
task_id integer No Optional. 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_token string No Optional. The claim_token from claim-next-task for task_id. Required when task_id is given.
site_id integer No Optional. 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.
run_without_site_plugins boolean No Optional, with site_id. Run the call through this connector even when that site has plugins of its own that cannot be loaded for it. Without this, such a write is refused if it cannot be run on that site itself.

If you like this plugin please consider making a donation to further development

Install LHero.org

lhero.org

Open it straight from your home screen, full screen and quicker to load.

  1. Tap the Share button . If you cannot see it, tap ••• first.
  2. Scroll down and tap Add to Home Screen.
  3. Tap Add.
  1. Tap the browser menu â‹®.
  2. Tap Install app or Add to Home screen.
  1. In the menu bar, choose File, then Add to Dock.

Use your browser's menu to install this site or add it to your home screen.