Menú adicional

¡Consiga MemberPress hoy mismo! ¡Empieza a cobrar por los contenidos que creas! Obtenga MemberPress ahora
  1. Inicio
  2. Base de conocimientos
  3. Documentación para desarrolladores
  4. MCP
  5. Referencia de herramientas MCP de MemberPress AI Foundation

Referencia de herramientas MCP de MemberPress AI Foundation

The MemberPress AI Foundation MCP server exposes a catalog of tools that an AI client calls to read and manage MemberPress data. Each tool declares a name, a JSON input schema, and annotations that classify it as read-only, a write, or destructive.

This reference lists every tool, grouped by domain, with its purpose, key parameters, required scope, and required WordPress capability. It is the companion to the Agent Safety Measures Reference, which explains how scopes, capabilities, and the confirmation flow are enforced.

How the Tool List Works

A client retrieves the catalog by calling the tools/list method against the MCP endpoint. Two factors determine which tools appear in the response:

  1. Connection access level (scope filtering). The server returns only the tools the connection's scope permits. A read-only connection (including any Application Password connection) sees only read tools. A connection with write scopes additionally sees the write and destructive tools its scopes cover. A tool is also hidden when the token owner lacks its required WordPress capability — memberpress_delete_member does not appear for a user without delete_users.
  2. Active add-ons (add-on gating). Tools belonging to an add-on register only while that add-on is active. A site without MemberPress Courses, for example, does not expose the course tools.

Because of these two factors, the number of tools a site exposes varies. The catalog builds up by add-on:

InscripciónAuthenticated toolsPublic tools
Core (no add-ons)412
+ MemberPress Courses+8+2
+ Corporate Accounts+3
+ Downloads+2
Everything active54 (39 read, 9 non-destructive write, 6 destructive)4

Nota: The tool count seen on a given connection is not a fixed number. It reflects that connection's access level and the site's active add-ons. A lower count is normal, not a sign of a broken installation.

Tool Classifications

Every tool carries annotations that classify it:

ClassificationAnnotationComportamiento
LeerreadOnlyHint: trueRetrieves data. Never changes state. Available to every connection.
Non-destructive writereadOnlyHint: false, destructiveHint: falseCreates or updates. Defaults to a preview; pass execute: true to run live.
DestructivereadOnlyHint: false, destructiveHint: trueDeletes, refunds, cancels, or resets. Requires the two-step confirmation-token flow.

The write and destructive execution mechanics are documented in the Agent Safety Measures Reference. This reference focuses on what each tool is and what it accepts.

Tool Response Format

A client runs a tool with the tools/call method. The result returns in the standard MCP envelope: a result.content array whose first element is a text block. That block's texto field holds the tool's data as a JSON string the client must parse. This differs from the tools/list shape, which returns tool definitions directly.

The envelope from a memberpress_list_members call:

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "content": [
      { "type": "text", "text": "{ ...escaped JSON string... }" }
    ]
  }
}

Parsing the texto string yields the payload — a miembros array with sibling pagination fields:

{
  "members": [
    {
      "id": 50,
      "email": "member@example.com",
      "username": "member50",
      "first_name": "Example",
      "last_name": "Member",
      "registered_at": "2023-08-21 17:18:31",
      "active_memberships": [ { "id": 2332, "title": "Basic Membership" } ]
    }
  ],
  "total": 8,
  "page": 1,
  "per_page": 3,
  "pages": 3
}

Pagination fields (total, página, por_página, páginas) sit beside the data array, not inside a wrapper object.

Nota: memberpress_smart_query is a context-fetch tool, not a question-answering one. It returns structured site context — counts, products, recent revenue — for the calling AI client to reason over, not a written answer. Its payload shape is { "question": "...", "context": { ... } }.

Read Tools

Read tools retrieve data and never change state. They are available on every connection, including read-only Application Password connections. All read tools carry readOnlyHint: true, destructiveHint: false, idempotentHint: true, and require only the leer scope (always granted).

Parameters shown as obligatorio must be supplied. List tools share a common pagination pattern: página (default 1) and por_página (default 20, max 100).

Miembros

HerramientaPurposeKey parameters
memberpress_get_memberFull details for one member, including active subscriptions and accessible memberships.identifier (member ID or email); include_transactions (bool, default false)
memberpress_list_membersList members with filtering. Paginated.busque en, estado (active/inactive/all), membership_id, página, por_página
memberpress_export_membersExport members as a paginated JSON array.membership_id, estado, date_from, date_to, página, por_página (default 50)

