WordPress Manager MCP server

Enables AI to manage WordPress sites by providing tools for creating and updating posts, managing users, and retrieving content through authenticated API interactions
Back to servers
Setup instructions
Provider
Pratham Manocha
Release date
Apr 22, 2025
Language
TypeScript
Stats
39 stars

The WordPress MCP Server allows AI assistants to interact with WordPress sites through the REST API, providing functionality to manage posts, users, comments, categories, tags, and custom endpoints programmatically.

Prerequisites

  • Node.js v18 or higher
  • A WordPress site with REST API enabled
  • WordPress application password for authentication

Installation

  1. Clone the repository and install dependencies:
git clone [repository-url]
cd wordpress-mcp-server
npm install
  1. Build the server:
npm run build

WordPress Configuration

Before using the server, set up your WordPress site:

  1. Ensure your WordPress site has REST API enabled (default in WordPress 4.7+)
  2. Create an application password:
    • Log in to WordPress admin panel
    • Go to Users → Profile
    • Scroll down to "Application Passwords"
    • Enter a name (e.g., "MCP Server")
    • Click "Add New Application Password"
    • Copy the generated password

MCP Configuration

Add the server to your MCP settings file:

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["path/to/wordpress-mcp-server/build/index.js"]
    }
  }
}

Using the Tools

Post Management

Creating Posts

{
  "tool": "create_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "title": "My First Post",
  "content": "Hello, world!",
  "status": "draft"
}

Retrieving Posts

{
  "tool": "get_posts",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "perPage": 5,
  "page": 1
}

Updating Posts

{
  "tool": "update_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "postId": 123,
  "title": "Updated Title",
  "content": "Updated content",
  "status": "publish"
}

Deleting Posts

{
  "tool": "delete_post",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "postId": 123
}

User Management

Retrieving Users

{
  "tool": "get_users",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "perPage": 10,
  "page": 1
}

Retrieving a Specific User

{
  "tool": "get_user",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "userId": 1
}

Retrieving a User by Login Name

{
  "tool": "get_user_by_login",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "userLogin": "johndoe"
}

Comment Management

Retrieving Comments

{
  "tool": "get_comments",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "perPage": 10,
  "page": 1,
  "postIdForComment": 123
}

Creating a Comment

{
  "tool": "create_comment",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "postIdForComment": 123,
  "commentContent": "This is a great post!"
}

Category and Tag Management

Retrieving Categories

{
  "tool": "get_categories",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "perPage": 10,
  "page": 1
}

Creating a Category

{
  "tool": "create_category",
  "siteUrl": "https://example.com",
  "username": "admin",
  "password": "xxxx xxxx xxxx xxxx",
  "categoryName": "New Category",
  "customData": {
    "description": "This is a new category"
  }
}

Custom Requests

For advanced use cases, you can make custom requests to any WordPress REST API endpoint:

{
  "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 a consistent 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
  • Consider using WordPress roles and capabilities to limit access
  • Regularly rotate application passwords

How to install this MCP server

For Claude Code

To add this MCP server to Claude Code, run this command in your terminal:

claude mcp add-json "wordpress" '{"command":"node","args":["path/to/wordpress-mcp-server/build/index.js"]}'

See the official Claude Code MCP documentation for more details.

For Cursor

There are two ways to add an MCP server to Cursor. The most common way is to add the server globally in the ~/.cursor/mcp.json file so that it is available in all of your projects.

If you only need the server in a single project, you can add it to the project instead by creating or adding it to the .cursor/mcp.json file.

Adding an MCP server to Cursor globally

To add a global MCP server go to Cursor Settings > Tools & Integrations and click "New MCP Server".

When you click that button the ~/.cursor/mcp.json file will be opened and you can add your server like this:

{
    "mcpServers": {
        "wordpress": {
            "command": "node",
            "args": [
                "path/to/wordpress-mcp-server/build/index.js"
            ]
        }
    }
}

Adding an MCP server to a project

To add an MCP server to a project you can create a new .cursor/mcp.json file or add it to the existing one. This will look exactly the same as the global MCP server example above.

How to use the MCP server

Once the server is installed, you might need to head back to Settings > MCP and click the refresh button.

The Cursor agent will then be able to see the available tools the added MCP server has available and will call them when it needs to.

You can also explicitly ask the agent to use the tool by mentioning the tool name and describing what the function does.

For Claude Desktop

To add this MCP server to Claude Desktop:

1. Find your configuration 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 this to your configuration file:

{
    "mcpServers": {
        "wordpress": {
            "command": "node",
            "args": [
                "path/to/wordpress-mcp-server/build/index.js"
            ]
        }
    }
}

3. Restart Claude Desktop for the changes to take effect

Want to 10x your AI skills?

Get a free account and learn to code + market your apps using AI (with or without vibes!).

Nah, maybe later