MCP Hub
Back to servers

WordPress MCP Server

A comprehensive MCP server for managing WordPress sites through the REST API, featuring 38 tools for content, media, plugin, and theme management. It supports secure Application Password authentication and offers specific compatibility for Divi theme shortcode structures.

Updated
Mar 2, 2026

WordPress MCP Server

A TypeScript Model Context Protocol (MCP) server for managing WordPress sites via the REST API. Supports any WordPress 5.6+ site, including sites using the Divi theme.

Features

  • 38 tools across 8 categories for comprehensive WordPress management
  • Application Passwords authentication (secure, no plugins required)
  • Divi-compatible — reads/writes Divi shortcode content via standard REST API
  • Rate limiting with configurable token bucket
  • Health checks for connection diagnostics

Quick Start

1. Generate an Application Password

In your WordPress admin panel:

  1. Go to Users → Profile
  2. Scroll to Application Passwords
  3. Enter a name (e.g., "Claude MCP") and click Add New Application Password
  4. Copy the generated password (spaces are part of the password)

Application Passwords require HTTPS on your site.

2. Register with Claude Code

claude mcp add wordpress -e WP_SITE_URL=https://your-site.com -e WP_USERNAME=admin -e WP_APPLICATION_PASSWORD="xxxx xxxx xxxx xxxx xxxx" -- node /path/to/wordpress-mcp/build/index.js

3. Build from Source

git clone https://github.com/gdamalis/wordpress-mcp.git
cd wordpress-mcp
npm install
npm run build

Environment Variables

VariableRequiredDefaultDescription
WP_SITE_URLYesWordPress site URL (must use HTTPS)
WP_USERNAMEYesWordPress username
WP_APPLICATION_PASSWORDYesApplication Password (include spaces)
WP_RATE_LIMITNo30Max requests per rate window
WP_RATE_WINDOWNo10000Rate window in milliseconds
WP_TIMEOUTNo30000Request timeout in milliseconds

Tools Reference

Content Management (10 tools)

ToolDescription
list_postsList posts with filters (status, category, tag, author, search, date range)
get_postGet a single post by ID with full raw content
create_postCreate a new post (supports HTML and Divi shortcodes)
update_postUpdate post fields
delete_postTrash or permanently delete a post
list_pagesList pages with filters
get_pageGet a single page by ID with full raw content
create_pageCreate a new page
update_pageUpdate page fields
search_contentSearch across all content types

Media Management (4 tools)

ToolDescription
list_mediaList media library items
get_mediaGet media item with all size URLs
upload_mediaUpload from URL or base64 data
update_mediaUpdate alt text, caption, description

Taxonomy Management (5 tools)

ToolDescription
list_categoriesList categories
create_categoryCreate a category
list_tagsList tags
create_tagCreate a tag
manage_post_termsSet categories/tags on a post

Comment Moderation (4 tools)

ToolDescription
list_commentsList comments with status filters
get_commentGet comment details
moderate_commentChange comment status (approve/hold/spam/trash)
reply_to_commentReply as the authenticated user

User Management (3 tools)

ToolDescription
list_usersList users with role filters
get_userGet user profile
get_current_userGet the authenticated user's profile

Plugin & Theme Management (5 tools)

ToolDescription
list_pluginsList installed plugins with status
toggle_pluginActivate or deactivate a plugin
list_themesList installed themes
get_active_themeGet active theme details
switch_themeActivate a different theme

Site Settings (4 tools)

ToolDescription
get_site_infoGet site name, URL, WP version, namespaces
get_settingsGet site settings (title, tagline, timezone, etc.)
update_settingsUpdate site settings
get_post_typesList registered post types (discover Divi layouts)

Navigation Menus (3 tools)

ToolDescription
list_menusList navigation menus
get_menuGet menu details
update_menuUpdate menu name, description, locations

Health (2 tools)

ToolDescription
get_healthQuick connection and auth check
get_health_detailedComprehensive check of all API endpoints

Divi Theme Support

This MCP works with Divi-powered sites through the standard WordPress REST API:

  • Reading Divi pages: get_post and get_page return raw content with context=edit, exposing Divi shortcode structures like [et_pb_section][et_pb_row]...
  • Creating Divi pages: Use create_page with Divi shortcodes in the content field
  • Updating Divi pages: Modify shortcode content via update_page
  • Discovering Divi layouts: Use get_post_types to find Divi's et_pb_layout custom post type (Divi Library items)

Security

  • HTTPS is enforced (Application Passwords are Base64-encoded and require transport encryption)
  • Credentials are loaded from environment variables only, never stored on disk
  • Minimum role required: Editor for content operations, Administrator for plugin/theme management
  • Media uploads accept URLs and base64 only — no local filesystem access

WordPress Role Requirements

ToolsMinimum Role
Content, Media, Taxonomy, CommentsEditor
Users (read-only)Author
Plugins, Themes, SettingsAdministrator

License

MIT

Reviews

No reviews yet

Sign in to write a review