Afiliaciones

HerramientaPurposeKey parameters
memberpress_get_membershipFull details for a membership/product: pricing, trial, group, access rules, member count.membership_id
memberpress_list_membershipsList memberships/products with status filter. Paginated.estado (publish/draft/all), página, por_página
memberpress_get_membership_statsStatistics across all memberships: active subscribers, total revenue, average revenue per member.(none)

Suscripciones

HerramientaPurposeKey parameters
memberpress_get_subscriptionFull subscription details: user, product, trial status, transaction history.subscription_id
memberpress_list_subscriptionsList subscriptions with filtering. Paginated.member_id, membership_id, estado (pending/active/suspended/cancelled/all), date_from, date_to, página, por_página

Transacciones

HerramientaPurposeKey parameters
memberpress_get_transactionFull transaction details: user, product, subscription, financial data.transaction_id
memberpress_list_transactionsList transactions with filtering. Paginated.member_id, membership_id, subscription_id, estado (pending/complete/failed/refunded/all), date_from, date_to, página, por_página

Rules and Access

HerramientaPurposeKey parameters
memberpress_list_rulesList access rules with filtering. Paginated.membership_id, tipo_regla, página, por_página
memberpress_get_protected_contentAll protected-content rules and whether a member has access to each.member_id
memberpress_list_protected_urlsList content-protection rules with protected content and required memberships. Paginated.página, por_página
memberpress_check_accessWhether a user has access to a specific post/page.usuario_id, post_id

Cupones

HerramientaPurposeKey parameters
memberpress_list_couponsList coupons with status filter, discount details, usage stats. Paginated.estado (active/expired/all), página, por_página

Reports and Analytics

HerramientaPurposeKey parameters
memberpress_get_revenue_reportRevenue for a date range, broken down by period.date_from, date_to, periodo (daily/weekly/monthly/yearly), membership_id
memberpress_get_churn_reportCancelled/suspended/new subscriptions and churn rate for a date range.date_from, date_to, membership_id
memberpress_revenue_analysisTransaction totals, revenue by product, monthly trends.date_from, date_to, membership_ids (array)
memberpress_churn_predictionSubscription status counts, cancellation rates, average time before cancel, churn by product.membership_id
memberpress_cohort_analysisSignups grouped by month with retention, cancellations, revenue per cohort.date_from, date_to
memberpress_ltv_analysisPer-subscription revenue and duration grouped by product, for LTV estimation.membership_id
memberpress_member_engagementTransaction frequency, subscription status distribution, activity patterns.membership_id, días (max 365, default 90)
memberpress_renewal_forecastUpcoming expirations in 30-day buckets with historical renewal rates.membership_id
memberpress_failed_payment_analysisFailed and refunded transactions by product, month, gateway, vs. successful volume.date_from, date_to
memberpress_content_performanceProtected-content counts, member-to-content ratios, churn per membership.date_from, date_to
memberpress_smart_querySite context data for answering a natural-language question about membership data.question

En date_from / date_to are omitted, analytics tools fall back to a default date range rather than requiring explicit dates.

Sistema

HerramientaPurposeKey parameters
memberpress_get_system_infoDiagnostics: PHP/WordPress/MemberPress versions, active add-ons, payment gateway names, database table status, counts.(none)
memberpress_list_webhooksList configured webhooks with URLs, events, enabled status.(none)
memberpress_list_remindersList configured email reminders with trigger events, timing, status, memberships.(none)

Courses (requires MemberPress Courses)

HerramientaPurposeKey parameters
memberpress_get_courseCourse details: sections, lessons, memberships, completion rate.course_id
memberpress_list_coursesList courses with filtering. Paginated.busque en, estado (publish/draft/all), página, por_página
memberpress_get_lessonLesson details: section, parent course, availability.lesson_id
memberpress_list_lessonsList lessons filtered by course or section. Paginated.course_id, section_id, página, por_página
memberpress_get_student_progressA student's per-lesson progress on a course.usuario_id, course_id
memberpress_list_course_studentsStudents enrolled in a course with completion status. Paginated.course_id, página, por_página

Corporate Accounts (requires MemberPress Corporate Accounts)

HerramientaPurposeKey parameters
memberpress_get_corporate_accountCorporate account by owner user ID: sub-account usage and list.usuario_id
memberpress_list_sub_accountsSub-accounts for a corporate account. Paginated.corporate_account_id, página, por_página

Downloads (requires MemberPress Downloads)

