Comprehensive WordPress MCP Server
About
This is the most comprehensive wordpress mcp server. Includes functionality to perform CRUD operations on Users, Blogs, Categories and much more. Get specialised stats as well.
Details
- Author
- prathammanocha
- GitHub stars
- 48
- Downloads
- 316
- Categories
- Other, Automation
Jump to
- Create, retrieve, update, and delete WordPress posts.
- Manage users: get by ID or login, update, delete.
- Handle comments: create, retrieve, update, delete.
- Manage taxonomies: categories and tags with CRUD.
- Retrieve general WordPress site information.
- Support custom REST API endpoints and methods.
Prerequisites: Node.js v18+, a WordPress site with REST API enabled, and an application password. Clone the repo, run npm install and npm run build. Configure the MCP settings file (e.g., cline_mcp_settings.json) with the command node and the path to the built index.js. Tools are invoked by providing siteUrl, username, password, and relevant parameters.
wp_test_auth
Tests the authentication and connectivity for a configured WordPress site with detailed connection diagnostics. **Usage Examples:** • Test connection: `wp_test_auth` • Multi-site test: `wp_test_auth --site="my-site"` • Verify setup: Use this after configuring new credentials • Troubleshoot: Run when experiencing connection issues • Health check: Regular verification of WordPress connectivity
wp_get_auth_status
Gets the current authentication status for a configured WordPress site.
wp_switch_auth_method
Switches the authentication method for a site for the current session and verifies the new credentials with a live request. The switch is in-memory only — it does not persist across server restarts; update your configuration file for that.
wp_cache_stats
Get cache statistics for a WordPress site.
wp_cache_clear
Clear cache for a WordPress site.
wp_cache_warm
Pre-warm cache with essential WordPress data.
wp_cache_info
Get detailed cache configuration and status information.
wp_list_comments
Lists comments from a WordPress site, with filters.
wp_get_comment
Retrieves a single comment by its ID.
wp_create_comment
Creates a new comment on a post.
wp_update_comment
Updates an existing comment.
wp_delete_comment
Deletes a comment.
wp_approve_comment
Approves a pending comment.
wp_spam_comment
Marks a comment as spam.
wp_list_media
Lists media items from a WordPress site, with filters.
wp_get_media
Retrieves a single media item by its ID.
wp_upload_media
Uploads a file to the WordPress media library.
wp_update_media
Updates the metadata of an existing media item.
wp_delete_media
Deletes a media item.
wp_list_pages
Lists pages from a WordPress site, with filters.
wp_get_page
Retrieves a single page by its ID, optionally including full content for editing.
wp_create_page
Creates a new page.
wp_update_page
Updates an existing page.
wp_delete_page
Deletes a page.
wp_get_page_revisions
Retrieves revisions for a specific page.
wp_performance_stats
Get real-time performance statistics and metrics. Note: Top-level metrics (totalRequests, averageResponseTime, errorRate) are session-wide aggregates across all sites. Per-site cache and client stats are shown in the siteSpecific section when a site parameter is provided.
wp_performance_history
Get historical performance data and trends
wp_performance_benchmark
Compare current performance against industry benchmarks. Note: Benchmarks are based on session-wide aggregated metrics across all sites, not per-site metrics.
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
wp_list_posts
Lists posts from a WordPress site with comprehensive filtering options. Supports search, status filtering, and category/tag filtering with enhanced metadata display. **Usage Examples:** • Basic listing: `wp_list_posts` • Search posts: `wp_list_posts --search="AI trends"` • Filter by status: `wp_list_posts --status="draft"` • Category filtering: `wp_list_posts --categories=[1,2,3]` • Paginated results: `wp_list_posts --per_page=20 --page=2` • Combined filters: `wp_list_posts --search="WordPress" --status="publish" --per_page=10`
wp_get_post
Retrieves detailed information about a single post including metadata, content statistics, and management links. Optionally includes full HTML content for editing. **Usage Examples:** • Basic metadata: `wp_get_post --id=123` • With full content: `wp_get_post --id=123 --include_content=true`
wp_create_post
Creates a new WordPress post with comprehensive validation and detailed success feedback including management links. **Usage Examples:** • Simple post: `wp_create_post --title="My New Post" --content="<p>Hello World!</p>"` • Draft post: `wp_create_post --title="Draft Post" --status="draft"` • Categorized post: `wp_create_post --title="Tech News" --categories=[1,5] --tags=[10,20]` • Post with featured image: `wp_create_post --title="My Post" --content="<p>Content</p>" --featured_media=42` • Remove featured image: `wp_create_post --title="My Post" --featured_media=0` • Scheduled post: `wp_create_post --title="Future Post" --status="future" --date="2024-12-25T10:00:00"` • Complete post: `wp_create_post --title="Complete Post" --content="<p>Content</p>" --excerpt="Summary" --status="publish"`
wp_update_post
Updates an existing WordPress post with comprehensive validation and change tracking. All parameters except ID are optional - only provided fields will be updated. **Usage Examples:** • Update title: `wp_update_post --id=123 --title="New Title"` • Update content: `wp_update_post --id=123 --content="<p>Updated content</p>"` • Change status: `wp_update_post --id=123 --status="publish"` • Update categories: `wp_update_post --id=123 --categories=[1,5,10]` • Set featured image: `wp_update_post --id=123 --featured_media=42` • Remove featured image: `wp_update_post --id=123 --featured_media=0` • Multiple updates: `wp_update_post --id=123 --title="New Title" --status="publish" --categories=[1,2]`
wp_delete_post
Deletes a WordPress post with options for trash or permanent deletion. Includes safety confirmations and detailed feedback on the deletion action. **Usage Examples:** • Trash a post: `wp_delete_post --id=123` (moves to trash) • Permanent deletion: `wp_delete_post --id=123 --force=true` • Bulk operations: Use multiple calls with different IDs
wp_get_post_revisions
Retrieves the revision history for a specific post, including details about changes, dates, and authors for content management and auditing purposes.
wp_seo_analyze_content
Analyze WordPress post content for SEO optimization opportunities including readability, keyword density, structure, and technical factors
wp_seo_generate_metadata
Generate SEO-optimized metadata including title tags, meta descriptions, OpenGraph, and Twitter Card data
wp_seo_bulk_update_metadata
Update SEO metadata for multiple posts with progress tracking and error handling
wp_seo_generate_schema
Generate JSON-LD structured data schema for enhanced search results
wp_seo_validate_schema
Validate JSON-LD schema markup for correctness and compliance
wp_seo_suggest_internal_links
Analyze content and suggest relevant internal linking opportunities for better SEO
wp_seo_site_audit
Perform comprehensive SEO audit of the WordPress site including technical, content, and performance analysis
wp_seo_track_serp
Track search engine result page positions for target keywords
wp_seo_keyword_research
Research keywords and get suggestions based on topic and competition analysis
wp_seo_test_integration
Test SEO plugin integration and detect available SEO plugins on the WordPress site
wp_seo_get_live_data
Retrieve live SEO data from WordPress including plugin-specific metadata and configurations
wp_get_site_settings
Retrieves the general settings for a WordPress site. Requires administrator role (manage_options capability).
wp_update_site_settings
Updates one or more general settings for a WordPress site. Requires administrator role (manage_options capability).
wp_search_site
Performs a site-wide search for content across posts, pages, and media with comprehensive results and metadata. **Usage Examples:** • Search everything: `wp_search_site --term="WordPress"` • Search posts only: `wp_search_site --term="tutorial" --type="posts"` • Search pages: `wp_search_site --term="about" --type="pages"` • Search media: `wp_search_site --term="logo" --type="media"` • Find specific content: `wp_search_site --term="contact form"`
wp_get_application_passwords
Lists application passwords for a specific user.
wp_create_application_password
Creates a new application password for a user.
wp_delete_application_password
Revokes an existing application password.
wp_check_version
Check if a newer version of mcp-wordpress is available. Returns current version, latest version, and download URL if update is available.
wp_list_categories
Lists categories from a WordPress site.
wp_get_category
Retrieves a single category by its ID.
wp_create_category
Creates a new category.
wp_update_category
Updates an existing category.
wp_delete_category
Deletes a category.
wp_list_tags
Lists tags from a WordPress site.
wp_get_tag
Retrieves a single tag by its ID.
wp_create_tag
Creates a new tag.
wp_update_tag
Updates an existing tag.
wp_delete_tag
Deletes a tag.
wp_list_users
Lists users from a WordPress site with comprehensive filtering and detailed user information including roles, registration dates, and activity status. **Note:** Role, email, and registration date fields require **administrator** privileges. Non-admin users will see limited metadata due to WordPress REST API restrictions. **Usage Examples:** • List all users: `wp_list_users` • Search users: `wp_list_users --search="john"` • Filter by role: `wp_list_users --roles=["editor","author"]` • Find admins: `wp_list_users --roles=["administrator"]` • Combined search: `wp_list_users --search="smith" --roles=["subscriber"]`
wp_get_user
Retrieves a single user by their ID.
wp_get_current_user
Retrieves the currently authenticated user with comprehensive profile information including roles, capabilities, and account details. **Usage Examples:** • Get current user: `wp_get_current_user` • Check permissions: Use this to verify your current user's capabilities and roles • Account verification: Confirm you're authenticated with the correct account • Profile details: View registration date, email, and user metadata
wp_create_user
Creates a new user.
wp_update_user
Updates an existing user.
wp_delete_user
Deletes a user.
Comprehensive WordPress MCP Server
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with WordPress sites through the WordPress REST API. This server provides tools for managing all aspects of WordPress programmatically, including posts, users, comments, categories, tags, and custom endpoints.
<a href="https://glama.ai/mcp/servers/@prathammanocha/wordpress-mcp-server">
</a>
Features
Post Management
- Create, retrieve, update, and delete WordPress posts - Filter posts by various parameters - Pagination support for post listingsUser Management
- Retrieve user information by ID or login - Update user details - Delete usersComments Management
- Create, retrieve, update, and delete comments - Filter comments by post - Pagination support for comment listingsTaxonomy Management
- Manage categories and tags - Create, retrieve, update, and delete taxonomies - Find categories and tags by slugSite Information
- Retrieve general WordPress site informationCustom Requests
- Support for custom REST API endpoints - Custom HTTP methods (GET, POST, PUT, DELETE) - Custom data and parametersPrerequisites
- Node.js v18 or higher
- A WordPress site with REST API enabled
- WordPress application password for authentication
Installation
1. Clone this repository:
git clone [repository-url]
cd wordpress-mcp-server
2. Install dependencies:
npm install
3. Build the server:
npm run build
WordPress Configuration
Before using the server, you need to set up your WordPress site:
1. Ensure your WordPress site has REST API enabled (enabled by default in WordPress 4.7+)
2. Create an application password:
- Log in to your WordPress admin panel
- Go to Users → Profile
- Scroll down to "Application Passwords"
- Enter a name for the application (e.g., "MCP Server")
- Click "Add New Application Password"
- Copy the generated password (you won't be able to see it again)
MCP Configuration
Add the server to your MCP settings file (usually located at ~/AppData/Roaming/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json):
{
"mcpServers": {
"wordpress": {
"command": "node",
"args": ["path/to/wordpress-mcp-server/build/index.js"]
}
}
}
Available Tools
Post Management
1. create_post
Creates a new WordPress post.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- title (required): Post title
- content (required): Post content
- status (optional): Post status ('draft', 'publish', or 'private', defaults to 'draft')
Example:
{
"tool": "create_post",
"siteUrl": "https://example.com",
"username": "admin",
"password": "xxxx xxxx xxxx xxxx",
"title": "My First Post",
"content": "Hello, world!",
"status": "draft"
}
2. get_posts
Retrieves WordPress posts with pagination.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- perPage (optional): Number of posts per page (default: 10)
- page (optional): Page number (default: 1)
- customParams (optional): Additional query parameters
Example:
{
"tool": "get_posts",
"siteUrl": "https://example.com",
"username": "admin",
"password": "xxxx xxxx xxxx xxxx",
"perPage": 5,
"page": 1
}
3. update_post
Updates an existing WordPress post.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- postId (required): ID of the post to update
- title (optional): New post title
- content (optional): New post content
- status (optional): New post status ('draft', 'publish', or 'private')
Example:
{
"tool": "update_post",
"siteUrl": "https://example.com",
"username": "admin",
"password": "xxxx xxxx xxxx xxxx",
"postId": 123,
"title": "Updated Title",
"content": "Updated content",
"status": "publish"
}
4. delete_post
Deletes a WordPress post.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- postId (required): ID of the post to delete
Example:
{
"tool": "delete_post",
"siteUrl": "https://example.com",
"username": "admin",
"password": "xxxx xxxx xxxx xxxx",
"postId": 123
}
User Management
1. get_users
Retrieves WordPress users.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- perPage (optional): Number of users per page (default: 10)
- page (optional): Page number (default: 1)
2. get_user
Retrieves a specific WordPress user by ID.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- userId (required): ID of the user to retrieve
3. get_user_by_login
Retrieves a WordPress user by login name.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- userLogin (required): Login name of the user to retrieve
Comment Management
1. get_comments
Retrieves WordPress comments.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- perPage (optional): Number of comments per page (default: 10)
- page (optional): Page number (default: 1)
- postIdForComment (optional): Filter comments by post ID
2. create_comment
Creates a new comment on a post.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- postIdForComment (required): ID of the post to comment on
- commentContent (required): Content of the comment
- customData (optional): Additional comment data
Category and Tag Management
1. get_categories
Retrieves WordPress categories.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- perPage (optional): Number of categories per page (default: 10)
- page (optional): Page number (default: 1)
2. create_category
Creates a new WordPress category.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- categoryName (required): Name of the category to create
- customData (optional): Additional category data (description, parent, etc.)
Custom Requests
1. custom_request
Makes a custom request to any WordPress REST API endpoint.Parameters:
- siteUrl (required): Your WordPress site URL
- username (required): WordPress username
- password (required): WordPress application password
- customEndpoint (required): API endpoint path
- customMethod (optional): HTTP method ('GET', 'POST', 'PUT', 'DELETE', default: 'GET')
- customData (optional): Data for POST/PUT requests
- customParams (optional): URL parameters for GET requests
Example:
{
"tool": "custom_request",
"siteUrl": "https://example.com",
"username": "admin",
"password": "xxxx xxxx xxxx xxxx",
"customEndpoint": "wp/v2/media",
"customMethod": "GET",
"customParams": {
"per_page": 5
}
}
Response Format
All tools return responses in the following format:
Success Response
{
"success": true,
"data": {
// WordPress API response data
},
"meta": {
// Optional metadata (pagination info, etc.)
}
}
Error Response
{
"success": false,
"error": "Error message here"
}
Security Considerations
- Always use HTTPS URLs for your WordPress site
- Use application passwords instead of your main WordPress password
- Keep your application passwords secure and don't share them
- Consider using WordPress roles and capabilities to limit access
- Regularly rotate application passwords
Development
To contribute to the development:
1. Fork the repository
2. Create a feature branch
3. Make your changes
4. Run tests (when available)
5. Submit a pull request
For development mode with automatic recompilation:
npm run dev
License
This project is licensed under the ISC License.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Sign in to leave a review
Use Google, GitHub, or an email account so ratings stay tied to real people.
No reviews posted yet.


