MCP Wordpress

平台与服务

by crunchtools

面向 WordPress 内容管理的安全 MCP 服务器,适合文章与站点内容操作。

什么是 MCP Wordpress

面向 WordPress 内容管理的安全 MCP 服务器,适合文章与站点内容操作。

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

ComponentName
GitHub repocrunchtools/mcp-wordpress
Containerquay.io/crunchtools/mcp-wordpress
Python package (PyPI)mcp-wordpress-crunchtools
CLI commandmcp-wordpress-crunchtools
Module importmcp_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)

bash
uvx mcp-wordpress-crunchtools

With pip

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

With Container

bash
# 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

bash
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:

VariableDescriptionExample
WORDPRESS_URLWordPress site URLhttps://example.com
WORDPRESS_USERNAMEWordPress usernameadmin
WORDPRESS_APP_PASSWORDApplication passwordxxxx xxxx xxxx xxxx
MCP_UPLOAD_DIRUpload 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)

bash
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

bash
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

bash
# 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

ToolDescription
wordpress_get_site_infoGet site title, description, URL, timezone
wordpress_test_connectionVerify API credentials work

Post Tools

ToolDescription
wordpress_list_postsList posts with filtering (status, category, search)
wordpress_get_postGet single post by ID with full content
wordpress_search_postsSearch posts by keyword
wordpress_create_postCreate new post (supports scheduling)
wordpress_update_postUpdate existing post
wordpress_delete_postDelete/trash a post
wordpress_list_revisionsList revisions for a post
wordpress_get_revisionGet specific revision content
wordpress_list_categoriesList available categories
wordpress_list_tagsList available tags

Page Tools

ToolDescription
wordpress_list_pagesList pages with filtering
wordpress_get_pageGet single page by ID
wordpress_create_pageCreate new page
wordpress_update_pageUpdate existing page
wordpress_delete_pageDelete/trash a page
wordpress_list_page_revisionsList page revisions

Media Tools

ToolDescription
wordpress_list_mediaList media items
wordpress_get_mediaGet media item details
wordpress_upload_mediaUpload file from local path
wordpress_update_mediaUpdate media metadata
wordpress_delete_mediaDelete media item
wordpress_get_media_urlGet public URL for media

Comment Tools

ToolDescription
wordpress_list_commentsList comments with filtering
wordpress_get_commentGet single comment
wordpress_create_commentAdd a comment to a post
wordpress_update_commentUpdate comment content/status
wordpress_delete_commentDelete a comment
wordpress_moderate_commentApprove, hold, spam, or trash

Examples

Create a Draft Post

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

Schedule a Post

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

Upload an Image

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

Find and Moderate Comments

code
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

bash
# 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 -->

常见问题

MCP Wordpress 是什么?

面向 WordPress 内容管理的安全 MCP 服务器,适合文章与站点内容操作。

相关 Skills

MCP构建

by anthropics

Universal
热门

聚焦高质量 MCP Server 开发,覆盖协议研究、工具设计、错误处理与传输选型,适合用 FastMCP 或 MCP SDK 对接外部 API、封装服务能力。

想让 LLM 稳定调用外部 API,就用 MCP构建:从 Python 到 Node 都有成熟指引,帮你更快做出高质量 MCP 服务器。

平台与服务
未扫描114.1k

Slack动图

by anthropics

Universal
热门

面向Slack的动图制作Skill,内置emoji/消息GIF的尺寸、帧率和色彩约束、校验与优化流程,适合把创意或上传图片快速做成可直接发送的Slack动画。

帮你快速做出适配 Slack 的动图,内置约束规则和校验工具,少踩上传与播放坑,做表情包和演示都更省心。

平台与服务
未扫描114.1k

MCP服务构建器

by alirezarezvani

Universal
热门

从 OpenAPI 一键生成 Python/TypeScript MCP server 脚手架,并校验 tool schema、命名规范与版本兼容性,适合把现有 REST API 快速发布成可生产演进的 MCP 服务。

帮你快速搭建 MCP 服务与后端 API,脚手架完善、扩展顺手,尤其适合想高效验证服务能力的开发者。

平台与服务
未扫描10.2k

相关 MCP Server

Slack 消息

编辑精选

by Anthropic

热门

Slack 是让 AI 助手直接读写你的 Slack 频道和消息的 MCP 服务器。

这个服务器解决了团队协作中需要 AI 实时获取 Slack 信息的痛点,特别适合开发团队让 Claude 帮忙汇总频道讨论或发送通知。不过,它目前只是参考实现,文档有限,不建议在生产环境直接使用——更适合开发者学习 MCP 如何集成第三方服务。

平台与服务
83.4k

by netdata

热门

io.github.netdata/mcp-server 是让 AI 助手实时监控服务器指标和日志的 MCP 服务器。

这个工具解决了运维人员需要手动检查系统状态的痛点,最适合 DevOps 团队让 Claude 自动分析性能数据。不过,它依赖 NetData 的现有部署,如果你没用过这个监控平台,得先花时间配置。

平台与服务
78.4k

by d4vinci

热门

Scrapling MCP Server 是专为现代网页设计的智能爬虫工具,支持绕过 Cloudflare 等反爬机制。

这个工具解决了爬取动态网页和反爬网站时的头疼问题,特别适合需要批量采集电商价格或新闻数据的开发者。不过,它依赖外部浏览器引擎,资源消耗较大,不适合轻量级任务。

平台与服务
35.4k

评论