WordPress MCP Server

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.

Category
访问服务器

README

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

Variable Required Default Description
WP_SITE_URL Yes WordPress site URL (must use HTTPS)
WP_USERNAME Yes WordPress username
WP_APPLICATION_PASSWORD Yes Application Password (include spaces)
WP_RATE_LIMIT No 30 Max requests per rate window
WP_RATE_WINDOW No 10000 Rate window in milliseconds
WP_TIMEOUT No 30000 Request timeout in milliseconds

Tools Reference

Content Management (10 tools)

Tool Description
list_posts List posts with filters (status, category, tag, author, search, date range)
get_post Get a single post by ID with full raw content
create_post Create a new post (supports HTML and Divi shortcodes)
update_post Update post fields
delete_post Trash or permanently delete a post
list_pages List pages with filters
get_page Get a single page by ID with full raw content
create_page Create a new page
update_page Update page fields
search_content Search across all content types

Media Management (4 tools)

Tool Description
list_media List media library items
get_media Get media item with all size URLs
upload_media Upload from URL or base64 data
update_media Update alt text, caption, description

Taxonomy Management (5 tools)

Tool Description
list_categories List categories
create_category Create a category
list_tags List tags
create_tag Create a tag
manage_post_terms Set categories/tags on a post

Comment Moderation (4 tools)

Tool Description
list_comments List comments with status filters
get_comment Get comment details
moderate_comment Change comment status (approve/hold/spam/trash)
reply_to_comment Reply as the authenticated user

User Management (3 tools)

Tool Description
list_users List users with role filters
get_user Get user profile
get_current_user Get the authenticated user's profile

Plugin & Theme Management (5 tools)

Tool Description
list_plugins List installed plugins with status
toggle_plugin Activate or deactivate a plugin
list_themes List installed themes
get_active_theme Get active theme details
switch_theme Activate a different theme

Site Settings (4 tools)

Tool Description
get_site_info Get site name, URL, WP version, namespaces
get_settings Get site settings (title, tagline, timezone, etc.)
update_settings Update site settings
get_post_types List registered post types (discover Divi layouts)

Navigation Menus (3 tools)

Tool Description
list_menus List navigation menus
get_menu Get menu details
update_menu Update menu name, description, locations

Health (2 tools)

Tool Description
get_health Quick connection and auth check
get_health_detailed Comprehensive 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

Tools Minimum Role
Content, Media, Taxonomy, Comments Editor
Users (read-only) Author
Plugins, Themes, Settings Administrator

License

MIT

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选