mcp-wordpress

mcp-wordpress

3.2

If you are the rightful owner of mcp-wordpress and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.

The MCP WordPress Server is a comprehensive Model Context Protocol server designed for efficient WordPress management through the WordPress REST API v2.

MCP WordPress Server

A comprehensive Model Context Protocol (MCP) server for WordPress management through the WordPress REST API v2. Completely written in TypeScript with modular architecture and 95%+ test coverage.

๐Ÿš€ Features

  • 59 WordPress Management Tools across 10 categories
  • โšก Intelligent Caching System - Multi-layer response caching with 50-70% performance improvement
  • ๐Ÿ“Š Real-Time Performance Monitoring - Comprehensive metrics, analytics, and optimization insights
  • ๐Ÿ“š Auto-Generated API Documentation - Complete tool documentation with OpenAPI specification
  • ๐Ÿณ Docker Support - Containerized deployment for production environments
  • ๐Ÿ— Modular Architecture - Manager-based composition pattern (94% code reduction)
  • Multi-Site Support - Manage multiple WordPress sites from one configuration
  • 100% TypeScript - Complete type safety and IntelliSense
  • ๐ŸŽฏ 95%+ Test Coverage - All critical functionality verified and tested
  • โšก Performance Optimized - Intelligent rate limiting and memory management
  • ๐Ÿ”’ Flexible Authentication - Supports App Passwords, JWT, Basic Auth, API Key
  • ๐Ÿ“Š Comprehensive Monitoring - Structured logging and error tracking
  • ๐Ÿ›  Production Ready - Security-reviewed and battle-tested
  • ๐Ÿ”„ 100% Backward Compatible - Zero breaking changes during refactoring

โšก Quick Start

Choose your preferred setup method:

  • ๐Ÿš€ - Zero installation, always latest version
  • ๐Ÿ’ป - Local development and customization
  • ๐Ÿณ - Containerized deployment
  • ๐Ÿ“ฆ - Claude Desktop Extension package

Ultra-Quick NPX Start

# Run directly with NPX (recommended)
npx -y mcp-wordpress

# Or install globally
npm install -g mcp-wordpress
mcp-wordpress

Setup Wizard

# For any installation method
npm run setup

๐Ÿ† Latest Achievement: v1.2.1 - Test Infrastructure & Multi-Site Enhancement

Building on v1.2.0's performance monitoring and documentation features, v1.2.1 delivers 100% test reliability, enhanced multi-site support, and production-ready repository organization:

โœ… Test Infrastructure Overhaul (v1.2.1)

  • ๐Ÿ”ง 100% Test Success Rate: Fixed all failing integration and tool tests
  • ๐ŸŒ Multi-Site Testing: Comprehensive test suite for multi-site WordPress configurations
  • ๐Ÿ›ก๏ธ Enhanced Security: Improved .gitignore and credential protection
  • ๐Ÿ“‹ Test Organization: Streamlined test scripts and better error reporting
  • โšก Quick Validation: New npm run test:multisite command for rapid configuration testing

๐ŸŒ Multi-Site Configuration Enhancements (v1.2.1)

  • ๐Ÿ“ Complete Documentation: Comprehensive Claude Desktop setup guide for multi-site usage
  • ๐Ÿ”ง Fixed Configuration: Resolved JWT authentication validation issues
  • โœ… Site Validation: Enhanced uniqueness checks for site URLs and IDs
  • ๐Ÿš€ Quick Testing: Instant validation of all configured WordPress sites
  • ๐Ÿ“Š Status Reporting: Clear success/failure reporting for each site configuration

๐Ÿ† Previous Achievement: v1.2.0 - Performance & Documentation Revolution

We've implemented a comprehensive performance monitoring system, intelligent caching, auto-generated documentation, and Docker containerization - all while maintaining complete backward compatibility:

โšก Performance Monitoring System

  • ๐Ÿ“Š Real-Time Metrics: Response times, cache hit rates, error tracking, system resources
  • ๐Ÿ“ˆ Historical Analytics: Trend analysis, anomaly detection, predictive insights
  • ๐ŸŽฏ Industry Benchmarks: Compare against performance standards with optimization recommendations
  • ๐Ÿšจ Smart Alerts: Automated performance alerts and threshold monitoring
  • ๐Ÿ“‹ Comprehensive Reports: Export detailed performance data in multiple formats
  • โš™๏ธ Optimization Engine: AI-powered recommendations for performance improvements

๐Ÿ—๏ธ Intelligent Caching System

  • ๐Ÿš€ 50-70% Performance Improvement: Reduced API calls for taxonomy and authentication operations
  • ๐Ÿ“Š Multi-Layer Architecture: HTTP response caching + in-memory application cache + intelligent invalidation
  • ๐ŸŽฏ Site-Specific Isolation: Complete cache separation for multi-site WordPress installations
  • ๐Ÿ”ง Cache Management Tools: 4 new MCP tools for monitoring and managing cache performance
  • โฑ๏ธ Sub-Millisecond Operations: Cache hits deliver responses in under 1ms

๐Ÿ“š Auto-Generated Documentation

  • ๐Ÿ“– Complete API Documentation: All 59 tools with examples, parameters, and usage guides
  • ๐Ÿ”ง OpenAPI Specification: Machine-readable API spec for integration
  • ๐Ÿ”„ Automated CI/CD Pipeline: Documentation updates automatically on code changes
  • โœ… Quality Validation: Comprehensive documentation quality checks
  • ๐ŸŒ Multi-Format Output: Markdown, JSON, and OpenAPI formats

๐Ÿณ Docker Containerization

  • ๐Ÿ“ฆ Production-Ready Images: Optimized Docker containers for deployment
  • ๐Ÿ”ง Development Environment: Docker Compose for local development
  • โš™๏ธ Environment Configuration: Flexible configuration via environment variables
  • ๐Ÿš€ Easy Deployment: One-command deployment to any Docker environment

๐Ÿ“š Complete Documentation:

๐Ÿ” Authentication & Testing Status (v1.2.4+)

โœ… Application Passwords - Tested and working perfectly โœ… JWT Authentication - Supported with plugin
โœ… Basic Authentication - Development ready โœ… API Key Authentication - Plugin-based support โœ… Main Test Suite - 100% success rate (144/144 tests passing) โœ… Security Tests - 100% success rate (40/40 tests passing) โœ… Performance Tests - 100% success rate (8/8 tests passing) โœ… Tool Tests - 100% success rate (14/14 tools working) โœ… CI/CD Pipeline - Fully functional with automated publishing

The setup wizard guides you through:

  • WordPress site configuration
  • Authentication method selection
  • Connection testing
  • Claude Desktop configuration

๐Ÿš€ Claude Desktop Integration

๐Ÿ“– Complete Setup Guides

For detailed setup instructions, see our comprehensive guides:

  • - Zero installation method
  • - Local development
  • - Containerized deployment
  • - Desktop Extension package

๐Ÿค– Claude Desktop Quick Prompts

For NPX Users (Easiest):

Set up MCP WordPress using NPX. My site: [YOUR_SITE_URL], username: [YOUR_USERNAME]. Help with application password creation and Claude Desktop configuration.

For Local Development:

Set up MCP WordPress locally from GitHub. Clone, install, configure for my site: [YOUR_SITE_URL], username: [YOUR_USERNAME]. Include Claude Desktop setup.

Replace placeholders with your actual WordPress details - Claude will handle the rest!

๐Ÿ”ง Configuration

The MCP WordPress server supports multiple configuration methods to fit different needs.

Setup Methods Overview

MethodBest ForConfiguration File
NPXQuick start, always latestClaude Desktop config only
NPMLocal development.env or Claude Desktop config
DockerProduction deploymentEnvironment variables or mounted config
DTXSimple GUI setupDTX config + optional multi-site file

Environment Variables

Core Configuration:

WORDPRESS_SITE_URL=https://your-wordpress-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=xxxx xxxx xxxx xxxx xxxx xxxx
WORDPRESS_AUTH_METHOD=app-password
DEBUG=false

๐Ÿ“– Detailed Configuration Guides:

  • - Claude Desktop environment variables
  • - Local .env file setup
  • - Container environment setup
  • - Extension package setup

Claude Desktop Integration

Configuration File Locations:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Quick NPX Example:

