Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

wordpress-mcp-server

MCP.Pizza Chef: stefans71

The wordpress-mcp-server is a Model Context Protocol (MCP) server designed to integrate WordPress sites with AI models. It enables automated interactions with WordPress through the WordPress REST API, supporting operations like creating, retrieving, and updating posts. Compatible across Windows, macOS, and Linux, it uses JSON-RPC 2.0 protocol for communication. Configuration involves setting environment variables for WordPress credentials, allowing seamless and secure access to your WordPress site. This server empowers developers to build AI-enhanced workflows that manage WordPress content programmatically and efficiently.

Use This MCP server To

Automate WordPress post creation and updates Retrieve WordPress posts for content analysis Integrate WordPress content management into AI workflows Enable AI-driven content publishing on WordPress Manage WordPress site content programmatically Sync WordPress data with external AI tools

README

WordPress MCP Server

A Model Context Protocol (MCP) server for WordPress integration, compatible with Windows, macOS, and Linux.

Overview

This MCP server enables interaction with WordPress sites through the WordPress REST API. It provides tools for creating, retrieving, and updating posts using JSON-RPC 2.0 protocol.

Installation

  1. Clone the repository
  2. Install dependencies:
npm install
  1. Build the project:
npm run build

Configuration

Add the server to your MCP settings file with environment variables for WordPress credentials:

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["path/to/build/index.js"],
      "env": {
        "WORDPRESS_SITE_URL": "https://your-wordpress-site.com",
        "WORDPRESS_USERNAME": "your-username",
        "WORDPRESS_PASSWORD": "your-app-password"
      }
    }
  }
}

The environment variables are:

  • WORDPRESS_SITE_URL: Your WordPress site URL
  • WORDPRESS_USERNAME: WordPress username
  • WORDPRESS_PASSWORD: WordPress application password

You can also provide these credentials in the request parameters if you prefer not to use environment variables.

Available Methods

create_post

Creates a new WordPress post.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • title: Post title
  • content: Post content
  • status: (optional) 'draft' | 'publish' | 'private' (default: 'draft')

get_posts

Retrieves WordPress posts.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • perPage: (optional) Number of posts per page (default: 10)
  • page: (optional) Page number (default: 1)

update_post

Updates an existing WordPress post.

Parameters:

  • siteUrl: (optional if set in env) WordPress site URL
  • username: (optional if set in env) WordPress username
  • password: (optional if set in env) WordPress application password
  • postId: ID of the post to update
  • title: (optional) New post title
  • content: (optional) New post content
  • status: (optional) 'draft' | 'publish' | 'private'

Security Note

For security, it's recommended to use WordPress application passwords instead of your main account password. You can generate an application password in your WordPress dashboard under Users → Security → Application Passwords.

Example Usage

Using environment variables:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "create_post",
  "params": {
    "title": "My New Post",
    "content": "Hello World!",
    "status": "draft"
  }
}

Without environment variables:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "create_post",
  "params": {
    "siteUrl": "https://your-wordpress-site.com",
    "username": "your-username",
    "password": "your-app-password",
    "title": "My New Post",
    "content": "Hello World!",
    "status": "draft"
  }
}

Requirements

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

License

MIT License - See LICENSE file for details

wordpress-mcp-server FAQ

How do I install the wordpress-mcp-server?
Clone the repository, run 'npm install' to install dependencies, then 'npm run build' to build the project.
How do I configure the wordpress-mcp-server?
Add the server to your MCP settings file and set environment variables WORDPRESS_SITE_URL, WORDPRESS_USERNAME, and WORDPRESS_PASSWORD with your WordPress credentials.
Which platforms does the wordpress-mcp-server support?
It supports Windows, macOS, and Linux platforms.
What protocol does the wordpress-mcp-server use to communicate?
It uses the JSON-RPC 2.0 protocol for communication with the MCP client.
Can I use this server to update existing WordPress posts?
Yes, the server supports creating, retrieving, and updating posts via the WordPress REST API.
Is the wordpress-mcp-server secure for handling WordPress credentials?
Yes, credentials are managed via environment variables, keeping them out of code and configuration files.
Can this MCP server work with multiple WordPress sites?
Yes, by configuring separate instances with different environment variables for each site.
Does the wordpress-mcp-server support AI models from providers like OpenAI, Claude, and Gemini?
Yes, it is designed to work with MCP clients that can connect to various LLM providers including OpenAI, Claude, and Gemini.