HerramientaPurposeKey parameters
memberpress_list_downloadsList downloadable files with filtering: title, filename, download count, memberships. Paginated.membership_id, página, por_página
memberpress_get_download_statsStats for one download: count, file info, memberships, file size.file_id

Write Tools (Non-Destructive)

Non-destructive write tools create or update data. Each defaults to a preview: calling it returns what *would* happen without changing anything. To run live, pass execute: true. Each requires a specific write scope and a WordPress capability. The scope gate runs first and rejects with SCOPE_INSUFFICIENT; the capability gate then rejects with CAPABILITY_INSUFFICIENT.

These tools are not available on read-only connections (including Application Password connections). A connection must be issued the relevant write scope through the wizard at a Full Access ceiling.

Some parameters are documented from the inventory below; full input schemas for every write tool still require a Full Access live capture or a per-tool preview (the read-only capture connection could not enumerate write-tool schemas).

HerramientaPurposeAlcanceCapacidad
memberpress_create_memberCreate a member.write:memberscreate_users
memberpress_update_memberUpdate a member. Only the fields the caller sends change; omitted fields are left untouched.write:membersedit_users
memberpress_create_couponCreate a coupon.write:contentmanage_options
memberpress_create_subscriptionEnroll an existing member in a membership.write:membersedit_users
memberpress_create_ruleCreate an access rule.write:contentmanage_options
memberpress_create_webhookCreate a webhook.write:webhooksmanage_options
memberpress_import_membersBulk-import members.write:importscreate_users
memberpress_complete_lessonMark a lesson complete for a student.write:coursesedit_users
memberpress_toggle_reminderEnable/disable an email reminder.write:webhooksmanage_options

Destructive Tools

Destructive tools delete, refund, cancel, or reset data. They carry destructiveHint: true y no puede be executed with a simple parameter. Each requires the two-step confirmation-token flow: the first call returns a preview plus a single-use confirmation_token; a second call passing confirm: "<token>" with identical arguments runs the operation live. Tokens expire after 60 seconds, are single-use, and are bound to the exact tool, arguments, and user.

Reversible actions are exempt from the confirmation gate. Two action values undo rather than destroy, and execute without a token: memberpress_manage_subscription con action: "resume"y memberpress_manage_sub_account con action: "add". Every other action on these tools — and every call to the other four destructive tools — requires the token flow.

Destructive tools are also subject to the kill switch: when destructive writes are paused, every destructive tool is refused with WRITES_PAUSED, regardless of scope or a valid token. See the Agent Safety Measures Reference.

Documented parameters appear in the next section; full input schemas still require a Full Access live capture or a per-tool preview.

HerramientaPurposeAlcanceCapacidad
memberpress_delete_memberDelete a member (calls wp_delete_user; MemberPress cascade-cleans rows, transactions, subscriptions, events). Refuses to delete the calling user or any user with administrator capabilities.write:membersdelete_users — declared as an explicit tool-level gate; the tool is hidden from tools/list for users without it
memberpress_delete_webhookDelete a webhook.write:webhooksmanage_options
memberpress_manage_subscriptionCancel/suspend/resume a subscription.write:billingmanage_options
memberpress_refund_transactionRefund a transaction.write:billingmanage_options
memberpress_manage_sub_accountManage a corporate sub-account.write:membersmanage_options
memberpress_reset_course_progressReset a student's course progress.write:coursesedit_users

Documented Parameters and Behavior

The following parameter and behavior details are sourced from the codebase inventory and engineering confirmations. They are not a complete schema for every tool; remaining parameters are confirmed by per-tool preview.

  • memberpress_create_coupontipo_descuento{percent, dollar}, modo_descuento{standard, first-payment} (default standard), plus importe_descuento and an optional membership_ids array (restricts the coupon to specific products). Legacy values (flat, primero, todos) are hard-rejected. Carries execute.
  • memberpress_create_subscription — enrolls an *existing* member in a membership (member + product required); refuses duplicate enrollment; always uses gateway='manual' (admin-granted access, not a billing event); branches on one-time vs. recurring products. Carries execute.
  • memberpress_import_members — accepts a top-level enviar_correo_electrónico_de_bienvenida boolean (default falso); the WordPress welcome email fires once per newly-created member after provisioning. Existing users matched by email are not recreated. Carries execute.
  • memberpress_delete_membermember_id; calls wp_delete_user, letting MemberPress's deleted_user hook cascade-clean related rows. Confirmation-token flow only.
  • memberpress_manage_subscription — an action selector covering cancel/suspend/resume; curriculum vitae is a non-destructive variant that skips the destructive gate. Confirmation-token flow for destructive actions.
  • memberpress_manage_sub_account — an action selector; añada is a non-destructive variant that skips the destructive gate.
  • memberpress_refund_transactiontransaction_id required; optional cancel_subscription boolean. Response side-effect: when the transaction has an associated subscription AND cancel_subscription was *not* passed, the response (preview and live) adds subscription_listing_may_show_inactive: true y un subscription_listing_note. This flag and note concern only how the WP admin Subscriptions list displays status — that column derives from the latest transaction's status, not from the subscription record — and are skipped when cancel_subscription: true. The flag does not describe access behavior: refunding the latest transaction that backs a subscription ends the member's access for that term. This response shape must appear in any refund example. Confirmation-token flow only.

