WP SmartPay Pro includes built-in support for the Model Context Protocol (MCP) — an open standard that lets AI assistants like Claude read and act on your store data securely. Once connected, Claude can create coupons, query payments, manage invoices, and more — in plain English, directly from the chat.
Prerequisites
You need the following before connecting an AI assistant to your store:
WP SmartPay Pro with an active license
MCP Adapter plugin — a free WordPress plugin that exposes SmartPay abilities over HTTP. Install it from the WordPress plugin directory.
WordPress Application Password — used as the bearer token for authentication. No separate API key needed.
Claude Code or Claude Desktop — the AI client you connect to the endpoint
Note: SmartPay registers all 15 abilities but cannot expose them over HTTP on its own. You must install and activate the MCP Adapter plugin. The Settings page will show a "Find MCP Adapter" button if the plugin is not detected.
Settings Page
Navigate to WPSmartPay → Settings → AI / MCP to find the four configuration cards.
Connection Status
Shows whether the MCP Adapter plugin is active. A gray dot means the plugin is not installed; a green dot means it is connected and ready. Click Find MCP Adapter to search the WordPress plugin directory and install it in one step.
Available Abilities
Lists all 15 registered abilities with their smartpay/-namespaced identifiers. The count badge confirms how many are active. This card is always visible — even before the MCP Adapter is installed — so you can preview what the AI will be able to do.
Connect Claude Code and Connect Claude Desktop
Both cards provide ready-to-paste commands pre-filled with your site's MCP endpoint URL.
Available Abilities
All 15 abilities use the smartpay/ namespace. They are always registered — the MCP Adapter exposes them over HTTP once installed.
Coupons
Ability | What it does | Required | Optional |
|---|---|---|---|
| Create a single discount coupon code | code, discount_type, discount_amount | expiry_date, description |
| List coupons with optional filters. Paginated. | — | search, type, page, per_page |
| Generate 1–500 unique coupon codes at once | quantity, discount_type, discount_amount | prefix, suffix, code_length, expiry_date, usage_limit |
Payments
Ability | What it does | Required | Optional |
|---|---|---|---|
| List payments with status, gateway, and search filters. Paginated. | — | status, gateway, search, page, per_page |
| Retrieve a single payment record with full details | id | — |
Customers
Ability | What it does | Required | Optional |
|---|---|---|---|
| List customers with optional search by email or name. Paginated. | — | search, page, per_page |
| Retrieve a customer profile plus their last 20 payments | id | — |
Invoices
Ability | What it does | Required | Optional |
|---|---|---|---|
| Create a draft invoice. Returns ID, number, and shareable public URL. | customer_id, amount | due_date, notes |
| Mark a draft invoice as sent and email it to the customer | invoice_id | — |
| List invoices filtered by status. Paginated. | — | status (draft|sent|paid|void), page, per_page |
Subscriptions
Ability | What it does | Required | Optional |
|---|---|---|---|
| List subscriptions filtered by status. Supported: pending, active, cancelled, expired, trialling, failing, completed, suspended. | — | status, page, per_page |
| Cancel an active subscription | subscription_id | — |
Forms
Ability | What it does | Required | Optional |
|---|---|---|---|
| Create a new payment form with one or more pricing amounts | title, amounts[] | status (publish|draft), pay_label |
| List payment forms with search and status filter. Paginated. | — | search, status, page, per_page |
| Retrieve a form — returns title, status, shortcode, edit URL, and amounts | id | — |
Connect Claude Code
Claude Code is Anthropic's CLI tool. Run the command from the Connect Claude Code card in your terminal — Claude Code will discover all 15 abilities automatically.
Install MCP Adapter. Go to Settings → AI / MCP and click Find MCP Adapter. Install and activate the plugin.
Create a WordPress Application Password. Go to Users → Your Profile → Application Passwords. Name it "Claude Code" and copy the generated value.
Run the command shown in the settings card:
claude mcp add smartpay --transport http "https://your-site.com/wp-json/mcp/mcp-adapter-default-server"Provide your Application Password as a bearer token when prompted for authentication headers.
The command in the settings card is pre-filled with your site's URL — just copy and run.
Connect Claude Desktop
Claude Desktop gives you a chat interface with full access to your store's abilities.
Open Claude Desktop → Settings → Developer → Edit Config.
Paste the snippet from the Connect Claude Desktop card into
claude_desktop_config.json:
{
"mcpServers": {
"smartpay": {
"url": "https://your-site.com/wp-json/mcp/mcp-adapter-default-server",
"type": "streamable-http"
}
}
}Add your WordPress Application Password as a bearer token in the config.
Restart Claude Desktop.
Example Prompts
Once connected, use natural language to manage your store:
What you say to Claude | Ability used |
|---|---|
"Create a 20% coupon called SUMMER20, valid until August 31" |
|
"Generate 100 unique codes with a PROMO- prefix, 15% off, one use each" |
|
"Show all Stripe payments from last month" |
|
"Who is customer #42 and what have they bought?" |
|
"Create a $150 invoice for customer #12, due in 30 days, and send it" |
|
"List all failing subscriptions" |
|
"Cancel subscription #88" |
|
"Create a form called 'Conference Ticket' with $50 and $100 tiers" |
|
Authentication
The MCP endpoint uses WordPress Application Passwords — a standard WordPress feature available since version 5.6.
Go to WordPress Admin → Users → Your Profile and scroll to Application Passwords.
Enter a name (e.g. "Claude") and click Add New Application Password.
Copy the generated password — it is shown only once.
Use it as the bearer token or HTTP Basic Auth value in your AI client configuration.
Security note: Application Passwords grant full API access under the user's permissions. Consider creating a dedicated WordPress user with the minimum required role (e.g. Editor) for AI connections, rather than using your main admin account.
Frequently Asked Questions
Do I need an Anthropic API key in SmartPay?
No. SmartPay acts as an MCP server. The AI client (Claude Code, Claude Desktop) handles the Anthropic connection. No API key is stored in SmartPay settings.
Can I use AI clients other than Claude?
Yes — any MCP-compatible client can connect to the SmartPay endpoint. The Model Context Protocol is open and not Claude-specific.
Where is the MCP endpoint URL?
It is shown in both the Connect Claude Code and Connect Claude Desktop cards, pre-filled with your site's URL. Format: https://your-site.com/wp-json/mcp/mcp-adapter-default-server
Why can I see all 15 abilities even without the MCP Adapter installed?
SmartPay always registers its abilities so you can preview them. The MCP Adapter plugin exposes those abilities over HTTP — it is not bundled with SmartPay Pro.
Can the AI delete payments or customer records?
No. The built-in abilities cover create, list, read, cancel subscription, and send invoice only. There is no delete ability. All actions run under the permissions of the WordPress user whose Application Password is used.
How do I disconnect the AI?
Delete or revoke the Application Password from your WordPress user profile. This immediately invalidates all connections using that credential.