If you already use an AI coding agent, you know how good the tools have gotten. Claude Code, Cursor, Codex CLI, and friends can read your codebase, run commands, edit files, and reason about what they see. What most site owners have not tried yet is pointing one of those agents at a live WordPress membership site and asking real questions of it. “How many active members are on the Plus level? Which orders failed last week? Cancel this test subscription for me.”

The WordPress community is building an official AI stack for exactly this: the Abilities API, an MCP adapter, connector auth flows. Paid Memberships Pro is already part of it. Starting with version 3.9, PMPro registers its membership, order, and subscription abilities with the WordPress Abilities API. It is promising, and it is genuinely exciting to watch. It is also several plugins and moving parts today, and it will keep moving for a while yet. That is what a healthy ecosystem looks like at this stage.

Banner image for The Simplest Way to Connect an AI Agent to Your Membership Site blog post, title over a dark terminal screen full of code

But you do not have to wait. WordPress and Paid Memberships Pro already ship the tools you need. SSH plus WP-CLI gives an agent a full control surface for the site. A dedicated WordPress user with an Application Password gets it talking to the WordPress REST API and to Paid Memberships Pro’s REST routes over plain HTTP Basic auth. Both are documented, and both work with any capable agent today. Pick the path that matches the access you already have.

Looking for the PMPro MCP?

That is a different tool, and it works alongside every path in this post. The PMPro MCP connects your AI app to Paid Memberships Pro’s documentation, source code, and videos, so it knows how PMPro and its Add Ons actually work before it touches anything. It cannot see or change your website.

Think of it this way: the PMPro MCP teaches your agent how. The paths below give it access to do the work. Any paidmembershipspro.com account can connect, free or paid, and paid members get higher limits. Connect your AI to PMPro in about a minute.

Pick Your Path

If you have…Start hereWhat your agent can do
PMPro MaxRequest shell access and a staging clone, or use your Max CreditsEverything in the SSH path, on hosting set up for it, or hand the work to our team
SSH access to your serverWP-CLI and the wp pmpro commandsAnything you can do in the admin, and more, from the shell
A WordPress loginA dedicated user, an Application Password, and the REST APIExactly what that user’s capabilities allow

Whichever path you pick, start read-only on a staging copy, then widen the scope. More on that in Start Read-Only, Then Widen the Scope.

If You Have PMPro Max

PMPro Max comes with managed hosting, and that hosting already has the guardrails this kind of work needs. Every Max plan includes daily backups and SSH and SFTP access. Shell access is key-based, and you request it from our team. Our SSH Access guide walks through creating a key pair and asking for the access level you need.

Ask for a staging site at the same time. We make staging sites as a scrubbed clone of your live site that you can experiment in freely, which is exactly where an agent should run its first commands. From there, follow the SSH path below.

If you would rather not run an agent yourself, your Max Credits cover the other way in. Use them for Do It For Me requests, where our team does the work on your hosted site, or to run AI Skills from the PMPro skills library at one credit per run. Max members also get the higher PMPro MCP limits, so the agent you connect has more room to look things up while it works.

If You Have SSH Access: Use WP-CLI

If you already trust your agent with a shell on your machine, giving it a shell on the server unlocks a lot more. WP-CLI is the most complete WordPress control surface there is. wp user, wp post, wp option, wp plugin, wp db… anything you would ever do in the admin, and quite a few things you cannot do in the admin, are one command away.

Starting with Paid Memberships Pro 3.9, the core plugin registers its own wp pmpro command family, so member and order operations are first-class from the shell too. The command surface is:

  • wp pmpro membership list
  • wp pmpro member get / add-level / remove-level / change-level / cancel
  • wp pmpro level list / get
  • wp pmpro order list / get
  • wp pmpro subscription list / get / sync

All of these follow standard WP-CLI conventions: --format=table|csv|json|yaml|count, --fields=... for column selection, and --dry-run and --yes on the write commands. Ask an agent to “list all active members on the Plus level as JSON” and it will land on wp pmpro membership list --level=2 --status=active --format=json on its own. Add Ons can register their own commands under the same namespace with the pmpro_cli_init action, so a well-maintained site tends to get more capable over time. Every option and output field is in the WP-CLI Commands documentation.

Before you hand any agent an SSH key, a few ground rules:

  • Use a dedicated system user for the agent: Same principle as a dedicated WordPress user. Do not share your own account. Give it only the permissions the WP-CLI commands need.
  • Point it at a staging or dev copy first: Even a careful agent occasionally does something you did not expect. Prove the workflow on a copy of the site before you point it at production. We have written about why every membership site should have a staging environment, and our Staging or Development Sites documentation covers the safe way to spin one up.
  • Make sure your backups are current: A shell is not the place to find out your last snapshot is four months old.
  • Skip this on shared hosting: Most shared hosts restrict WP-CLI and SSH, and none of them give you a meaningful sandbox. Managed WordPress hosts, PMPro Max, and VPS setups are the right environment.

