wp-mcp-server

SixFiveMil/wp-mcp-server

3.2

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

A Model Context Protocol (MCP) server for WordPress that enables Claude AI to create, update, and manage WordPress blog posts via the WordPress REST API.

Tools
5
Resources
0
Prompts
0

WordPress MCP Server 📝

License: MIT Docker MCP Release

A Model Context Protocol (MCP) server for WordPress that enables Claude AI to create, update, and manage WordPress blog posts via the WordPress REST API.

✨ Features

  • 📄 Create new posts (draft or published)
  • ✏️ Update existing posts
  • 📋 List posts with filtering
  • 🔍 Get post details
  • 🗑️ Delete posts
  • 🏷️ List categories and tags
  • 🖼️ Upload media files
  • 🎯 Full support for post metadata (categories, tags, featured images, excerpts)

🚀 Quick Start

Prerequisites

  • Docker installed
  • WordPress site with REST API enabled (default in WordPress 4.7+)
  • WordPress Application Password
  • Claude Desktop (optional, for integration)

1. Generate WordPress Application Password

  1. Log into your WordPress admin dashboard
  2. Navigate to Users → Profile
  3. Scroll to Application Passwords section
  4. Enter a name (e.g., "MCP Server")
  5. Click Add New Application Password
  6. Copy the generated password (you won't see it again!)

2. Clone and Build

# Clone the repository
git clone https://github.com/SixFiveMil/wp-mcp-server.git
cd wp-mcp-server

# Build the Docker image
docker build -t wordpress-mcp-server .

3. Configure Environment

Create a .env file (copy from .env.example):

cp .env.example .env

Edit .env with your credentials:

WORDPRESS_URL=https://your-site.com
WORDPRESS_USERNAME=your-username
WORDPRESS_APP_PASSWORD=xxxx-xxxx-xxxx-xxxx-xxxx-xxxx

4. Test the Server

docker run -i --rm \
  -e WORDPRESS_URL=https://your-site.com \
  -e WORDPRESS_USERNAME=your-username \
  -e WORDPRESS_APP_PASSWORD=your-app-password \
  wordpress-mcp-server

Or use docker-compose:

# Edit docker-compose.yml with your credentials first
docker-compose up

🔧 Claude Desktop Integration

Installation

  1. Locate your Claude Desktop config file:

    • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
    • Linux: ~/.config/Claude/claude_desktop_config.json
  2. Add the WordPress MCP server configuration:

{
  "mcpServers": {
    "wordpress": {
      "command": "docker",
      "args": [
        "run",
        "-i",
        "--rm",
        "-e", "WORDPRESS_URL=https://your-site.com",
        "-e", "WORDPRESS_USERNAME=your-username",
        "-e", "WORDPRESS_APP_PASSWORD=your-app-password",
        "wordpress-mcp-server"
      ]
    }
  }
}
  1. Restart Claude Desktop

📚 Usage Examples

Once configured, you can use Claude to interact with your WordPress site:

Create a Draft Post

Create a draft blog post titled "My First Post" with the content "Hello World!"

Publish a Post

Create a published post titled "Announcing Our New Product" with this content: [your content]

List Recent Posts

Show me the 5 most recent posts from my WordPress site

Update a Post

Update post ID 123 to change the status to published

Work with Categories

List all categories on my WordPress site

Upload an Image

Upload the image at /path/to/image.jpg to WordPress

🛠️ Available Tools

ToolDescription
create_postCreate new WordPress posts with full metadata support
update_postUpdate existing posts
get_postGet details of a specific post by ID
list_postsList posts with filtering options (status, search, pagination)
delete_postDelete or trash posts
list_categoriesList all available categories
list_tagsList all available tags
upload_mediaUpload media files to WordPress

📖 API Documentation

create_post

{
  "title": "Post Title",
  "content": "Post content in HTML or plain text",
  "status": "draft|publish|pending|private",
  "excerpt": "Optional excerpt",
  "categories": [1, 2, 3],
  "tags": [4, 5, 6],
  "featured_media": 123
}

update_post

{
  "post_id": 123,
  "title": "Updated Title",
  "content": "Updated content",
  "status": "publish"
}

list_posts

{
  "per_page": 10,
  "page": 1,
  "status": "any|publish|draft|pending|private",
  "search": "search term"
}

🔒 Security Notes

  • ⚠️ Never commit your Application Password to version control
  • ✅ Use environment variables or secrets management
  • 🔑 Application Passwords can be revoked anytime from WordPress profile
  • 🛡️ The REST API respects your WordPress user permissions
  • 🔐 Use HTTPS for your WordPress site in production

🐛 Troubleshooting

Authentication Errors

  • Verify your Application Password is correct (spaces are automatically removed)
  • Ensure your WordPress user has permission to create/edit posts
  • Check that REST API is enabled on your WordPress site

Connection Errors

  • Verify the WordPress URL is correct and accessible
  • Ensure your WordPress site uses HTTPS
  • Check if there's a firewall blocking the connection
  • Confirm the WordPress REST API endpoint is accessible at /wp-json/wp/v2/

Docker Issues

  • Ensure Docker is running: docker ps
  • Verify the image built successfully: docker images | grep wordpress-mcp
  • Check Docker logs: docker logs wordpress-mcp-server
  • Try rebuilding: docker build --no-cache -t wordpress-mcp-server .

🤝 Contributing

Contributions are welcome! Here are some ways you can help:

  • 🐛 Report bugs
  • 💡 Suggest new features
  • 📝 Improve documentation
  • 🔧 Submit pull requests

See for more details.

Development Setup

# Clone the repo
git clone https://github.com/SixFiveMil/wp-mcp-server.git
cd wp-mcp-server

# Create a virtual environment
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate

# Install dependencies
pip install -r requirements.txt

# Run tests (if available)
pytest

🗺️ Roadmap

Future features under consideration:

  • Support for custom post types
  • Custom fields management
  • Comments management
  • User management
  • Bulk operations
  • Media gallery management
  • SEO metadata support (Yoast, RankMath)
  • Multisite support

📄 License

This project is licensed under the MIT License - see the file for details.

🙏 Acknowledgments

📞 Support


Made with ❤️ for the WordPress and AI community