{
  "mcpServers": {
    "mcp-wordpress": {
      "command": "npx",
      "args": ["-y", "mcp-wordpress"],
      "env": {
        "WORDPRESS_SITE_URL": "https://your-site.com",
        "WORDPRESS_USERNAME": "your-username",
        "WORDPRESS_APP_PASSWORD": "your-app-password"
      }
    }
  }
}

๐Ÿ”— See the detailed setup guides above for complete configuration examples for each method.

๐ŸŒ Multi-Site Configuration

MCP WordPress Server supports managing multiple WordPress sites from a single configuration. This is perfect for agencies, developers managing multiple client sites, or anyone with multiple WordPress installations.

Setting Up Multi-Site Configuration

  1. Create a mcp-wordpress.config.json file in your project root:
{
  "sites": [
    {
      "id": "site1",
      "name": "My Main Site",
      "config": {
        "WORDPRESS_SITE_URL": "https://site1.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    },
    {
      "id": "site2",
      "name": "My Blog",
      "config": {
        "WORDPRESS_SITE_URL": "https://blog.site2.com",
        "WORDPRESS_USERNAME": "editor",
        "WORDPRESS_APP_PASSWORD": "yyyy yyyy yyyy yyyy yyyy yyyy",
        "WORDPRESS_AUTH_METHOD": "app-password"
      }
    },
    {
      "id": "dev",
      "name": "Development Site",
      "config": {
        "WORDPRESS_SITE_URL": "http://localhost:8080",
        "WORDPRESS_USERNAME": "dev_user",
        "WORDPRESS_APP_PASSWORD": "zzzz zzzz zzzz zzzz zzzz zzzz"
      }
    }
  ]
}
  1. Configure Claude Desktop for Multi-Site:
{
  "mcpServers": {
    "mcp-wordpress": {
      "command": "npx",
      "args": ["mcp-wordpress"]
    }
  }
}

Note: When using multi-site configuration, you don't need to specify environment variables in Claude Desktop. The server will read from your mcp-wordpress.config.json file.

Using Multi-Site Tools

When you have multiple sites configured, all tools require a site parameter:

# List posts from site1
wp_list_posts --site="site1"

# Create a post on the blog site
wp_create_post --site="site2" --title="New Blog Post" --content="Content here"

# Get user info from development site
wp_get_current_user --site="dev"

Important Multi-Site Notes

  • Site IDs must be unique - Each site needs a unique identifier
  • Security: The mcp-wordpress.config.json file contains sensitive credentials and should NEVER be committed to version control
  • Default Site: If only one site is configured, it will be used by default without needing the --site parameter
  • Authentication: Each site can use different authentication methods (app-password, jwt, basic, api-key)

Example: Managing Multiple Client Sites

{
  "sites": [
    {
      "id": "client-acme",
      "name": "ACME Corporation",
      "config": {
        "WORDPRESS_SITE_URL": "https://acme-corp.com",
        "WORDPRESS_USERNAME": "mcp_admin",
        "WORDPRESS_APP_PASSWORD": "aaaa bbbb cccc dddd eeee ffff"
      }
    },
    {
      "id": "client-tech",
      "name": "TechStartup Blog",
      "config": {
        "WORDPRESS_SITE_URL": "https://blog.techstartup.io",
        "WORDPRESS_USERNAME": "content_manager",
        "WORDPRESS_APP_PASSWORD": "gggg hhhh iiii jjjj kkkk llll"
      }
    },
    {
      "id": "client-shop",
      "name": "Online Shop",
      "config": {
        "WORDPRESS_SITE_URL": "https://shop.example.com",
        "WORDPRESS_USERNAME": "shop_admin",
        "WORDPRESS_APP_PASSWORD": "mmmm nnnn oooo pppp qqqq rrrr",
        "WORDPRESS_AUTH_METHOD": "jwt",
        "WORDPRESS_JWT_SECRET": "your-jwt-secret-here"
      }
    }
  ]
}

Then in Claude Desktop, you can manage all sites:

# Check posts across all client sites
wp_list_posts --site="client-acme" --per_page=5
wp_list_posts --site="client-tech" --per_page=5
wp_list_posts --site="client-shop" --per_page=5

# Update content on specific sites
wp_update_post --site="client-acme" --id=123 --title="Updated Title"

# Manage media across sites
wp_list_media --site="client-shop" --media_type="image"

๐Ÿ›  Build System

TypeScript Build

# Compile
npm run build

# Watch mode
npm run build:watch

# Type checking
npm run typecheck

Development

# Development mode with debug output
npm run dev

# Check status
npm run status

# Re-run setup
npm run setup

๐Ÿ” Authentication

WordPress Application Passwords (Recommended)

  1. WordPress Admin โ†’ Users โ†’ Profile
  2. Scroll to Application Passwords
  3. Enter name (e.g., "MCP WordPress Server")
  4. Click Add New Application Password
  5. Copy generated password (format: xxxx xxxx xxxx xxxx xxxx xxxx)

Alternative Authentication Methods

# JWT Authentication (requires JWT plugin)
WORDPRESS_AUTH_METHOD=jwt
WORDPRESS_JWT_SECRET=your-jwt-secret

# Basic Authentication (not recommended for production)
WORDPRESS_AUTH_METHOD=basic
WORDPRESS_PASSWORD=your-actual-password

# API Key Authentication (requires API Key plugin)
WORDPRESS_AUTH_METHOD=api-key
WORDPRESS_API_KEY=your-api-key

๐Ÿ“‹ Available Tools (59 Tools)

๐Ÿ“ Posts (6 Tools)

  • wp_list_posts - List and filter blog posts
  • wp_get_post - Get specific post
  • wp_create_post - Create new posts
  • wp_update_post - Edit posts
  • wp_delete_post - Delete posts
  • wp_get_post_revisions - Get post revisions

๐Ÿ“„ Pages (6 Tools)

  • wp_list_pages - List pages
  • wp_get_page - Get specific page
  • wp_create_page - Create new pages
  • wp_update_page - Edit pages
  • wp_delete_page - Delete pages
  • wp_get_page_revisions - Get page revisions

๐Ÿ–ผ๏ธ Media (6 Tools)

  • wp_list_media - Browse media library
  • wp_get_media - Get media details
  • wp_upload_media - Upload files
  • wp_update_media - Edit media metadata
  • wp_delete_media - Delete media
  • wp_get_media_sizes - Get available image sizes

๐Ÿ‘ฅ Users (6 Tools)

  • wp_list_users - List users
  • wp_get_user - Get user details
  • wp_create_user - Create new users
  • wp_update_user - Edit user profiles
  • wp_delete_user - Delete users
  • wp_get_current_user - Get current user

๐Ÿ’ฌ Comments (7 Tools)

  • wp_list_comments - List comments
  • wp_get_comment - Get comment details
  • wp_create_comment - Create new comments
  • wp_update_comment - Edit comments
  • wp_delete_comment - Delete comments
  • wp_approve_comment - Approve comments
  • wp_spam_comment - Mark comments as spam

๐Ÿท๏ธ Taxonomies (10 Tools)

  • wp_list_categories - List categories
  • wp_get_category - Get category details
  • wp_create_category - Create new categories
  • wp_update_category - Edit categories
  • wp_delete_category - Delete categories
  • wp_list_tags - List tags
  • wp_get_tag - Get tag details
  • wp_create_tag - Create new tags
  • wp_update_tag - Edit tags
  • wp_delete_tag - Delete tags

โš™๏ธ Site Management (7 Tools)

  • wp_get_site_settings - Get site settings
  • wp_update_site_settings - Update site settings
  • wp_get_site_stats - Get site statistics
  • wp_search_site - Site-wide search
  • wp_get_application_passwords - List app passwords
  • wp_create_application_password - Create new app passwords
  • wp_delete_application_password - Delete app passwords

๐Ÿ” Authentication (6 Tools)

  • wp_test_auth - Test authentication
  • wp_get_auth_status - Get authentication status
  • wp_start_oauth_flow - Start OAuth flow
  • wp_complete_oauth_flow - Complete OAuth flow
  • wp_refresh_oauth_token - Refresh OAuth token
  • wp_switch_auth_method - Switch authentication method

โšก Cache Management (4 Tools)

  • wp_cache_stats - Get real-time cache performance statistics
  • wp_cache_clear - Clear cache entries with optional pattern matching
  • wp_cache_warm - Pre-populate cache with essential data
  • wp_cache_info - Get detailed cache configuration and status

๐Ÿ“Š Performance Monitoring (6 Tools)

  • wp_performance_stats - Get real-time performance statistics and metrics
  • wp_performance_history - Get historical performance data and trends
  • wp_performance_benchmark - Compare current performance against industry benchmarks
  • wp_performance_alerts - Get performance alerts and anomaly detection results
  • wp_performance_optimize - Get optimization recommendations and insights
  • wp_performance_export - Export comprehensive performance report

๐Ÿงช Testing

Current Test Status โœ…

  • Main Test Suite: 144/144 passed (100%) - Optimized for CI/CD reliability
  • TypeScript Build Tests: 21/21 passed (100%)
  • Security Tests: 40/40 passed (100%) - Comprehensive vulnerability testing
  • Configuration Tests: 27/27 passed (100%) - Multi-site validation
  • Property-Based Tests: 12/12 passed (100%) - Generative testing
  • Performance Tests: 8/8 passed (100%) - Regression detection
  • Contract Tests: Available via dedicated command when needed
  • Overall Success Rate: 100% - All critical functionality verified

Test Commands

# Run all tests (improved)
npm test

# Run tests with Docker test environment (recommended)
npm run test:with-env

# Tests with coverage (70% threshold)
npm run test:coverage

# Quick tests
npm run test:fast

# Individual test suites
npm run test:security        # Security tests
npm run test:config          # Configuration tests
npm run test:property        # Property-based tests
npm run test:contracts       # Contract tests
npm run test:performance     # Performance regression tests

# Integration tests
npm run test:mcp             # MCP protocol tests
npm run test:tools           # Tool functionality tests
npm run test:auth            # Authentication tests

# Live contract tests with automated setup
npm run test:contracts:live

# Tests in watch mode
npm run test:watch

# Manual authentication check
./scripts/wp-auth-check.sh

Docker Test Environment

The project now includes a complete Docker test environment for reliable testing:

# Start test environment
./scripts/start-test-env.sh

# Run tests with test environment
npm run test:with-env

# Stop test environment
docker-compose -f docker-compose.test.yml down

The test environment includes:

  • WordPress with pre-configured test user and application password
  • MySQL database
  • Pact broker for contract testing
  • Automated WordPress configuration for API testing

๐Ÿ“Š Status & Monitoring

# Check connection status
npm run status

# Debug mode
DEBUG=true npm run dev

# Lint code
npm run lint

# Auto-fix linting errors
npm run lint:fix

๐Ÿ— Project Structure

mcp-wordpress/
โ”œโ”€โ”€ src/                     # TypeScript source code
โ”‚   โ”œโ”€โ”€ index.ts            # Main MCP server
โ”‚   โ”œโ”€โ”€ server.ts           # Server compatibility
โ”‚   โ”œโ”€โ”€ types/              # TypeScript definitions
โ”‚   โ”‚   โ”œโ”€โ”€ wordpress.ts    # WordPress API types
โ”‚   โ”‚   โ”œโ”€โ”€ mcp.ts         # MCP protocol types
โ”‚   โ”‚   โ”œโ”€โ”€ client.ts      # Client interface types
โ”‚   โ”‚   โ””โ”€โ”€ index.ts       # Type exports
โ”‚   โ”œโ”€โ”€ client/             # WordPress API client
โ”‚   โ”‚   โ”œโ”€โ”€ api.ts         # HTTP client
โ”‚   โ”‚   โ””โ”€โ”€ auth.ts        # Authentication
โ”‚   โ”œโ”€โ”€ tools/              # MCP tool implementations
โ”‚   โ”‚   โ”œโ”€โ”€ posts.ts       # Post management
โ”‚   โ”‚   โ”œโ”€โ”€ pages.ts       # Page management
โ”‚   โ”‚   โ”œโ”€โ”€ media.ts       # Media management
โ”‚   โ”‚   โ”œโ”€โ”€ users.ts       # User management
โ”‚   โ”‚   โ”œโ”€โ”€ comments.ts    # Comment management
โ”‚   โ”‚   โ”œโ”€โ”€ taxonomies.ts  # Categories/Tags
โ”‚   โ”‚   โ”œโ”€โ”€ site.ts        # Site settings
โ”‚   โ”‚   โ””โ”€โ”€ auth.ts        # Authentication
โ”‚   โ””โ”€โ”€ utils/              # Utility functions
โ”‚       โ””โ”€โ”€ debug.ts       # Debug logger
โ”œโ”€โ”€ dist/                   # Compiled JavaScript files
โ”œโ”€โ”€ bin/                    # Utility scripts
โ”‚   โ”œโ”€โ”€ setup.js          # Setup wizard
โ”‚   โ””โ”€โ”€ status.js          # Status checker
โ”œโ”€โ”€ tests/                  # Test suite
โ”œโ”€โ”€ scripts/                # Build and test scripts
โ”œโ”€โ”€ tsconfig.json          # TypeScript configuration
โ”œโ”€โ”€ jest.config.json       # Jest test configuration
โ””โ”€โ”€ package.json           # Node.js project configuration

๐Ÿ’ก TypeScript Features

  • Complete Type Safety - Compile-time validation
  • IntelliSense Support - Better IDE integration
  • Type-safe API Client - Typed HTTP methods
  • Comprehensive WordPress Types - 400+ lines of precise definitions
  • MCP Protocol Types - Tool definitions and handlers
  • Enhanced Error Handling - Typed exceptions
  • Source Maps - Debugging support

๐Ÿ”ง WordPress Requirements

  • WordPress 5.0+ with REST API enabled
  • HTTPS (recommended for production)
  • User with appropriate permissions
  • Application Passwords enabled (WordPress 5.6+)

WordPress User Roles

RoleAccess
AdministratorFull access to all functions
EditorPosts, pages, comments, media
AuthorOwn posts and media
ContributorOwn posts (drafts only)
SubscriberRead only

๐Ÿ› Troubleshooting

Common Issues

  1. "Cannot connect to WordPress"

    • Check WORDPRESS_SITE_URL
    • Ensure REST API is accessible
    • Test: curl https://your-site.com/wp-json/wp/v2/
  2. "Authentication failed"

    • Verify username and app password
    • Ensure Application Passwords are enabled
    • Try running npm run setup again
  3. "TypeScript compilation errors"

    • Run npm run typecheck
    • Ensure all dependencies are installed

Debug Logs

DEBUG=true npm run dev

๐Ÿ“š API Documentation

๐Ÿณ Docker Support

Docker support with production-ready containers and Claude Desktop integration.

Quick Docker Start

# Single-site with environment variables
docker run --rm -i \
  -e WORDPRESS_SITE_URL=https://your-site.com \
  -e WORDPRESS_USERNAME=your-username \
  -e WORDPRESS_APP_PASSWORD=your-app-password \
  docdyhr/mcp-wordpress:latest

# Multi-site with config file
docker run --rm -i \
  -v ./mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro \
  docdyhr/mcp-wordpress:latest

Claude Desktop Docker Integration

Single-Site:

{
  "mcpServers": {
    "mcp-wordpress": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "WORDPRESS_SITE_URL=https://your-site.com",
        "-e",
        "WORDPRESS_USERNAME=your-username",
        "-e",
        "WORDPRESS_APP_PASSWORD=your-app-password",
        "docdyhr/mcp-wordpress:latest"
      ]
    }
  }
}

