SRZ MCP Server WP

SRZ MCP Server WP

Enables AI clients to manage WordPress and WooCommerce sites with over 194 tools for content, users, security, performance, and e-commerce operations.

Category
访问服务器

README

SRZ MCP Server WP

A comprehensive WordPress plugin that creates an MCP (Model Context Protocol) server for AI integration. This plugin provides 194+ tools for complete WordPress and WooCommerce management through AI clients like Cursor, Claude Desktop, or VS Code.

🚀 194+ Available Tools

Core WordPress Management (31 tools)

  • Site information, status monitoring, and configuration
  • User management, roles, and permissions
  • Content management (posts, pages, media)
  • Database operations and optimization
  • System maintenance and debugging
  • Cron job management
  • WordPress core updates and configuration

Site Management (10 tools)

  • Site status monitoring and health checks
  • URL management and redirects
  • Maintenance mode control
  • Cache management and optimization
  • Security hardening and monitoring

Plugin & Theme Tools (20 tools)

  • Plugin installation, activation, and management
  • Theme switching and customization
  • Bulk operations for plugins and themes
  • Update management and version control
  • Dependency checking and conflict resolution

Security Management (20 tools)

  • Security scanning and vulnerability assessment
  • Malware detection and removal
  • IP blocking and firewall management
  • User security and access control
  • Security audit and compliance checking

Performance & Caching (32 tools)

  • Cache management (object, page, database)
  • Performance monitoring and optimization
  • CDN configuration and management
  • Database optimization and cleanup
  • Resource monitoring and alerting

Database & File Tools (25 tools)

  • Database queries and management
  • Backup and restore operations
  • File system operations and security
  • Search and replace functionality
  • Data migration and synchronization

Email & Notifications (36 tools)

  • Email sending and template management
  • Notification system configuration
  • Queue management and monitoring
  • Analytics and reporting
  • Webhook management and testing

WooCommerce Advanced Management (20+ tools)

  • Product Management: Complete CRUD operations
  • Bulk Operations: Mass product updates and management
  • Order Processing: Order management and status updates
  • Customer Management: Customer data and order history
  • Inventory Control: Stock management and monitoring
  • Analytics & Reporting: Sales data and performance metrics
  • Coupon Management: Discount creation and management
  • Settings Configuration: WooCommerce settings management

WooCommerce Product Editor (10+ tools)

  • Product Editing: Name, description, price, SKU updates
  • Category Management: Add/remove product categories
  • Tag Management: Product tag operations
  • Attribute Management: Product attributes and variations
  • SEO Optimization: Meta descriptions and keywords
  • Image Management: Featured images and galleries
  • Stock Management: Inventory tracking and alerts
  • Pricing Management: Regular and sale price updates

Key Features

Complete WordPress Control

  • 194+ tools covering every aspect of WordPress management
  • Real-time monitoring of site health and performance
  • Automated maintenance tasks and optimization
  • Security hardening and vulnerability scanning
  • Database management and optimization

Advanced WooCommerce Integration

  • Product Management: Full CRUD operations with bulk capabilities
  • Order Processing: Complete order lifecycle management
  • Customer Insights: Customer data and behavior analysis
  • Inventory Control: Stock management and automated alerts
  • Analytics Dashboard: Sales reports and performance metrics
  • Marketing Tools: Coupon management and promotional campaigns

AI-Powered Features

  • Smart Product Descriptions: AI-generated content for better SEO
  • Intelligent Categorization: Automatic product categorization
  • Content Optimization: SEO-friendly content generation
  • Automated Workflows: Smart automation for repetitive tasks

Developer-Friendly

  • REST API Integration: Full WordPress REST API compliance
  • Extensible Architecture: Easy to add custom tools
  • Comprehensive Logging: Detailed operation logs and debugging
  • Error Handling: Graceful error management and reporting

🏗️ Architecture

