npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@mcp-forge/wordpress-mcp

v2.1.1

Published

WordPress MCP Server for managing WordPress sites via Model Context Protocol - 19 powerful tools, no plugin required

Readme

@xenflashbox/wordpress-mcp

WordPress MCP Server - Comprehensive WordPress integration for Model Context Protocol

Overview

A powerful MCP server providing 18 production-ready tools for WordPress management, including support for WooCommerce. Built with pure REST API - no plugin installation required!

Key Features

  • 🚀 18 Powerful Tools - Complete WordPress management capabilities
  • 📦 No Plugin Required - Uses standard WordPress REST API
  • 🛍️ WooCommerce Support - Built-in product management
  • 🔒 Secure Authentication - Username/password or API key support
  • ESM Native - Modern JavaScript module system
  • 🎯 Production Ready - Tested with real WordPress sites

Available Tools

Posts Management (5 tools)

  • wp_posts_list - List posts with filtering and pagination
  • wp_posts_get - Get specific post by ID
  • wp_posts_create - Create new posts
  • wp_posts_update - Update existing posts
  • wp_posts_delete - Delete posts (trash or permanent)

Pages Management (3 tools)

  • wp_pages_list - List pages with filtering and pagination
  • wp_pages_get - Get specific page by ID
  • wp_pages_create - Create new pages

Users Management (3 tools)

  • wp_users_list - List users with filtering
  • wp_users_get - Get specific user by ID
  • wp_users_me - Get current authenticated user

Media Management (2 tools)

  • wp_media_list - List media items (images, videos, etc.)
  • wp_media_get - Get specific media item by ID

Taxonomy Management (2 tools)

  • wp_categories_list - List categories
  • wp_tags_list - List tags

WooCommerce Integration (2 tools)

  • wc_products_list - List products (requires WooCommerce)
  • wc_products_get - Get specific product by ID

Settings (1 tool)

  • wp_settings_get - Get WordPress site settings

Installation

Method 1: NPX (Recommended for Claude Code)

Add to your .mcp.json:

{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": [
        "-y",
        "--registry=https://mcpreg.xencolabs.com",
        "@xenflashbox/[email protected]"
      ],
      "env": {
        "WORDPRESS_BASE_URL": "https://your-site.com",
        "WORDPRESS_USERNAME": "your-username",
        "WORDPRESS_PASSWORD": "your-password"
      }
    }
  }
}

Method 2: Direct Installation

npm install --registry=https://mcpreg.xencolabs.com @xenflashbox/wordpress-mcp

Then run:

WORDPRESS_BASE_URL="https://your-site.com" \
WORDPRESS_USERNAME="your-username" \
WORDPRESS_PASSWORD="your-password" \
npx @xenflashbox/wordpress-mcp

Configuration

Environment Variables

| Variable | Required | Description | |----------|----------|-------------| | WORDPRESS_BASE_URL | Yes | Your WordPress site URL (e.g., https://blog.example.com) | | WORDPRESS_USERNAME | Yes* | WordPress admin username | | WORDPRESS_PASSWORD | Yes* | WordPress application password | | WORDPRESS_API_KEY | Yes* | Alternative to username/password |

*Either username+password OR api_key is required

WordPress Requirements

  1. WordPress REST API (included in WordPress 4.7+)
  2. Application Passwords enabled (WordPress 5.6+)
  3. Admin account or account with appropriate permissions
  4. WooCommerce plugin (optional, for WooCommerce tools)

Creating Application Passwords

  1. Go to Users → Profile in WordPress admin
  2. Scroll to Application Passwords
  3. Enter a name (e.g., "MCP Server")
  4. Click Add New Application Password
  5. Copy the generated password (use this as WORDPRESS_PASSWORD)

Usage Examples

List Recent Posts

// Tool: wp_posts_list
{
  "per_page": 10,
  "orderby": "date",
  "order": "desc"
}

Create a New Post

// Tool: wp_posts_create
{
  "title": "My New Post",
  "content": "<p>Post content here</p>",
  "status": "publish",
  "categories": [1, 5],
  "tags": [10, 20]
}

Get WooCommerce Products

// Tool: wc_products_list
{
  "per_page": 20,
  "status": "publish",
  "on_sale": true
}

Get Site Settings

// Tool: wp_settings_get
{}

Architecture

ESM Native Design

This server uses native ES modules for maximum compatibility with modern JavaScript tooling:

  • ✅ Pure ESM in src/index.js
  • ✅ Dynamic import for CommonJS WordPress client
  • ✅ Latest MCP SDK (v1.20.0)
  • ✅ No build step required

File Structure

@xenflashbox/wordpress-mcp/
├── src/
│   └── index.js              # Main ESM server (18 tools)
├── dist/
│   └── generated-server/     # WordPress REST API client (CommonJS)
│       ├── package.json      # Marks as CommonJS
│       └── src/
│           ├── client.js
│           ├── resources/
│           └── ...
├── package.json              # ESM configuration
└── README.md

Development

Local Testing

  1. Clone the repository

  2. Install dependencies:

    npm install --registry=https://registry.npmjs.org @modelcontextprotocol/sdk@latest
  3. Set environment variables:

    export WORDPRESS_BASE_URL='https://your-site.com'
    export WORDPRESS_USERNAME='your-username'
    export WORDPRESS_PASSWORD='your-app-password'
  4. Run the server:

    node src/index.js
  5. Test MCP protocol:

    echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node src/index.js

Publishing

npm publish --registry=https://mcpreg.xencolabs.com

Troubleshooting

Connection Errors

Error: Cannot connect to WordPress site

Solutions:

  • Verify WORDPRESS_BASE_URL is correct
  • Ensure WordPress site is accessible
  • Check firewall/network settings

Authentication Errors

Error: Authentication failed

Solutions:

  • Verify username and application password
  • Ensure user has admin privileges
  • Check application password is enabled in WordPress

WooCommerce Tools Not Working

Error: WooCommerce endpoint not found

Solutions:

  • Install and activate WooCommerce plugin
  • Verify WooCommerce REST API is enabled
  • Check user has WooCommerce permissions

Version History

v2.0.0 (Current)

  • ✨ Complete ESM rewrite
  • 🚀 18 production-ready tools
  • 📦 No plugin required
  • ⚡ Latest MCP SDK (1.20.0)
  • 🛍️ WooCommerce integration
  • 🔒 Enhanced authentication

v1.0.2 (Deprecated)

  • Legacy CommonJS version
  • Basic WordPress functionality

License

MIT

Support

For issues or questions:

  • GitHub: https://github.com/xenflashbox/mcp-servers
  • Registry: https://mcpreg.xencolabs.com

Credits

Built by MCP Generator Platform for the WordPress community.