Multi-Site:

{
  "mcpServers": {
    "mcp-wordpress": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-v",
        "/path/to/mcp-wordpress.config.json:/app/mcp-wordpress.config.json:ro",
        "docdyhr/mcp-wordpress:latest"
      ]
    }
  }
}

๐Ÿ“– Complete Docker Guide:

๐Ÿงช Contract Testing with Live WordPress

Test the MCP server against a real WordPress instance using our automated testing setup:

# Automated live contract testing (recommended)
npm run test:contracts:live

This command will:

  • ๐Ÿณ Start isolated WordPress + MySQL containers (port 8081)
  • โš™๏ธ Auto-configure WordPress with test data and authentication
  • ๐Ÿงช Run contract tests against the live WordPress API
  • ๐Ÿงน Clean up automatically when done

Features:

  • Zero Conflicts: Uses isolated containers with separate ports
  • Fully Automated: WordPress installation, user creation, and app password generation
  • Real API Testing: Validates actual WordPress REST API behavior
  • CI/CD Ready: Works in continuous integration environments

Manual Setup Alternative:

# Test setup phase only
bash scripts/test-setup-only.sh

# Use existing WordPress instance
export WORDPRESS_TEST_URL="https://your-wordpress-site.com"
export WORDPRESS_USERNAME="your-username"
export WORDPRESS_APP_PASSWORD="your-app-password"
export PACT_LIVE_TESTING="true"
npm run test:contracts