The plugin is built with a modular, extensible architecture:

  • Core Module: Handles MCP protocol, REST API, and core abilities
  • Abilities Manager: Manages ability registration and execution
  • Hooks Manager: Provides extensibility system for other plugins
  • Admin Interface: WordPress admin dashboard with modern UI
  • WooCommerce Integration: Comprehensive e-commerce abilities
  • WooCommerce Advanced Management: Advanced bulk operations and automation
  • Extension System: Allows other plugins to add custom abilities

🚀 Quick Start

Prerequisites

  • WordPress 5.0+ with REST API enabled
  • WooCommerce (optional, for e-commerce features)
  • Node.js (for MCP server integration)
  • Cursor IDE or Claude Desktop

Installation

Step 1: Install the Plugin

  1. Upload the plugin files to /wp-content/plugins/srz-mcp-server-wp/
  2. Activate the plugin through WordPress admin
  3. Configure permalinks (Settings > Permalinks) - choose any structure other than "Plain"

Step 2: Enable Development Mode

Add to your wp-config.php:

define('WP_ENVIRONMENT_TYPE', 'local');
define('WP_DEBUG', true);

Step 3: Install Node.js Dependencies

cd wp-content/plugins/srz-mcp-server-wp
npm install

Step 4: Set Up Application Password

  1. Go to Users > Profile in WordPress admin
  2. Scroll down to "Application Passwords" section
  3. Create a new application password (save it securely)
  4. Note your username (usually "admin")

🔧 Configuration

Cursor IDE Configuration

Create or update your ~/.cursor/mcp.json file:

{
  "mcpServers": {
    "srz-mcp-server": {
      "command": "npm",
      "args": ["start"],
      "cwd": "/path/to/your/wp-content/plugins/srz-mcp-server-wp"
    }
  }
}

Important: Replace /path/to/your/wp-content/plugins/srz-mcp-server-wp with your actual plugin path.

Claude Desktop Configuration

Edit your claude_desktop_config.json file:

{
  "mcpServers": {
    "srz-mcp-server": {
      "command": "npm",
      "args": ["start"],
      "cwd": "/path/to/your/wp-content/plugins/srz-mcp-server-wp"
    }
  }
}

VS Code Configuration

Create a .vscode/mcp.json file in your WordPress root directory:

{
  "servers": {
    "srz-mcp-server": {
      "command": "npm",
      "args": ["start"],
      "cwd": "/path/to/your/wp-content/plugins/srz-mcp-server-wp"
    }
  }
}

Testing the Connection

After configuration, restart your AI client and test with:

# Test the MCP server directly
curl -X POST http://wp.test/wp-json/srz-mcp-server/v1/mcp \
  -H "Content-Type: application/json" \
  -d '{"jsonrpc": "2.0", "method": "tools/list", "id": "test"}'

You should see a response with 194+ tools available.

Available Abilities

Site Information

  • Ability: srz-mcp-server/get-site-info
  • Description: Retrieves basic information about the WordPress site
  • Permissions: read
  • Output: Site title, description, URL, admin email, timezone, language

Post Management

  • List Posts: srz-mcp-server/list-posts

    • Parameters: post_type, posts_per_page, status
    • Permissions: read
  • Create Post: srz-mcp-server/create-post

    • Parameters: title (required), content (required), post_type, status, excerpt
    • Permissions: edit_posts
  • Get Post: srz-mcp-server/get-post

    • Parameters: post_id (required)
    • Permissions: read
  • Update Post: srz-mcp-server/update-post

    • Parameters: post_id (required), title, content, status, excerpt
    • Permissions: edit_posts

User Management

  • List Users: srz-mcp-server/list-users
    • Parameters: role, number
    • Permissions: list_users

System Information

  • Get Plugins: srz-mcp-server/get-plugins
    • Permissions: activate_plugins
    • Output: Plugin list with active status

WooCommerce Abilities

