MCP WordPress CrunchTools

MCP WordPress CrunchTools

A secure MCP server for WordPress content management, enabling posts, pages, media, and comment operations through natural language.

Category
访问服务器

README

MCP WordPress CrunchTools

A secure MCP (Model Context Protocol) server for WordPress content management. Designed for developers publishing about their work.

Overview

This MCP server is designed to be:

  • Secure by default - Comprehensive input validation, credential protection, and SSRF prevention
  • No third-party services - Runs locally via stdio, your credentials never leave your machine
  • Cross-platform - Works on Linux, macOS, and Windows
  • Automatically updated - GitHub Actions monitor for CVEs and update dependencies
  • Containerized - Available at quay.io/crunchtools/mcp-wordpress

Naming Convention

Component Name
GitHub repo crunchtools/mcp-wordpress
Container quay.io/crunchtools/mcp-wordpress
Python package (PyPI) mcp-wordpress-crunchtools
CLI command mcp-wordpress-crunchtools
Module import mcp_wordpress_crunchtools

Features

  • 30 Tools for posts, pages, media, and comments
  • Security-focused: Credentials protected, input validation, SSRF prevention
  • Developer workflow: Scheduled publishing, revisions, search
  • Easy integration: Works with Claude Code and other MCP clients

Installation

With uvx (recommended)

uvx mcp-wordpress-crunchtools

With pip

pip install mcp-wordpress-crunchtools
mcp-wordpress-crunchtools

With Container

# Create a shared upload directory (required before first run)
mkdir -p ~/.local/share/mcp-uploads-downloads

podman run -v ~/.local/share/mcp-uploads-downloads:/tmp/mcp-uploads:z \
  -e WORDPRESS_URL=https://example.com \
  -e WORDPRESS_USERNAME=admin \
  -e WORDPRESS_APP_PASSWORD='xxxx xxxx xxxx xxxx' \
  quay.io/crunchtools/mcp-wordpress

SELinux note: Use :z (lowercase, shared) instead of :Z (uppercase, private). MCP servers run as long-lived stdio processes. With :Z, files copied into the directory after container start won't have the container's private MCS label and will be invisible inside the container. The :z flag sets a shared container_file_t context that all containers and the host can read/write.

Tip: Use the same shared directory (~/.local/share/mcp-uploads-downloads/) across multiple MCP container servers (e.g., mcp-wordpress and mcp-gemini) so generated files are immediately available for upload without copying.

From source

git clone https://github.com/crunchtools/mcp-wordpress.git
cd mcp-wordpress
uv sync --all-extras
uv run mcp-wordpress-crunchtools

Configuration

Set these environment variables:

Variable Description Example
WORDPRESS_URL WordPress site URL https://example.com
WORDPRESS_USERNAME WordPress username admin
WORDPRESS_APP_PASSWORD Application password xxxx xxxx xxxx xxxx
MCP_UPLOAD_DIR Upload directory inside container (optional) /tmp/mcp-uploads (default)

Creating an Application Password

  1. Log in to WordPress admin
  2. Go to Users → Profile
  3. Scroll to Application Passwords
  4. Enter a name (e.g., "MCP Server") and click Add New
  5. Copy the generated password (shown once)

Usage with Claude Code

Using uvx (recommended)

claude mcp add mcp-wordpress-crunchtools \
    --env WORDPRESS_URL=https://example.com \
    --env WORDPRESS_USERNAME=admin \
    --env WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx" \
    -- uvx mcp-wordpress-crunchtools

Using pip

pip install mcp-wordpress-crunchtools

claude mcp add mcp-wordpress-crunchtools \
    --env WORDPRESS_URL=https://example.com \
    --env WORDPRESS_USERNAME=admin \
    --env WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx" \
    -- mcp-wordpress-crunchtools

Using Container

# Create a shared upload directory (required before first run)
mkdir -p ~/.local/share/mcp-uploads-downloads

