WordPress MCP Server

WordPress MCP Server

Enables AI agents to manage WordPress sites with 190+ tools for content management, theme/plugin customization, file system operations, WooCommerce, and complete site control through natural language.

Category
访问服务器

README

<div align="center"> <img src="logo.svg" alt="WPMCP Logo" width="400"/>

WordPress MCP Server

<p><strong>Enable AI to manage WordPress sites like a professional developer</strong></p> <p>190+ tools for complete WordPress control</p>

npm version License: MIT WordPress

</div>


Video Demo : https://youtu.be/6hwMqXQFKN0

💝 Support This Project

If this project helps you, consider supporting its development:

Cryptocurrency Donation

Select Coin Select Network Contract Deposit Address
🪙 USDT (TetherUS) 🔗 TRX (Tron TRC20) Ending in jLj6t TBJBb7fKyRdhqmWETyZoNP4X98mPk2Jxrt

Your support helps maintain and improve this project! 🙏

WPMCP server gives AI agents complete control over WordPress sites. Connect it to Claude, Cline, or any MCP-compatible AI, and manage WordPress through natural language.

Key Capabilities:

  • Content Management - Posts, pages, media, users, comments
  • File System Access - Read and write theme/plugin files
  • Theme Customization - Create child themes, modify styles, customize block themes
  • Plugin Control - Activate, deactivate, and modify plugins
  • Menu Management - Create menus, add items, assign to locations
  • Custom Content Types - Manage post types and taxonomies
  • Shortcodes & Cron - Execute shortcodes, schedule tasks
  • Widget System - Manage sidebars and widgets
  • Database Operations - Execute queries, manage options, inspect tables
  • WooCommerce Integration - Products, orders, customers, inventory, reports
  • Gutenberg Blocks - Block types, patterns, reusable blocks, templates
  • Advanced SEO - Sitemaps, redirects, schema markup, Open Graph, analysis
  • Security Monitoring - Site health, updates, integrity checks, debug logs
  • Performance Optimization - Cache management, database optimization, image processing
  • Backup & Migration - Full/partial backups, restore, export/import, cloning
  • User Roles - Custom roles, capabilities, permissions, role management
  • Complete Security - Multi-layer validation and automatic backups

Quick Start

1. Install

npm i -g wpmcp@3.0.0

2. Configure

Add to your MCP client (Claude Desktop, Cline, etc.):

{
  "mcpServers": {
    "wordpress": {
      "command": "npx",
      "args": ["-y", "wpmcp@3.0.0"],
      "env": {
        "WORDPRESS_URL": "https://your-site.com",
        "WORDPRESS_USERNAME": "admin",
        "WORDPRESS_PASSWORD": "your-app-password"
      }
    }
  }
}

3. Install WordPress Plugin (Required)

  1. Install wpmcp-plugin/wpmcp.zip to /wp-content/plugins/wpmcp-plugin/
  2. Activate via WordPress Admin → Plugins → "WordPress MCP Server Plugin"
  3. Ensure you have edit_themes and edit_plugins capabilities

What the plugin enables:

  • File system operations (read, write, delete, copy, move)
  • Shortcode execution
  • Cron job management
  • All advanced WordPress features

See wpmcp-plugin/README.md for detailed setup guide.

4. Use

"Create a child theme called 'My Custom Theme'"
"Activate Akismet plugin"
"Read the style.css file from my theme"
"Create a blog post about WordPress and publish it"

Available Tools (130+)

👉 See WPMCP_TOOLS.MD for complete detailed list of all 130 tools.

Category Tools What You Can Do
Posts (15) create, update, delete, search, schedule, publish, duplicate, bulk Manage all blog content
Pages (4) create, update, delete, hierarchy Build site structure
Media (5) upload, update, delete, featured images Manage images and files
Users (4) create, update, delete, roles User management
Categories (4) create, update, delete, hierarchy Organize content
Tags (2) create, get Tag content
Comments (4) create, update, delete, moderate Manage discussions
Settings (4) get, update site settings Configure WordPress
SEO (2) meta description, focus keywords Optimize for search
File System (8) read, write, delete, copy, move Edit any file
Theme Manager (13) activate, child themes, theme.json, templates Complete theme control
Plugin Manager (10) activate, deactivate, read/write files Full plugin control
Menu Manager (8) create, add items, assign locations Full navigation control
Custom Types (7) get post types, taxonomies, manage terms Advanced content types
Shortcodes (3) list, execute, check existence Shortcode system
Cron Jobs (5) list, schedule, unschedule, run manually Task scheduling
Widgets (6) get sidebars, widgets, types, update Widget management
Database (6) execute queries, manage options, list tables Database operations
WooCommerce (15) products, orders, customers, inventory, coupons E-commerce management
Gutenberg Blocks (12) block types, patterns, reusable blocks, templates Modern block editor
Security (7) site health, updates, integrity, debug logs Security monitoring
Performance (8) cache, optimization, cleanup, image processing Performance tuning