๐Ÿ“– Full Contract Testing Guide:

๐Ÿ“ Recent Updates

v1.2.0 - Performance & Documentation Revolution

  • โœ… Real-Time Performance Monitoring
    • Comprehensive metrics collection (response times, cache hit rates, system resources)
    • Historical performance analysis with trend detection
    • Industry benchmark comparisons with optimization recommendations
    • Smart alerts and anomaly detection
    • Comprehensive performance reports with export options
    • AI-powered optimization engine for performance improvements
  • โšก Intelligent Caching System
    • 50-70% performance improvement with reduced API calls
    • Multi-layer caching architecture with intelligent invalidation
    • Site-specific cache isolation for multi-site installations
    • New MCP tools for cache performance monitoring and management
    • Sub-millisecond response times for cache hits
  • ๐Ÿ“š Auto-Generated Documentation
    • Complete API documentation for all 59 tools with examples and usage guides
    • Machine-readable OpenAPI specification for integration
    • Automated CI/CD pipeline for documentation updates
    • Comprehensive documentation quality validation
    • Multi-format output including Markdown, JSON, and OpenAPI
  • ๐Ÿณ Docker Containerization
    • Production-ready Docker images for easy deployment
    • Docker Compose setup for local development
    • Flexible environment configuration via variables
    • One-command deployment to any Docker environment