If you also have the Developer’s Toolkit Add On installed, it adds a separate wp pmpro-toolkit set of CLI commands for bulk cleanup work on a staging box: deleting test orders, moving every member from one level to another, clearing cached report data, and similar database scripts. You enable them first with the Enable Toolkit CLI Commands checkbox in the Toolkit settings. The same Add On also has settings that redirect every outgoing PMPro email to one address and put the payment gateway in debug mode, which is exactly what you want before an agent starts running write commands against a staging clone.

If You Have API Access: Use a Dedicated User and an Application Password

This path needs nothing but a WordPress login, and it is the lowest-risk place to start. It works from any agent that can make HTTP requests (which is all of them), it leaves an audit trail, and it is one click to revoke if anything goes sideways.

Create a New WordPress User for the Agent

Do not reuse your own admin login, and do not give the agent an administrator account. Make a new WordPress user whose entire job is being the agent, and give it the smallest role that covers what you want the agent to do.

One thing to know before you pick a role: Paid Memberships Pro grants its pmpro_* capabilities to the Administrator role only. An Editor or Subscriber does not get them by default, so a lower role will hit permission errors on most member and order routes until you grant the specific capabilities yourself.

  • Reporting and lookups: A custom role (a plugin like Members or User Role Editor makes this easy) with just the capabilities the job needs. pmpro_edit_members covers member and subscription lookups, and pmpro_orders covers orders. Level listings are public and need no capability at all. Know that pmpro_edit_members also allows changing and canceling memberships. For a truly read-only agent, also limit that user to GET requests with the pmpro_rest_api_permissions filter.
  • Day-to-day member management: The Membership Manager Role Add On gives you a ready-made role that manages members, orders, and membership settings without access to plugins, themes, or WordPress settings. It is still a broad grant: it can refund orders and edit payment settings. Use it when the agent genuinely needs to act, not just look.
  • Administrator: Only as a last resort, and treat it like handing someone a key to the office. Scoped down is safer than scoped up and pulled back later.

A dedicated user keeps your own login clean, lets you see exactly what the agent did, and lets you kill access without disrupting yourself.

Generate an Application Password on That User’s Profile

Application Passwords have been in WordPress core since 5.6. Go to Users > All Users, click into the agent user, scroll to Application Passwords, name the credential something honest like “Claude Code” or “Cursor Agent,” and generate it. WordPress will show you a one-time 24-character password. Copy it now. You cannot see it again.

We have a step-by-step walkthrough with screenshots if you want the visual version: How to Create an Application Password for WordPress.

The agent will send this credential as HTTP Basic auth on every request. The username is the WordPress username. The password is the 24-character string, spaces and all. That is the entire authentication story.

Point the Agent at the REST API

Once the credential exists, the agent can talk to the WordPress REST API and to Paid Memberships Pro’s REST routes without any additional setup. A quick sanity check with curl looks like this:

curl -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
  https://yoursite.com/wp-json/wp/v2/users/me

That confirms the credential works and shows you which user the agent is authenticating as. Paid Memberships Pro registers its routes under pmpro/v1. Grab a level (no capability needed):

curl -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
  "https://yoursite.com/wp-json/pmpro/v1/membership_level?id=1"

Or list active members on a level, with paging (this one needs the pmpro_edit_members capability):

curl -u "agent-user:xxxx xxxx xxxx xxxx xxxx xxxx" \
  "https://yoursite.com/wp-json/pmpro/v1/memberships?level=2&status=active&per_page=20"

Paid Memberships Pro 3.9 added the memberships, orders, and subscriptions collection routes with filtering, sorting, and pagination, which are the ones agents get the most out of. They sit alongside older routes like membership_level, membership_levels, has_membership_access, get_membership_level_for_user, change_membership_level, cancel_membership_level, discount_code, and order. The full list, with parameters and response shapes, is in the REST API Methods documentation.

The reason this works so well with agents is that you do not have to teach them anything ahead of time. Give the agent your site URL and the credential, and tell it plainly: “Use the WordPress REST API and the Paid Memberships Pro REST API. Here is the base URL. Here is the auth.” From there it will discover routes, read responses, and reason about what comes back. Connect the PMPro MCP too, and it can check the docs and code for a route’s parameters instead of guessing.

Or Use the WordPress Abilities API

On WordPress 6.9 and later, Paid Memberships Pro 3.9 also registers its abilities with the WordPress Abilities API: querying levels, orders, subscriptions, and PMPro search results, and viewing, changing, or canceling a member’s memberships. Abilities are available over the REST API and to MCP clients through an MCP adapter plugin, and each one checks the user’s PMPro capabilities before it runs, so a scoped agent user stays scoped. The Abilities API documentation lists every ability with its inputs, outputs, and permissions.

Revocation and Audit

The Application Passwords screen is also where you audit and revoke access. WordPress tracks the last-used timestamp and last-used IP address for every Application Password on the user profile. If you no longer trust a credential, click Revoke. The agent’s next request fails, and there is nothing else to reset or invalidate.

About the Real Risks

Connecting an AI agent to a live site comes with a few real concerns. None of them are hypothetical, and all of them are manageable if you plan for them.

The agent has exactly the power of the user or shell you gave it. That is the deal with every connection method, including the ones the official ecosystem is building. Scope the WordPress user or the system user tightly. Do not hand out capabilities the agent does not need for the current job. If the agent only needs to read, do not give it the ability to write.

Prompt injection is real. An agent that reads untrusted content while it holds write credentials can be manipulated into doing something you did not ask for. Untrusted content includes public web pages, comment threads, member-submitted forum posts, support tickets, and anything else where a third party contributed text. If your agent is going to browse or ingest content like that, run it against a read-mostly credential and require explicit human confirmation before any write. This is the most common way connected agents go wrong today.

SSH is the biggest grant you can hand out. Treat it like giving a contractor server access: a dedicated user, staging first, current backups, and only for agents that have their own permission-prompt or sandbox layer. Claude Code and similar harnesses ask before running potentially destructive commands. That prompt is doing real work. Do not turn it off.

You give up polished consent screens, for now. Connector experiences with per-action confirmation and consent flows are on the way, designed for site owners who are not going to read a curl example. That is genuinely valuable for non-technical teammates. For a developer running an agent in a terminal today, it is a fair trade to skip. For handing agent access to a marketing coordinator who does not want to touch the shell, wait for the connectors.

The through-line is to scope the user, not your trust. A tightly scoped credential that leaks is a problem you can size and fix. A wide-open credential you were trusting the agent to use carefully is not.

Infographic: Scope the User, Not Your Trust. Four rules: dedicated user, staging site first with current backups, read-mostly credentials for browsing agents, human confirmation before every write.
Four ground rules before you hand an AI agent any credential.

Start Read-Only, Then Widen the Scope

The pattern that works here is not exciting, and that is the point.

  1. Create a read-only agent user first: Application Password, minimal capabilities, GET requests only.
  2. Prove the agent can answer real questions: “How many active members are on the Plus level right now? Which orders failed to charge last week? What is the average lifetime of a member on our monthly plan?” If the agent can answer those with just the REST API and the credential you gave it, you have already unlocked most of the value.
  3. Widen the scope one capability at a time: Add member management when you actually need it. Add SSH when a batch operation is genuinely faster in a shell. Every time you widen, check what the agent did the next time you sit down.
Infographic: Widen Access Step by Step. Three steps: start with a read-only user, prove it answers real questions, add one capability at a time.
Start read-only, prove the value, then widen the grant.

The best part of doing it this way is that you are not waiting on the ecosystem, and you are not committing to it either. When a proper connector fits your site better, moving an agent from an Application Password to that connector is a small change, and your PMPro data will be ready for it either way. For more ideas on what to hand off once the connection is working, our WordPress Automation guide is a good next read.

Frequently Asked Questions

Is this the same as the PMPro MCP?

No. The PMPro MCP gives your AI app Paid Memberships Pro’s docs, code, and videos so it knows how PMPro works. It cannot see or change your website. The paths in this post give your agent access to your own site. Most people will want both.

Do I need any paid Paid Memberships Pro Add On for this?

No. The REST API is in Paid Memberships Pro core. The wp pmpro WP-CLI commands and the Abilities API support ship in Paid Memberships Pro 3.9 and later. Application Passwords have been in WordPress core since 5.6. The Membership Manager Role Add On, included with Standard and Max, is an optional shortcut for a non-admin agent user.

Which AI agent should I use?

Any agent that can make authenticated HTTP requests or run shell commands will work. Claude Code, Cursor, and Codex CLI are the ones we hear about most from developers running this pattern. The connection method is what matters, not the specific agent.

Can a non-technical teammate use this?

Not really, and that is on purpose. These paths are for developers and technical site owners who are comfortable with credentials, curl, and the shell. A non-technical teammate can still connect the PMPro MCP for answers about how PMPro works, and PMPro Max members can hand site changes to our team with Max Credits. For direct agent access without a terminal, wait for the consumer-facing connector experience that is being built for exactly that.

What happens when the WordPress AI stack matures?

You migrate when it makes sense to. Application Passwords do not go away when the connector story lands, and the REST API is not being replaced. If a connector experience is a better fit for a specific agent or a specific user, you switch that one. Nothing you set up today has to be torn down.

Where can I learn more about the Paid Memberships Pro REST API?

The REST API Methods documentation is the canonical reference. The WP-CLI Commands and Abilities API docs cover the other two surfaces, and the broader API documentation is worth a read too. The code itself lives in includes/rest-api.php in the Paid Memberships Pro GitHub repository.



Was this article helpful?
YesNo