WordPress Integration

Connect your WordPress sites to MCP Forest and create AI-powered content management tools

Overview

The WordPress integration allows you to create MCP servers that can interact with your WordPress sites through the WordPress REST API. This enables AI assistants to manage content, users, media, and more.

What You Can Do

  • Create and edit posts and pages
  • Manage categories and tags
  • Upload and manage media
  • Manage users and comments
  • Access custom post types

Requirements

  • WordPress 5.0+ with REST API enabled
  • User account with appropriate permissions
  • HTTPS enabled (recommended)
  • Application Passwords plugin (WP 5.6+)

Authentication Setup

MCP Forest supports multiple authentication methods for WordPress. Choose the one that best fits your security requirements.

Application Passwords (Recommended)

Available in WordPress 5.6+ or with plugin

Best Practice

Application passwords are the most secure method as they don't require your actual WordPress password and can be revoked individually.

Setup Steps:

  1. 1. Go to your WordPress admin → Users → Profile
  2. 2. Scroll down to "Application Passwords" section
  3. 3. Enter "MCP Forest" as the application name
  4. 4. Click "Add New Application Password"
  5. 5. Copy the generated password (you won't see it again)
  6. 6. Use your WordPress username and this password in MCP Forest

Basic Authentication

Using WordPress username and password

Security Warning

Basic authentication requires your actual WordPress password. Use only if Application Passwords are not available.

Requirements:

  • • Install "Application Passwords" or "Basic Auth" plugin
  • • HTTPS is mandatory for security
  • • User must have appropriate permissions

JWT Authentication

Token-based authentication for advanced users

Advanced Option

JWT tokens provide stateless authentication and are ideal for high-traffic applications or when you need fine-grained control.

Setup Requirements:

  • • Install "JWT Authentication for WP-API" plugin
  • • Configure JWT secret in wp-config.php
  • • Obtain JWT token through login endpoint

Available Tools

MCP Forest automatically generates these tools based on your WordPress REST API endpoints:

Posts Management

get_posts
Retrieve posts with filtering options
create_post
Create new posts with content and metadata
update_post
Update existing posts
delete_post
Delete posts (move to trash)

Pages Management

get_pages
Retrieve pages with hierarchy
create_page
Create new pages
update_page
Update existing pages
delete_page
Delete pages

Media Management

get_media
Browse media library
upload_media
Upload new media files
update_media
Update media metadata
delete_media
Delete media files

Categories & Tags

get_categories
List all categories
create_category
Create new categories
get_tags
List all tags
create_tag
Create new tags

User Management

get_users
List WordPress users
get_user
Get specific user details
update_user
Update user profile
get_current_user
Get authenticated user info

Comments Management

get_comments
Retrieve comments
create_comment
Add new comments
update_comment
Moderate comments
delete_comment
Delete comments

Configuration Example

Here's an example of how to configure your WordPress integration in MCP Forest:

WordPress Server Configuration

{
  "name": "my-wordpress-site",
  "platform": "wordpress",
  "config": {
    "baseUrl": "https://your-wordpress-site.com",
    "authentication": {
      "type": "application_password",
      "username": "your-username",
      "password": "your-application-password"
    },
    "endpoints": {
      "posts": "/wp-json/wp/v2/posts",
      "pages": "/wp-json/wp/v2/pages",
      "media": "/wp-json/wp/v2/media",
      "users": "/wp-json/wp/v2/users",
      "categories": "/wp-json/wp/v2/categories",
      "tags": "/wp-json/wp/v2/tags",
      "comments": "/wp-json/wp/v2/comments"
    },
    "features": {
      "customPostTypes": true,
      "customFields": true,
      "multisite": false
    }
  }
}

Troubleshooting

Common Issues

REST API Not Available

Ensure WordPress REST API is enabled. Check if you can access https://yoursite.com/wp-json/wp/v2/

Authentication Failed

Verify your credentials. For Application Passwords, ensure the plugin is active and you're using the correct username/password combination.

Permission Denied

Check that your WordPress user has the necessary capabilities for the actions you're trying to perform (publish_posts, edit_posts, etc.).

Ready to Connect WordPress?

Follow our step-by-step guide to create your first WordPress MCP server and start building AI-powered content management tools.