Connecting Claude AI to WordPress via the Model Context Protocol (MCP)

Written by

in

Claude AI 🤖 ↔ WordPress

Powered by the Model Context Protocol — AI meets your WordPress site

The Model Context Protocol (MCP) is an open standard introduced by Anthropic that allows AI assistants like Claude to securely interact with external systems, APIs, and data sources. By installing the WordPress MCP plugin, you create a direct, two-way bridge between Claude and your WordPress site — enabling AI-powered content management, automation, and more.


🧠 What is MCP?

MCP is an open protocol that standardizes how AI models connect to external tools and data. It defines a client-server architecture where Claude acts as the client and plugins like WordPress MCP act as the server — exposing capabilities as tools, resources, and prompts.

🌐 Why WordPress + Claude?

Connecting Claude to WordPress means you can create posts, manage media, update settings, read content, and interact with WooCommerce — all from a natural language conversation with Claude, with no context switching required.

⚙️ How the Connection Works

Claude AI and WordPress MCP integration architecture
The MCP bridge connects Claude to your WordPress REST API securely

Step-by-Step Architecture

  1. Install WordPress MCP Plugin — Add the WordPress MCP plugin to your site. It registers a secure REST endpoint that Claude can communicate with.
  2. Configure Claude Code or Claude Desktop — Add the MCP server configuration pointing to your WordPress site’s MCP endpoint with your application password credentials.
  3. Claude Discovers Tools — On connection, Claude reads the available tools (create post, get media, update settings, etc.) and resources (posts list, site info) exposed by the plugin.
  4. Natural Language Commands — You instruct Claude in plain English: “Create a post about our new product launch” and Claude translates that into the appropriate REST API calls.
  5. Results Flow Back — WordPress executes the action and returns structured data to Claude, which then summarizes or confirms the result for you.

📋 Claude Code MCP Configuration

To connect Claude Code CLI to your WordPress site, add the following MCP server configuration to your ~/.claude/settings.json or project-level .claude/settings.json:

{
  "mcpServers": {
    "wordpress": {
      "command": "node",
      "args": ["/path/to/wordpress-mcp/server.js"],
      "env": {
        "WORDPRESS_URL": "https://yoursite.com",
        "WORDPRESS_USERNAME": "your-username",
        "WORDPRESS_APP_PASSWORD": "xxxx xxxx xxxx xxxx xxxx xxxx"
      }
    }
  }
}

✨ What You Can Do with Claude + WordPress MCP

📝 Content Management

  • Create and publish posts with Gutenberg blocks
  • Draft, schedule, and update articles
  • Manage pages and custom post types
  • Add categories, tags, and taxonomies

🖼️ Media Library

  • Query and browse uploaded media
  • Update image alt text and captions
  • Attach media to posts programmatically
  • Retrieve image metadata and URLs

⚙️ Site Administration

  • Read site settings and configuration
  • Manage users and roles
  • Check active plugins and themes
  • Query and update ACF custom fields

🛡️ Security & Authentication

The WordPress MCP plugin uses WordPress Application Passwords for authentication — a secure, token-based mechanism built into WordPress core since version 5.6. Each connection uses a unique application password that can be revoked at any time from your WordPress dashboard under Users → Your Profile → Application Passwords.

MCP transforms Claude from a standalone AI assistant into a collaborative partner that can take real action inside your WordPress site — safely, securely, and on your terms.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *