Connect an AI assistant to Leaky Paywall (MCP)
Leaky Paywall 5.3.5 and later can connect to an AI assistant such as Claude. Once connected, you can ask about a subscriber or your subscription levels in plain English. For example: "Why can't this reader see paid articles?" The assistant looks up the answer on your site. It can read data but can't change anything.
How it works
Leaky Paywall adds two read-only tools to WordPress. The free MCP Adapter plugin makes those tools available to AI assistants that support MCP (Model Context Protocol). When you ask a question, the assistant picks a tool, calls it on your site, and answers from the result.
- Explain subscriber access. Give it an email address or user ID. It returns the subscriber's level, status, expiration date, payment gateway and gateway customer ID, the last 10 status changes, and a list of findings that explain why they can or can't read paid content.
- List subscription levels. It returns every level you sell: name, price, billing interval, whether it renews, what content it unlocks, and the gateway plan IDs. It can include deleted levels too.
The subscriber tool checks for the problems behind most lockouts:
- no live record, but a test mode record exists
- no subscription record at all
- a missing, deleted or nonexistent level
- a status that doesn't grant access, such as deactivated
- an expiration date that has passed or can't be read
- a Stripe subscriber with a missing or invalid customer ID
What keeps it safe
- Off by default. Nothing is available to an assistant until you turn on AI Assistants.
- Admins only. The account the assistant connects with must be able to manage Leaky Paywall settings.
- Read-only. The tools never contact Stripe or change a subscriber.
- Your data goes to the AI provider. Subscriber names, emails and payment details the assistant looks up are sent to the company that runs it. Check that this fits your privacy policy before turning it on.
Setup
You need WordPress 6.9 or later, Leaky Paywall 5.3.5 or later, and an administrator account.
- Update WordPress to 6.9 or later. Earlier versions don't have the system the tools use, so they won't appear.
- Update Leaky Paywall to 5.3.5 or later.
- Install the MCP Adapter plugin. Go to Plugins > Add New, search for "MCP Adapter", then install and activate it.
- Turn on AI Assistants. Go to Leaky Paywall > Settings > General, check AI Assistants, and click Save Settings.
- Create an application password. Go to Users > Profile for the administrator who will connect. Under Application Passwords, enter a name such as "Claude" and click Add New Application Password. Copy the password now, because WordPress shows it only once.
- Add your site to the AI assistant. In Claude Desktop, go to Settings > Developer > Edit Config and add the block below. Put in your site address, your WordPress username and the application password. Other MCP clients use the same settings.
{
"mcpServers": {
"leaky-paywall": {
"command": "npx",
"args": ["-y", "@automattic/mcp-wordpress-remote@latest"],
"env": {
"WP_API_URL": "https://yoursite.com/wp-json/mcp/mcp-adapter-default-server",
"WP_API_USERNAME": "your-admin-username",
"WP_API_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
}
}
}
}
This uses Node.js on your computer. If Claude Desktop says it can't find npx, install Node.js from nodejs.org first.
- Restart the assistant and test it. Ask "What subscription levels does this site sell?" It should list your levels.
Questions you can ask
About a subscriber
- "Why can't [email protected] read paid articles?"
- "Is user 4821's subscription active, and when does it expire?"
- "A reader says they renewed but they're still locked out. Here's their email. What's wrong?"
- "Is this subscriber's Stripe customer ID set up correctly?"
- "What's happened to this subscriber's status recently?"
- "Is this person on a free account or a paid one?"
- "Why doesn't this subscriber show up in the Subscribers list?"
About your subscription levels
- "What subscription levels do we sell, and what do they cost?"
- "Which levels renew automatically, and which are one-time?"
- "What content does the Digital level unlock?"
- "What Stripe plan IDs are attached to each level?"
Combining both
- "This subscriber is on level 3. What does that level include, and should they be able to read paid posts?"
- "Draft a reply to this reader explaining why they're locked out."
What it can't do yet
- Count or list subscribers. "How many active subscribers do we have?" or "Who expires this month?" Use the Subscribers list or Insights for these.
- Check a single post. It can't tell you whether a specific post is restricted.
- Check Stripe directly. It reads what Leaky Paywall has stored, not Stripe's current data.
- Make changes. It can't extend, reactivate or cancel a subscription.
Troubleshooting
- The assistant doesn't see any Leaky Paywall tools. Check that AI Assistants is on, WordPress is 6.9 or later, and Leaky Paywall is 5.3.5 or later.
- Permission errors. The connecting user must be an administrator, and the application password must be copied exactly.
- 401 or 403 errors. A security plugin or your host may be blocking application passwords or the REST API. Ask them to allow
/wp-json/mcp/. - To turn it off, uncheck AI Assistants. The tools disappear right away. Revoke the application password under Users > Profile to remove access completely.
For developers
The tools are WordPress abilities named leaky-paywall/explain-subscriber-access and leaky-paywall/list-levels. The MCP endpoint is /wp-json/mcp/mcp-adapter-default-server. With WP-CLI on the server, you can run the adapter over STDIO instead of HTTP:
wp mcp-adapter serve --server=mcp-adapter-default-server --user=admin
The leaky_paywall_abilities_exposed filter overrides the AI Assistants setting. Return true or false.