WordPress MCP Server
A secure bridge between AI assistants and WordPress, enabling site management and content operations through natural language.
WordPress MCP Server
A Model Context Protocol (MCP) server that enables AI assistants like Claude to interact with WordPress sites through a standardized interface.
Description
WordPress MCP Server provides a secure bridge between AI assistants and WordPress installations, allowing for content management, site administration, and plugin/theme operations through natural language interactions. Built on the Model Context Protocol standard, it offers a comprehensive set of tools for WordPress automation.
Features
- Content Management: Create, read, update, and delete posts, pages, and custom post types
- Media Handling: Upload and manage media files with automatic optimization
- User Management: Handle user operations and permissions
- Plugin & Theme Control: Install, activate, deactivate, and manage plugins/themes
- Site Configuration: Manage WordPress settings and configurations
- Custom Post Types: Full support for custom post types and taxonomies
- SEO Integration: Built-in support for popular SEO plugins
- Security: OAuth2 authentication and secure API communications
- Batch Operations: Efficient bulk actions for content and media
- Real-time Updates: Live site status and health monitoring
Prerequisites
- Node.js 16.0 or higher
- npm or yarn package manager
- WordPress 5.0 or higher with REST API enabled
- Valid WordPress admin credentials or application passwords
- Claude Code or any MCP-compatible client
Installation
Quick Start with npx (Recommended)
npx wordpress-mcp-server init
Local Installation
# Clone the repository
git clone https://github.com/yourusername/wordpress-mcp-server.git
cd wordpress-mcp-server
# Install dependencies
npm install
# Build the project
npm run build
# Configure your WordPress connection
npm run configure
Global Installation
npm install -g wordpress-mcp-server
wordpress-mcp configure
Configuration
Initial Setup
- Create a configuration file:
npx wordpress-mcp-server configure
- Or manually create
wordpress-config.json
:
{
"sites": [
{
"name": "my-wordpress-site",
"url": "https://example.com",
"username": "admin",
"password": "your-application-password",
"authMethod": "basic"
}
],
"defaultSite": "my-wordpress-site"
}
Authentication Methods
Application Passwords (Recommended)
- Go to WordPress Admin → Users → Your Profile
- Scroll to "Application Passwords"
- Enter a name and click "Add New Application Password"
- Copy the generated password to your config
Basic Authentication
- Requires HTTP Basic Auth plugin
- Less secure, use only for development
OAuth2
- Most secure option
- Requires OAuth2 plugin setup
- See OAuth2 Setup Guide
Usage Examples
With Claude Code
- Add to Claude Code configuration:
{
"mcpServers": {
"wordpress": {
"command": "npx",
"args": ["wordpress-mcp-server", "start"]
}
}
}
- Use natural language commands:
"Create a new blog post about AI trends with featured image"
"Update the homepage content"
"Install and activate Yoast SEO plugin"
"Bulk upload images from folder"
Programmatic Usage
const { WordPressMCP } = require('wordpress-mcp-server');
const mcp = new WordPressMCP({
site: 'my-wordpress-site'
});
// Create a post
await mcp.tools.createPost({
title: 'Hello World',
content: 'This is my first post!',
status: 'publish'
});
Available MCP Tools
Content Tools
wp_create_post
- Create posts, pages, or custom post typeswp_update_post
- Update existing contentwp_get_post
- Retrieve post detailswp_delete_post
- Delete contentwp_list_posts
- List and filter content
Media Tools
wp_upload_media
- Upload images, videos, documentswp_get_media
- Retrieve media informationwp_delete_media
- Remove media fileswp_optimize_images
- Bulk image optimization
Site Management
wp_get_site_info
- Site details and healthwp_update_settings
- Modify site settingswp_clear_cache
- Clear various cacheswp_backup_site
- Create site backups
Plugin & Theme Tools
wp_install_plugin
- Install from repositorywp_activate_plugin
- Activate installed pluginswp_update_plugin
- Update to latest versionwp_list_themes
- Available themes
User Management
wp_create_user
- Add new userswp_update_user
- Modify user detailswp_list_users
- Get user listingswp_manage_roles
- Role and capability management
Troubleshooting
Common Issues
Connection Failed
- Verify WordPress URL is correct
- Check REST API is enabled:
https://yoursite.com/wp-json/
- Ensure credentials are valid
Authentication Errors
- Application passwords require WordPress 5.6+
- Username should be your login name, not email
- Some hosts block REST API authentication
Permission Denied
- User needs appropriate WordPress capabilities
- Check plugin/theme installation permissions
- Verify file upload limits
Debug Mode
Enable verbose logging:
export WP_MCP_DEBUG=true
npx wordpress-mcp-server start
Getting Help
- Check Claude Code Setup Guide
- Visit Issues
- Join our Discord Community
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Security
For security concerns, please review our Security Policy and report issues responsibly.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Built on the Model Context Protocol standard
- WordPress REST API documentation and community
- Claude and Anthropic for MCP development
Made with ❤️ for the WordPress and AI communities
Related Servers
YouTrack
Access the YouTrack REST API to manage projects and track issues in real-time.
Scrapbox MCP
A simple notes system server for the Model Context Protocol, providing resources, tools, and prompts.
Todoist
Manage tasks, projects, labels, and comments on Todoist using its API.
Spotify
Control your Spotify music playback through conversations using the Spotify API.
Xero
Interact with the Xero Accounting Software API.
Rememberizer MCP Server for Common Knowledge
Access personal or team knowledge from internal repositories like documents and Slack discussions.
Bear MCP Server
Allows AI assistants to read notes from the Bear note-taking app by connecting directly to its SQLite database.
MS-365 MCP Server
A containerized MCP server for Microsoft 365, featuring OAuth authentication and OpenTelemetry instrumentation for monitoring.
Linear Issues
Provides read-only access to issues within the Linear project management tool.
MCP Content Summarizer Server
An MCP server that uses Google's Gemini 1.5 Pro to generate concise summaries of various content types.