What You Can Do

Content Management

"Create a blog post about AI and publish it"
"Upload an image and set it as featured image for post 5"
"Get all draft posts"
"Create a new page called 'About Us'"

Theme Customization

"Create a child theme of Twenty Twenty-Five"
"Read my theme's functions.php file"
"Add custom CSS to make headers blue"
"Get the theme.json configuration"
"List all files in my theme"

Menu Management Examples

// Create menu
{
  "name": "Main Navigation",
  "description": "Primary site menu"
}

// Add menu item
{
  "title": "Home",
  "url": "https://yoursite.com",
  "menus": 3
}

// Get menu locations
// No parameters needed

// Assign menu to location
{
  "location": "primary",
  "menuId": 3
}

Plugin Management

"Show me all installed plugins"
"Activate the Contact Form 7 plugin"
"Read the main WooCommerce plugin file"
"Deactivate Hello Dolly"
"Check if Yoast SEO is installed"

Menu Management

"Create a new menu called 'Main Navigation'"
"Add a Home link to the menu"
"Get all registered menu locations"
"Assign the Main Navigation menu to primary location"
"Show me all menu items in the Main menu"

Custom Post Types & Taxonomies

"Show me all registered post types"
"Get details for the 'page' post type"
"Get all taxonomies"
"Show me all categories"
"Create a new category called 'Technology'"

Shortcodes

"List all registered shortcodes"
"Execute [gallery ids='1,2,3']"
"Check if 'contact-form' shortcode exists"

Cron Jobs & Scheduled Tasks

"Show me all scheduled cron jobs"
"Schedule a daily backup task"
"Run WordPress cron manually"
"Get available cron schedules"

Widgets

"Get all widget areas"
"Show me all available widget types"
"Get widgets in the sidebar"
"List inactive widgets"

File Operations

"Read style.css from my theme"
"Create a new custom.css file in my theme"
"Copy functions.php to functions-backup.php"
"Delete old-template.php with backup"

Security Features

All operations are secure:

  • ✅ Only allowed directories (themes, plugins, uploads)
  • ✅ Only safe file extensions (.php, .css, .js, etc.)
  • ✅ Malware pattern detection
  • ✅ PHP syntax validation
  • ✅ Automatic backups before changes
  • ✅ WordPress permission system
  • ✅ File size limits (10MB)

WordPress Authentication

Self-Hosted WordPress:

  1. Install Basic Auth plugin
  2. Use your WordPress admin username and password

WordPress.com:

  1. Requires Business plan or higher
  2. Generate Application Password in Settings → Security

Project Structure

src/tools/
├── posts.ts          # 15 post management tools
├── pages.ts          # 4 page tools
├── media.ts          # 5 media tools
├── filesystem.ts     # 8 file system tools
├── themes.ts         # 13 theme management tools
├── plugins.ts        # 10 plugin management tools
├── menus.ts          # 8 menu management tools
└── all-features.ts   # Users, categories, tags, comments, settings, SEO

filesystem-plugin/
└── wpmcp-filesystem.php  # Required for file operations

Development

# Clone repository
git clone https://github.com/RaheesAhmed/wordpress-mcp-server.git
cd wordpress-mcp-server

# Install dependencies
npm install

# Build
npm run build

# Run
npm start

Testing

All features tested on live WordPress:

  • ✅ 21/21 tests passed
  • ✅ File operations working
  • ✅ Theme management verified
  • ✅ Plugin control confirmed
  • ✅ Security validated

API Examples

Create Post

{
  "title": "My Post",
  "content": "<p>Content here</p>",
  "status": "publish"
}

Create Child Theme

{
  "parentTheme": "twentytwentyfive",
  "childName": "My Custom Theme"
}

Activate Plugin

{
  "plugin": "akismet/akismet"
}

Read Theme File

{
  "theme": "mytheme",
  "filePath": "functions.php"
}

Write File

{
  "path": "wp-content/themes/mytheme/custom.css",
  "content": "/* Custom styles */",
  "createBackup": true
}

Contributing

  1. Fork the repository
  2. Create feature branch (git checkout -b feature/name)
  3. Commit changes (git commit -m 'Add feature')
  4. Push to branch (git push origin feature/name)
  5. Open Pull Request

License

MIT License - see LICENSE


💝 Support This Project

If you find this project valuable, consider supporting its continued development:

Cryptocurrency Donation

Coin Network Contract Address Deposit Address
🪙 USDT (TetherUS) 🔗 TRX (Tron TRC20) Ending in jLj6t TBJBb7fKyRdhqmWETyZoNP4X98mPk2Jxrt

Copy Address:

TBJBb7fKyRdhqmWETyZoNP4X98mPk2Jxrt

Your contributions help keep this project active and growing! Thank you for your support! 🙏


Built for AI-powered WordPress development 🚀

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选