๐Ÿ“š Read the full release notes for all details!

๐Ÿš€ Release & Publishing

This project uses automated semantic versioning and publishing to NPM and Docker Hub.

๐Ÿ“ฆ Installation Options

NPM Package:

# Latest stable version
npm install -g mcp-wordpress

# Specific version
npm install -g mcp-wordpress@1.2.2

# Use with npx (no installation)
npx mcp-wordpress

Docker Images:

# Latest stable version
docker pull docdyhr/mcp-wordpress:latest

# Specific version
docker pull docdyhr/mcp-wordpress:1.2.2

# Test container (interactive)
docker run --rm -i docdyhr/mcp-wordpress:latest

๐Ÿท๏ธ Release Process

Automated Releases:

  • Releases are automatically created when conventional commits are pushed to the main branch
  • Semantic versioning determines the version bump automatically
  • NPM and Docker Hub publishing happens automatically on release

Conventional Commit Format:

# Patch release (1.2.2 โ†’ 1.2.4)
fix: resolve authentication timeout issue

# Minor release (1.2.2 โ†’ 1.3.0)
feat: add new performance monitoring tools

# Major release (1.2.2 โ†’ 2.0.0)
feat!: redesign MCP tool interface
BREAKING CHANGE: tool parameter structure has changed

Manual Release (if needed):

# Test release locally
npm run release:dry

# Create release manually (requires proper permissions)
npm run release

๐Ÿ“‹ Release Checklist

For contributors planning releases:

  1. Pre-Release Validation:

    • โœ… All tests passing (npm test)
    • โœ… Documentation updated
    • โœ… Performance benchmarks within acceptable range
    • โœ… Security audit clean (npm audit)
  2. Commit with Conventional Format:

    git add .
    git commit -m "feat: add new functionality"
    git push origin main
    
  3. Automated Process Handles:

    • ๐Ÿ“ Generate release notes
    • ๐Ÿท๏ธ Create GitHub release
    • ๐Ÿ“ฆ Publish to NPM with provenance
    • ๐Ÿณ Build and push Docker images (multi-arch)
    • ๐Ÿ“š Update CHANGELOG.md
    • ๐Ÿ”— Update Docker Hub description

๐ŸŒ Distribution Channels


๐Ÿ™ Acknowledgments

Special thanks to Stephan Ferraro for the upstream main project that inspired this implementation.

"We are all standing on the shoulders of giants"