@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
Maintainers
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 paginationwp_posts_get- Get specific post by IDwp_posts_create- Create new postswp_posts_update- Update existing postswp_posts_delete- Delete posts (trash or permanent)
Pages Management (3 tools)
wp_pages_list- List pages with filtering and paginationwp_pages_get- Get specific page by IDwp_pages_create- Create new pages
Users Management (3 tools)
wp_users_list- List users with filteringwp_users_get- Get specific user by IDwp_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 categorieswp_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-mcpThen run:
WORDPRESS_BASE_URL="https://your-site.com" \
WORDPRESS_USERNAME="your-username" \
WORDPRESS_PASSWORD="your-password" \
npx @xenflashbox/wordpress-mcpConfiguration
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
- WordPress REST API (included in WordPress 4.7+)
- Application Passwords enabled (WordPress 5.6+)
- Admin account or account with appropriate permissions
- WooCommerce plugin (optional, for WooCommerce tools)
Creating Application Passwords
- Go to Users → Profile in WordPress admin
- Scroll to Application Passwords
- Enter a name (e.g., "MCP Server")
- Click Add New Application Password
- 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.mdDevelopment
Local Testing
Clone the repository
Install dependencies:
npm install --registry=https://registry.npmjs.org @modelcontextprotocol/sdk@latestSet environment variables:
export WORDPRESS_BASE_URL='https://your-site.com' export WORDPRESS_USERNAME='your-username' export WORDPRESS_PASSWORD='your-app-password'Run the server:
node src/index.jsTest MCP protocol:
echo '{"jsonrpc":"2.0","id":1,"method":"tools/list"}' | node src/index.js
Publishing
npm publish --registry=https://mcpreg.xencolabs.comTroubleshooting
Connection Errors
Error: Cannot connect to WordPress site
Solutions:
- Verify
WORDPRESS_BASE_URLis 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.