Public Tools

The unauthenticated public endpoint (/wp-json/mp-mcp/v1/public-mcp) exposes a separate, curated set of 4 read-only tools for use without a token. They return only public catalog data — pricing and signup links — and never member, transaction, or admin data. All four are memberpress_-prefixed and carry readOnlyHint: true.

These four names also exist in the authenticated read surface, but the public versions are distinct: simpler schemas, public-specific descriptions, and results limited to items opted into the public catalog.

HerramientaPurposeKey parameters
memberpress_list_membershipsList publicly-available membership plans with pricing and signup URLs.(none)
memberpress_get_membershipDetails for a public membership plan: pricing, trial info, signup URL.membership_id
memberpress_list_coursesList publicly-available courses.(none)
memberpress_get_courseDetails for a public course: overview and lesson count.course_id

The public catalog is curated at two levels: an admin enables it globally (MCP Settings → “Enable public AI catalog endpoint,” default off), and each membership or course can be excluded individually by unchecking “Show in public AI catalog” on its edit screen. A get_membership/get_course call for an item not in the public catalog returns no data.

Nota: When the public catalog is disabled (the default), the endpoint route is not mounted, so any request returns HTTP 404 rest_no_route — the endpoint's existence is not revealed. The /.well-known/mcp.json discovery document behaves the same way.

Add-On Gating

Add-on tools register only while their add-on is active, detected by a probe for the add-on's main class:

ComplementoDetection classHerramientas
Cursosmemberpress\courses\models\Coursecourse/lesson tools
Cuentas de empresaMPCA_Corporate_Accountcorporate tools
Descargasmemberpress\downloads\models\Filedownload tools

A site that lacks an add-on simply does not expose its tools — calling an unregistered tool returns the standard JSON-RPC unknown-method error.

Nota: MemberPress Gifting is no integrated with AI Foundation — no gift tools register, regardless of whether the Gifting add-on is active. Gifting support is planned for a future version.

Scope Reference

The wizard issues connections with one or more scopes. Read is always granted; write scopes are granted only at a Full Access ceiling.

The wizard's Access-step checkboxes map one-to-one to these scopes — each checkbox's value is the internal scope string, stored verbatim on the token:

Wizard bucketScope issued
Read everythingleer (always granted)
Edit contentwrite:content
Manage memberswrite:members
Billing operationswrite:billing
Bulk importswrite:imports
Manage webhookswrite:webhooks
Course progresswrite:courses

There is no separate scope for coupons, reminders, or corporate operations — coupons fold into write:content, email reminders into write:webhooks, and corporate sub-accounts into write:members.

AlcanceGrants
leerAll read tools. Always granted.
write:membersMember create/update/delete tools.
write:billingSubscription management and transaction refund tools.
write:contentAccess rule and coupon tools.
write:webhooksWebhook create/delete and email reminder tools.
write:importsMember import tool.
write:coursesCourse progress tools. Renders in the wizard only when Courses is active.
fullLegacy meta-scope. Satisfies any write:* request. Preserved for back-compat.

Capability Reference

Beyond scope, each write tool enforces the WordPress capability of the token's owner. A token with the right scope but an owner lacking the capability is rejected with CAPABILITY_INSUFFICIENT.

CapacidadHerramientas
create_userscreate_member, import_members
edit_usersupdate_member, create_subscription, complete_lesson, reset_course_progress
delete_usersdelete_member — explicit tool-level gate; hidden from tools/list without it
manage_optionsmanage_subscription, refund_transaction, create_rule, create_coupon, create_webhook, delete_webhook, toggle_reminder, manage_sub_account
¿Le ha resultado útil este artículo?

Artículos relacionados

chica del ordenador

¡Consiga MemberPress hoy mismo!

Empieza a cobrar por los contenidos que creas.