claude mcp add mcp-wordpress-crunchtools \
    --env WORDPRESS_URL=https://example.com \
    --env WORDPRESS_USERNAME=admin \
    --env WORDPRESS_APP_PASSWORD="xxxx xxxx xxxx xxxx" \
    -- podman run -i --rm \
        -v ~/.local/share/mcp-uploads-downloads:/tmp/mcp-uploads:z \
        -e WORDPRESS_URL \
        -e WORDPRESS_USERNAME \
        -e WORDPRESS_APP_PASSWORD \
        quay.io/crunchtools/mcp-wordpress

Available Tools

Site Tools

Tool Description
wordpress_get_site_info Get site title, description, URL, timezone
wordpress_test_connection Verify API credentials work

Post Tools

Tool Description
wordpress_list_posts List posts with filtering (status, category, search)
wordpress_get_post Get single post by ID with full content
wordpress_search_posts Search posts by keyword
wordpress_create_post Create new post (supports scheduling)
wordpress_update_post Update existing post
wordpress_delete_post Delete/trash a post
wordpress_list_revisions List revisions for a post
wordpress_get_revision Get specific revision content
wordpress_list_categories List available categories
wordpress_list_tags List available tags

Page Tools

Tool Description
wordpress_list_pages List pages with filtering
wordpress_get_page Get single page by ID
wordpress_create_page Create new page
wordpress_update_page Update existing page
wordpress_delete_page Delete/trash a page
wordpress_list_page_revisions List page revisions

Media Tools

Tool Description
wordpress_list_media List media items
wordpress_get_media Get media item details
wordpress_upload_media Upload file from local path
wordpress_update_media Update media metadata
wordpress_delete_media Delete media item
wordpress_get_media_url Get public URL for media

Comment Tools

Tool Description
wordpress_list_comments List comments with filtering
wordpress_get_comment Get single comment
wordpress_create_comment Add a comment to a post
wordpress_update_comment Update comment content/status
wordpress_delete_comment Delete a comment
wordpress_moderate_comment Approve, hold, spam, or trash

Examples

Create a Draft Post

Create a new WordPress post titled "My Technical Article" with the content below. Keep it as a draft.

Schedule a Post

Update post ID 123 to publish on December 25, 2024 at 10:00 AM.

Upload an Image

Upload this image to WordPress and set the alt text to "Architecture diagram".

Find and Moderate Comments

List all comments in "hold" status and approve the legitimate ones.

Security

  • Credential Protection: All credentials stored as SecretStr, never logged
  • SSRF Prevention: REST API path hardcoded, cannot be overridden
  • Input Validation: All inputs validated via Pydantic models
  • Rate Limiting: Handles WordPress rate limits gracefully
  • TLS Enforcement: All requests use HTTPS with certificate validation
  • Size Limits: Response size limited to 10MB to prevent memory issues
  • Timeout: All requests timeout after 30 seconds

Development

# Install dev dependencies
uv sync --all-extras

# Run tests
uv run pytest

# Run linting
uv run ruff check src tests

# Run type checking
uv run mypy src

# Format code
uv run ruff format src tests

License

AGPL-3.0-or-later

Credits

Built by crunchtools.com

<!-- mcp-name: io.github.crunchtools/wordpress -->

推荐服务器

Baidu Map

Baidu Map

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

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

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

官方
精选
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

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

官方
精选
本地
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

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

官方
精选
本地
TypeScript
VeyraX

VeyraX

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

官方
精选
本地
Kagi MCP Server

Kagi MCP Server

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

官方
精选
Python
graphlit-mcp-server

graphlit-mcp-server

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

官方
精选
TypeScript
Exa MCP Server

Exa MCP Server

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

官方
精选
mcp-server-qdrant

mcp-server-qdrant

这个仓库展示了如何为向量搜索引擎 Qdrant 创建一个 MCP (Managed Control Plane) 服务器的示例。

官方
精选
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选