Product Management

  • List Products: woo/get-products

    • Parameters: status, per_page, search, category, stock_status, featured
    • Permissions: edit_products
  • Get Product: woo/product/get

    • Parameters: product_id (required)
    • Permissions: edit_products
  • Update Product: woo/product/update

    • Parameters: product_id (required), name, description, regular_price, sale_price, stock_quantity, stock_status
    • Permissions: edit_products

Bulk Operations

  • Bulk Update Products: woo/products/bulk-update

    • Parameters: product_ids (array), update_data (object)
    • Permissions: edit_products
    • Description: Updates multiple products with the same data
  • Bulk Update Categories: woo/products/bulk-categories

    • Parameters: product_ids (array), categories (array)
    • Permissions: edit_products
    • Description: Updates categories for multiple products
  • Bulk Update Pricing: woo/products/bulk-pricing

    • Parameters: product_ids (array), pricing_data (object)
    • Permissions: edit_products
    • Description: Updates pricing for multiple products

Advanced Management

  • Enhanced Bulk Update: wc_bulk_update_enhanced
    • Parameters: None (processes all products)
    • Permissions: edit_products
    • Description: Updates all products with 500+ word descriptions and proper categories
    • Features:
      • Generates comprehensive product descriptions
      • Intelligent category assignment based on product names
      • Updates short descriptions for better SEO
      • Maintains data integrity throughout the process

Order Management

  • List Orders: woo/get-orders
    • Parameters: status, per_page, customer_id, date_from, date_to
    • Permissions: edit_shop_orders

Categories & Tags

  • List Categories: woo/categories/list

    • Permissions: edit_products
    • Output: All product categories with hierarchy
  • List Tags: woo/tags/list

    • Permissions: edit_products
    • Output: All product tags

🎯 Usage Examples

With Cursor IDE

  1. Restart Cursor after configuration
  2. Use the chat panel to interact with your WordPress site:

Site Management:

  • "Show me my WordPress site information"
  • "What's the current site status?"
  • "List all active plugins"
  • "Check site performance metrics"

Content Management:

  • "Create a new blog post about WordPress"
  • "List all published posts"
  • "Update post with ID 123"
  • "Show me all media files"

WooCommerce Management:

  • "List all WooCommerce products"
  • "Show me product with ID 456"
  • "Update product pricing for all products"
  • "Add categories to product 789"
  • "Show me all orders from last month"

Advanced Operations:

  • "Run a security scan"
  • "Optimize the database"
  • "Clear all caches"
  • "Check for plugin updates"

With Claude Desktop

  1. Restart Claude Desktop after configuration
  2. Use the "Search and tools" feature
  3. Ask questions like:
    • "What users are registered on this site?"
    • "Create a draft post about AI integration"
    • "Show me all products in the Electronics category"
    • "Update all products with better descriptions"
    • "Run a performance audit"

Product Management Examples

Get Product Information:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "woo/product/get",
    "arguments": {
      "product_id": 123
    }
  }
}

Update Product:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "woo/product/update",
    "arguments": {
      "product_id": 123,
      "name": "Updated Product Name",
      "description": "New product description",
      "regular_price": "29.99"
    }
  }
}

Add Categories to Product:

{
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "name": "woo/product/categories/add",
    "arguments": {
      "product_id": 123,
      "categories": ["Electronics", "Gadgets"]
    }
  }
}

Testing with Postman

You can test the MCP server directly using Postman:

  1. List Tools:

    {
        "jsonrpc": "2.0",
        "method": "tools/list",
        "params": {}
    }
    
  2. Call a Tool:

    {
        "jsonrpc": "2.0",
        "method": "tools/call",
        "params": {
            "name": "srz-mcp-server-get-site-info",
            "arguments": {}
        }
    }
    
  3. Bulk Update Products:

    {
        "jsonrpc": "2.0",
        "method": "tools/call",
        "params": {
            "name": "wc_bulk_update_enhanced",
            "arguments": {}
        }
    }
    

