WordPress MCP Server

WordPress MCP Server

Enables AI assistants to manage WordPress sites through natural conversation, supporting post creation, content updates, site queries, and draft-to-publish workflows via the WordPress REST API.

Category
访问服务器

README

WordPress MCP Server

Manage your WordPress site with AI. Create posts, update content, and query your site—all through natural conversation.

Python 3.10+ MCP License: MIT

What is this?

WordPress MCP is a Model Context Protocol server that connects AI assistants like Claude Code and Cursor to your WordPress site via the REST API.

Instead of switching between your terminal and WordPress admin, just ask:

You: "Create a draft post about our new product launch"
You: "Show me all posts from last week"
You: "Update post 42 to published status"
You: "What plugins are installed on my site?"

Demo

Here's a real conversation showing the draft-to-publish workflow:

You: Create a draft post titled "Why AI Tools Matter for Content Creators"

Claude: I'll create that draft post for you.

✓ Created draft post:
  ID: 142
  Title: Why AI Tools Matter for Content Creators
  Status: draft
  Link: https://your-site.com/?p=142

You: Add some content about productivity and automation

Claude: I'll update the post with content about productivity and automation.

✓ Updated post 142 with new content.

You: Show me my draft posts

Claude: Here are your draft posts:

| ID  | Title                                      | Date       |
|-----|-------------------------------------------|------------|
| 142 | Why AI Tools Matter for Content Creators  | 2026-01-03 |
| 138 | Upcoming Features Preview                  | 2026-01-02 |
| 135 | Team Update Q1                             | 2025-12-28 |

You: Publish post 142

Claude: ✓ Published! Your post is now live at:
https://your-site.com/2026/01/03/why-ai-tools-matter-for-content-creators/

Features

  • Full CRUD for Posts - Create, read, update, and delete posts
  • Content Management - List pages, media, and plugins
  • Search & Filter - Find posts by status, keyword, or date
  • Draft Workflow - Create drafts, review, then publish
  • Secure Auth - Uses WordPress Application Passwords

Quick Start

1. Install

git clone https://github.com/gaupoit/wordpress-mcp.git
cd wordpress-mcp
uv sync

2. Create a WordPress Application Password

  1. Go to WordPress Admin → Users → Profile
  2. Scroll to Application Passwords
  3. Enter a name (e.g., "Claude Code") and click Add New
  4. Copy the generated password (you won't see it again!)

3. Configure Claude Code

Add to your Claude Code MCP config (~/.claude.json):

{
  "mcpServers": {
    "wordpress": {
      "command": "uv",
      "args": ["run", "--directory", "/path/to/wordpress-mcp", "wordpress-mcp"],
      "env": {
        "WORDPRESS_URL": "https://your-site.com",
        "WORDPRESS_USER": "your-username",
        "WORDPRESS_APP_PASSWORD": "xxxx-xxxx-xxxx-xxxx"
      }
    }
  }
}

4. Restart Claude Code

# Quit and restart
claude

Verify with /mcp - you should see "wordpress" listed.

Available Tools

Reading Content

Tool Description
wp_site_info Get site name, URL, timezone
wp_get_posts List posts (filter by status, search)
wp_get_post Get single post with full content
wp_get_pages List all pages
wp_get_media List media library items
wp_get_plugins List installed plugins

Writing Content

Tool Description
wp_create_post Create a new post (draft or published)
wp_update_post Update title, content, status, or excerpt
wp_delete_post Move to trash or permanently delete

Example Workflows

Blog Publishing

You: "Create a draft post titled 'Getting Started with AI' with an intro paragraph"
You: "Show me my draft posts"
You: "Update post 123 - add a conclusion section"
You: "Publish post 123"

Content Audit

You: "List all draft posts"
You: "Search posts for 'outdated'"
You: "What plugins are currently active?"

Bulk Operations

You: "Show me all posts with 'beta' in the title"
You: "Get the full content of post 45, 46, and 47"
You: "Move posts 45 and 46 to trash"

Environment Variables

Variable Required Description
WORDPRESS_URL Yes Your WordPress site URL (e.g., https://example.com)
WORDPRESS_USER Yes WordPress username
WORDPRESS_APP_PASSWORD Yes Application password (not your login password!)

Requirements

  • Python 3.10+
  • WordPress 5.6+ (for Application Passwords)
  • WordPress REST API enabled (default on most sites)

Troubleshooting

"Authentication failed"

  • Verify your Application Password is correct (no spaces)
  • Ensure the user has permission to access REST API
  • Check if a security plugin is blocking REST API

"Connection refused"

  • Verify WORDPRESS_URL includes https://
  • Check if your site is behind a firewall/VPN

Server not appearing in Claude Code

  • Run /mcp to see error messages
  • Test manually: cd wordpress-mcp && uv run wordpress-mcp
  • Restart Claude Code completely (/quit then claude)

Roadmap

  • [ ] Categories and tags management
  • [ ] User management
  • [ ] Custom post types support
  • [ ] Media upload
  • [ ] Comments management
  • [ ] WooCommerce integration

Contributing

Contributions welcome! Please open an issue first to discuss what you'd like to change.

License

MIT


Built with FastMCP and the WordPress REST API.

推荐服务器

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

官方
精选