mcp-easy-ai__wp_list_users
Lists WordPress users. Optional: search (matches name/username/email; wrapped in * wildcards unless search_exact is true), roles (array of role slugs — e.g. ["editor","author"] — OR operation), per_page (default 10, max 100), page, orderby (id/name/registered_date/email/slug/url, or WP_User_Query's login/post_count/meta_value/meta_value_num), order (asc/desc). WP_User_Query filters: role (role slugs the user must ALL hold, or ["none"] for users with no role on this site), role__not_in, capability (capabilities the user must all have), capability__not_in, login, login__in, login__not_in, nicename, nicename__in, nicename__not_in, include, exclude (user IDs), has_published_posts (post types), search_columns, and meta_key with optional meta_value/meta_compare/meta_type — a meta filter is refused for a key wp_get_user_meta would withhold from this caller. network (multisite, super admin with manage_network_users) lists every user of the network instead of this… Through Royally: its server marks it read-only, so it runs straight away.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| page | No | Page number for pagination. | |
| role | No | Role slugs the user must hold ALL of (WP_User_Query `role`). ["none"] alone lists the users who have no role on this site. | |
| login | No | Exact user login. | |
| order | No | Sort direction. | asc |
| roles | No | Array of role slugs to filter by (e.g. administrator, editor, author). | |
| search | No | Search query to filter users. | |
| exclude | No | Exclude these user IDs. | |
| include | No | Only these user IDs. | |
| network | No | Multisite only: list every user of the network (WP_User_Query blog_id 0) instead of this site. Needs a super admin with manage_network_users. `roles` in the result are each user's roles on this site. | |
| orderby | No | Field to order results by. login, post_count (published posts of type post, plus the private ones you may read), meta_value and meta_value_num (both need meta_key) are WP_User_Query orderings. | id |
| site_id | No | Site to run this tool on: 8ef2e52b-bd07-4671-a363-ebe8b480b65c (https://demo.royalplugins.com) | |
| meta_key | No | Only users with this user meta key (and, with meta_value, this value). Refused for a key wp_get_user_meta would withhold from you. Required by meta_value, meta_compare, meta_type and the meta_value orderings. | |
| nicename | No | Exact user_nicename (the URL slug). | |
| per_page | No | Number of users per page (1-100). | |
| login__in | No | Only these user logins. | |
| meta_type | No | Cast applied to the stored value before comparing. Needs meta_key. | |
| capability | No | Capabilities the user must have ALL of, through a role or a direct grant (WP_User_Query `capability`, WordPress 5.9+). | |
| meta_value | No | Value compared with meta_key's value. Needs meta_key. | |
| meta_compare | No | Comparison between the stored value and meta_value (default "="). Needs meta_key. | |
| nicename__in | No | Only these user_nicename values. | |
| role__not_in | No | Exclude users holding any of these roles. | |
| search_exact | No | When true, `search` is passed to WP_User_Query as typed, without the leading and trailing `*` the REST API adds: an exact match unless the query itself starts or ends with `*` (WP-CLI semantics). Requires `search`. | |
| login__not_in | No | Exclude these user logins. | |
| search_columns | No | Users-table columns `search` looks in (WP_User_Query names). Requires `search`. | |
| nicename__not_in | No | Exclude these user_nicename values. | |
| capability__not_in | No | Exclude users having any of these capabilities. | |
| has_published_posts | No | Only users with at least one published post of these post types (each must be registered). | |
| include_capabilities | No | Add capabilities (every capability the user has), extra_capabilities (the user's own capability map) and cap_key (the user meta key that stores it) to each user. |