Security

  • All abilities respect WordPress user capabilities and permissions
  • Authentication is required for all MCP requests
  • Users can only perform actions they're authorized to do
  • Application passwords provide secure API access
  • Input validation and sanitization on all parameters
  • Rate limiting to prevent abuse

🔧 Troubleshooting

Common Issues

  1. "MCP server not connecting"

    • Restart your AI client (Cursor/Claude Desktop)
    • Check that the plugin path in mcp.json is correct
    • Ensure Node.js dependencies are installed (npm install)
    • Verify the MCP server is running: npm start
  2. "No tools showing"

    • Check that the plugin is activated in WordPress
    • Verify permalinks are not set to "Plain"
    • Test the REST API endpoint directly with curl
    • Check WordPress debug logs for errors
  3. "Permission denied errors"

    • Ensure WP_ENVIRONMENT_TYPE is set to 'local' in wp-config.php
    • Check that Application Passwords are enabled
    • Verify the user has appropriate capabilities
  4. "REST API endpoint does not exist"

    • Ensure permalinks are not set to "Plain"
    • Check that the plugin is activated
    • Verify the endpoint: http://wp.test/wp-json/srz-mcp-server/v1/mcp

Debugging Steps

  1. Test the MCP server directly:

    curl -X POST http://wp.test/wp-json/srz-mcp-server/v1/mcp \
      -H "Content-Type: application/json" \
      -d '{"jsonrpc": "2.0", "method": "tools/list", "id": "test"}'
    
  2. Check WordPress debug logs:

    • Enable WP_DEBUG in wp-config.php
    • Check /wp-content/debug.log for errors
  3. Verify plugin activation:

    • Go to Plugins > Installed Plugins
    • Ensure "SRZ MCP Server WP" is active
  4. Test Node.js MCP server:

    cd wp-content/plugins/srz-mcp-server-wp
    npm start
    

Getting Help

If you're still having issues:

  1. Check the WordPress debug logs
  2. Test the REST API endpoint directly
  3. Verify your MCP configuration
  4. Ensure all dependencies are installed
  5. Restart your AI client after configuration changes

🔧 Creating Extensions

The plugin provides a comprehensive extension system that allows other plugins to add their own MCP abilities. See the examples/example-extension.php file for a complete example.

Quick Start

class My_Plugin_MCP_Extension {
    
    public function __construct() {
        add_filter('srz_mcp_server_extensions', array($this, 'register_extension'));
        add_action('abilities_api_init', array($this, 'register_abilities'));
    }
    
    public function register_extension($extensions) {
        $extensions['my-plugin'] = array(
            'name' => 'My Plugin Extension',
            'description' => 'Adds MCP abilities for My Plugin',
            'version' => '1.0.0',
            'load_abilities' => array($this, 'load_abilities')
        );
        return $extensions;
    }
    
    public function register_abilities() {
        wp_register_ability(
            'srz-mcp-server/my-plugin/my-ability',
            array(
                'label' => 'My Ability',
                'description' => 'Does something useful',
                'category' => 'my-plugin',
                'permissions' => array('read'),
                'inputs' => array(
                    'param1' => array(
                        'type' => 'string',
                        'description' => 'Parameter description',
                        'required' => true
                    )
                ),
                'outputs' => array(
                    'result' => array(
                        'type' => 'string',
                        'description' => 'Result description'
                    )
                )
            ),
            array($this, 'my_ability_callback')
        );
    }
    
    public function my_ability_callback($args) {
        return array('result' => 'success');
    }
}

new My_Plugin_MCP_Extension();

Available Hooks

The plugin provides extensive hooks for customization:

  • Extension Hooks: Register and manage extensions
  • Ability Hooks: Modify ability data, permissions, and execution
  • Admin Hooks: Add admin menu items and pages
  • REST API Hooks: Modify requests and responses

For complete documentation, see DEVELOPER.md.

Development

Adding Custom Abilities

To add your own abilities, use the wp_register_ability() function:

