How do I use MCP to manage my site with AI assistants?
MCP (Model Context Protocol) is an advanced feature that allows AI assistants like Claude Desktop to directly manage your WordPress site and interact with WupSales.
What is MCP?
MCP is a protocol created by Anthropic that enables AI assistants to:
- Access and modify WordPress content
- Manage customer points and rewards
- Create and edit posts/pages
- Execute workflows
- Query database information
- Generate reports and analytics
Think of it as: Giving Claude AI direct access to your WordPress admin panel, but in a safe, controlled way.
Enabling MCP in WupSales:
Step 1: Enable MCP Server
- Navigate to AI Copilot → Settings → MCP
- Toggle “Enable MCP Server” to ON
- Generate Security Token (or use provided token)
- Save settings
Step 2: Note Connection Details
MCP Server URL: https://yoursite.com/wp-json/mcp/v1/sse Bearer Token: [Your Security Token]
Step 3: Connect Claude Desktop (Example)
Add to Claude Desktop MCP configuration:
{
"mcpServers": {
"wupsales": {
"url": "https://yoursite.com/wp-json/mcp/v1/sse",
"type": "sse",
"headers": {
"Authorization": "Bearer YOUR_TOKEN_HERE"
}
}
}
}
Available MCP Tools:
WordPress Management:
- wp_get_posts: List posts/pages
- wp_get_post: Get full post content
- wp_create_post: Create new posts/pages
- wp_update_post: Edit existing content
- wp_delete_post: Delete posts/pages
WooCommerce Operations:
- wp_get_products: List products
- wp_get_orders: View orders
- wp_update_order: Modify order status
WupSales Points & Rewards:
- wupsales_get_customer_points: Check customer balance
- wupsales_add_points: Award points
- wupsales_subtract_points: Deduct points
- wupsales_get_rewards: List available rewards
- wupsales_redeem_reward: Apply reward for customer
Workflow Management:
- workflow_list: View all workflows
- workflow_get: Get workflow details
- workflow_create: Create new workflow
- workflow_run_manual: Trigger workflow
- workflow_publish: Activate workflow
- workflow_stop: Pause workflow
Content Generation:
- aiwu_image: Generate AI images (DALL-E, Gemini)
- aiwu_text: Generate AI text content
Example Use Cases:
1. Ask Claude to Check Customer Points:
You: “Check how many points customer john@example.com has”
Claude: [Uses wp_get_users + wupsales_get_customer_points]
Response: “John has 1,250 points, which equals $12.50 in rewards”
2. Create Loyalty Workflow via Chat:
You: “Create a workflow that awards 500 bonus points to customers on their birthday”
Claude: [Uses workflow_create with birthday trigger]
Response: “I’ve created the Birthday Bonus workflow. It will run daily and check for birthdays…”
3. Generate Product Description:
You: “Write a description for product ID 123 emphasizing eco-friendly features”
Claude: [Uses wp_get_post + aiwu_text + wp_update_post]
Response: “I’ve updated the product description highlighting sustainability…”
4. Bulk Point Adjustment:
You: “Add 100 bonus points to all customers who ordered in the last 30 days”
Claude: [Uses wp_get_orders + wupsales_add_points in loop]
Response: “I’ve added 100 points to 47 customers who ordered recently”
Security Considerations:
Access Control:
- MCP token has same permissions as admin user
- Keep token secret (like a password)
- Rotate tokens regularly
- Disable MCP when not in use
Audit Logging:
Enable MCP logging at Settings → MCP → Enable Logging
- Tracks all MCP tool calls
- Records who/what made changes
- Useful for troubleshooting
IP Restrictions (Optional):
- Whitelist specific IP addresses
- Block access from unknown IPs
- Useful for agency/enterprise deployments
Limitations:
- Requires AI assistant with MCP support (Claude Desktop, etc.)
- Cannot perform operations requiring real-time payment processing
- Rate limited to prevent abuse
- Some operations may require manual approval
Troubleshooting:
Connection Failed:
- Verify MCP is enabled in settings
- Check token is correct
- Ensure HTTPS is configured
- Verify no firewall blocking SSE connections
Permission Denied:
- Check user role associated with token
- Verify capability requirements
- Review audit logs for specific error
Developer Resources:
- MCP Protocol Specification: anthropic.com/mcp
- WupSales MCP Documentation: wupsales.com/docs/mcp
- Tool Reference: AI Copilot → Settings → MCP → Available Tools
Pro Tip: MCP is perfect for batch operations that would be tedious via the admin panel. Ask Claude to “show me all customers with more than 5,000 points” or “create 10 test products with AI-generated descriptions”!