Get the plugin
WP MCP/Integrations/Memberships

Memberships integration

MemberPress AI agent tool reference

MemberPress keeps a membership as a memberpressproduct post with its settings in _mepr_ meta, and an access rule as a memberpressrule post whose conditions are rows of its own table. WP MCP Pro reads memberships, members, transactions and rules (a transaction's gateway response is never returned), and writes memberships and rules by storing the same keys the same way MeprProduct::store() and MeprRule::store() do, so MemberPress reads them back unchanged. create-membership and create-rule record the new post for rollback (the undo moves it to the trash), a rule's access conditions captured too; update-membership and update-rule run under a post snapshot of every field and meta key, a rule's replaced conditions in the same session, so rollback-session undoes the whole call. Nothing here moves money: there is no refund, charge, or transaction or subscription write, and nothing is deleted, a membership or rule is taken to draft at most. Writes are off until a site opts in, and every op takes MemberPress's own admin capability.

plugin-data-readplugin-data-write

In practice

How MemberPress work goes with an agent.

MemberPress splits its data three ways. A membership is a memberpressproduct post with price, billing period, trial and expiry settings in underscore-mepr meta. An access rule is a memberpressrule post whose conditions, such as a membership, a role or a login state, are rows in a table of their own. Members and transactions live in MemberPress tables. WP MCP Pro reads all of it, writes memberships and rules the way MemberPress stores them, and never touches money: there is no refund, charge, delete or subscription write.

List memberships with price, billing period and active member counts.

Runs memberpress-list-memberships, returning price, period, trial and an active member count per membership. Read only, and a transaction's gateway response is never part of any result.

Which members of the Gold membership are expired?

Runs memberpress-list-members with a membership id and status expired. Results are personal data: login, email, membership ids, transaction counts and total spent. Needs MemberPress's admin capability.

Create a draft rule that protects the Pro docs category for Gold members, with a 7 day drip.

Runs memberpress-create-rule with type category, the content, a membership access condition and drip settings. The rule starts as a draft, so it is not enforced, and the undo moves it to the trash. Needs the write opt-in.

Set the Gold membership to 29 dollars.

Runs memberpress-update-membership under a post snapshot of every field and meta key. The result states that the new price applies to new signups only, and rollback-operation restores the old value.

What your AI can do

Real MemberPress operations, every write reversible.

  • List and read memberships, members, transactions and access rules
  • Create and update memberships, every field and meta key snapshotted
  • Create and update access rules, including their access conditions
  • Take a membership or rule to draft rather than deleting it
  • Roll back a whole create-or-update call as one session

Example prompts

Example MemberPress prompts.

List our MemberPress memberships and how many active members each has.

Change the price of the Gold membership to 29 dollars.

Add an access rule that locks the Pro docs category to the Gold membership.

Under the hood

The MemberPress calls, under the hood.

wpmcp, memberpress

plugin-data-read({ integration: "memberpress", operation: "list-memberships" }), memberships with member counts

plugin-data-write({ integration: "memberpress", operation: "update-membership", args: {…} }), opt-in; post snapshot, reversible

Safety and access

What can be undone on MemberPress, and what costs what.

Recoverable on MemberPress

  • update-membership and update-rule run under a post snapshot of every field and meta key.
  • A rule's replaced access conditions are snapshotted in the same session, so rollback-session undoes the whole call.
  • A created membership or rule is undone by moving it to the trash.

MemberPress limits and opt-ins

  • Writes are off until a site opts in with the wpmcp_enable_memberpress_write filter. Reads work without it.
  • Nothing here moves money. There is no refund, charge, transaction write or subscription write.
  • Nothing is deleted. A membership or rule can be taken to draft at most.
  • A price change affects new signups only, not existing subscriptions.
  • When access is given on update-rule it replaces every existing access condition.

Free or Pro: MemberPress support is a Pro feature, added in 0.9.0, and the free plugin has none of it. With Pro active the five reads (memberships, one membership, members, transactions, rules) work straight away. The four writes, create and update for memberships and rules, stay off until the site sets the wpmcp_enable_memberpress_write filter. Every op takes MemberPress's own admin capability, remove_users unless a site changes it.

Part of WP MCP Pro

The MemberPress integration is part of WP MCP Pro.

One Pro licence unlocks the MemberPress tools and every other Pro integration on this site: Elementor deep editing, the other page builders, the forms adapter pack and more, 133 Pro tools in all. The free plugin still covers the rest of WordPress and the full snapshot and undo engine, so you can try the safety model before you buy.

Frequently asked

MemberPress MCP: questions, answered.

Can an agent refund or charge a member?

No. There is no refund, charge, or transaction or subscription write. Reads never return a transaction's gateway response. A price change applies to new signups only, which the op states.

Are the writes on by default?

No. MemberPress writes stay off until a site opts in with the wpmcp_enable_memberpress_write filter, and each op takes MemberPress's own admin capability.

What can an access rule be conditioned on?

Five condition types, MemberPress's own: a membership, a named member, a role, a login state of logged in or guest, and a capability. You give them as an access list on create-rule or update-rule. Rule types include all, single post, category, tag, single page, partial and custom.

Why does a new rule do nothing?

Status defaults to draft, and a draft rule is not enforced by MemberPress. That is deliberate, so an agent can build and check a rule first. Review it with list-rules, then update its status to publish when you want it to start protecting content.

Can the MemberPress integration see how much a member has spent?

Yes. list-members returns total spent, transaction and subscription counts and active and inactive membership ids, and list-transactions returns amount, tax, total, status and gateway. The gateway's own response data is withheld. Both are personal data and need the admin capability.

How does it avoid breaking MemberPress's own data?

It stores the same keys the same way MemberPress's store functions do, with prices to two decimals and false as an empty string, and fills unset settings with MemberPress defaults on create. MemberPress reads the result back exactly as if the admin screen had saved it.

Point your AI at MemberPress.