wp_register_ability(
    'srz-mcp-server/custom-ability',
    array(
        'label' => 'Custom Ability',
        'description' => 'Description of what this ability does',
        'category' => 'custom',
        'permissions' => array('read'),
        'inputs' => array(
            'param1' => array(
                'type' => 'string',
                'description' => 'Parameter description',
                'required' => true
            )
        ),
        'outputs' => array(
            'result' => array(
                'type' => 'string',
                'description' => 'Output description'
            )
        )
    ),
    'your_callback_function'
);

WooCommerce Extension Example

class WooCommerce_MCP_Extension {
    
    public function __construct() {
        add_action('abilities_api_init', array($this, 'register_woocommerce_abilities'));
    }
    
    public function register_woocommerce_abilities() {
        // Register WooCommerce-specific abilities
        wp_register_ability(
            'srz-mcp-server/woocommerce/bulk-update-products',
            array(
                'label' => 'Bulk Update Products',
                'description' => 'Updates multiple products with enhanced descriptions',
                'category' => 'woocommerce',
                'permissions' => array('edit_products'),
                'inputs' => array(
                    'min_words' => array(
                        'type' => 'integer',
                        'description' => 'Minimum words for descriptions',
                        'default' => 500
                    )
                ),
                'outputs' => array(
                    'updated_count' => array(
                        'type' => 'integer',
                        'description' => 'Number of products updated'
                    )
                )
            ),
            array($this, 'bulk_update_products')
        );
    }
    
    public function bulk_update_products($args) {
        // Implementation for bulk updating products
        return array('updated_count' => 0);
    }
}

new WooCommerce_MCP_Extension();

Performance Considerations

Bulk Operations

  • Bulk updates are optimized for performance
  • Large operations are processed in batches
  • Memory usage is monitored during bulk operations
  • Progress tracking for long-running operations

Caching

  • Built-in caching for frequently accessed data
  • Configurable cache expiration times
  • Cache invalidation on data updates

Rate Limiting

  • Configurable API rate limits
  • Per-user rate limiting
  • Graceful handling of rate limit exceeded

License

This plugin is licensed under the GPL v2 or later.

Support

For support and questions:

📋 Changelog

Version 3.0.0 - Current Release

  • NEW: 194+ tools for comprehensive WordPress management
  • NEW: Complete WooCommerce integration with product editing capabilities
  • NEW: Advanced security management and vulnerability scanning
  • NEW: Performance monitoring and caching optimization
  • NEW: Database management and file system tools
  • NEW: Email and notification system management
  • NEW: Plugin and theme advanced management tools
  • NEW: Site management and maintenance capabilities
  • NEW: Custom MCP server implementation for better AI client integration
  • IMPROVED: Enhanced error handling and debugging capabilities
  • IMPROVED: Better authentication and permission management
  • IMPROVED: Optimized performance for bulk operations

Version 2.0.0

  • Enhanced bulk update functionality for WooCommerce products
  • AI-powered product description generation (500+ words)
  • Intelligent product categorization system
  • Advanced WooCommerce management abilities
  • Comprehensive bulk operations for products, categories, and pricing
  • Better error handling and logging
  • Enhanced security and permission checks
  • Performance optimizations for bulk operations

Version 1.0.0

  • Initial release
  • Basic site information abilities
  • Post management capabilities
  • User listing functionality
  • Plugin information retrieval
  • Full MCP protocol compliance

Contributing

We welcome contributions! Please see our Contributing Guidelines for details on how to contribute to this project.

Roadmap

Upcoming Features

  • Advanced Analytics: Detailed WooCommerce analytics and reporting
  • Automated Marketing: AI-powered marketing content generation
  • Inventory Automation: Automated stock management and alerts
  • Customer Insights: Advanced customer behavior analysis
  • Multi-site Support: Management across multiple WordPress sites

Planned Improvements

  • Enhanced caching system
  • Better error reporting
  • More granular permissions
  • Additional WooCommerce integrations
  • Performance monitoring dashboard# srz-mcp-server-wp

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选