MCP Wordpress

io.github.crunchtools由 GitHub 帳號 crunchtools 發布v0.4.1更新於 Nov 3, 2026

Secure MCP server for WordPress content management

已驗證STDIO僅桌面檔案與儲存商業與電商

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理透過 REST API 管理 WordPress 網站的文章、頁面、媒體與留言。

可以做什麼
  • 讀取網站資訊並驗證設定的憑證是否可用
  • 列出、搜尋、讀取、建立、更新、編輯、排程發布與刪除文章,以及分類、標籤與修訂版本
  • 列出、讀取、建立、更新、編輯與刪除頁面,並列出頁面修訂
  • 列出、讀取、上傳、更新與刪除媒體項目,並取得其公開網址
  • 列出、讀取、建立、更新、刪除與審核留言
適用情境
適合在自有 WordPress 網站上發布工作內容的開發者,讓助理起草、排程發布、編輯或審核內容,不必來回複製文章。編輯類工具與可選的 expected_version 檢查適合對既有內容做謹慎、局部的修改。
執行需求
以 Python 套件(uvx 或 pip)或容器映像在本機透過 stdio 執行。需要環境變數 WORDPRESS_URL、WORDPRESS_USERNAME 與 WORDPRESS_APP_PASSWORD,並在 WordPress 使用者設定中建立應用程式密碼。可選 MCP_UPLOAD_DIR 指定上傳目錄;需要能連線至該網站的網路。
安裝前請注意
需要存放在 WORDPRESS_APP_PASSWORD 的 WordPress 應用程式密碼,該密碼具備網站寫入權限;README 表示憑證只留在本機且不會被記錄。許多工具會建立、更新、刪除或審核內容,上傳功能會讀取本機路徑的檔案,執行前請確認操作。刪除文章、頁面、媒體或留言會改動線上網站資料。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 MCP Wordpress,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 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 - 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

  • 33 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-crunchtoolsmcp-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.gitcd mcp-wordpressuv sync --all-extrasuv 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

Editing Model

Reads return the source the editor saved (context=edit), never the rendered page, so what an agent reads is safe to write back. Changes go through the edit_* tools: the agent sends the exact text to replace and its replacement, the server applies it to the current source, and the post never round-trips through the agent. The post and page update and edit tools take an optional expected_version (the version get_post or get_page returned); when it is given, the write is refused if the item changed since. update_* refuses content that is rendered output. edit_draft edits only draft or pending posts, so a gateway can grant revision rights without the power to change published posts.

Post Tools

ToolDescription
wordpress_list_postsList posts with filtering (status, category, search)
wordpress_get_postGet single post by ID with its saved source (block markup included) and version
wordpress_search_postsSearch posts by keyword
wordpress_create_postCreate new post (supports scheduling)
wordpress_update_postUpdate existing post; refuses rendered HTML, and a stale expected_version when given
wordpress_edit_postReplace text in a post's source without resending the post
wordpress_edit_draftSame as edit_post, for draft or pending posts only; refuses any other status
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 with its saved source and version
wordpress_create_pageCreate new page
wordpress_update_pageUpdate existing page; refuses rendered HTML, and a stale expected_version when given
wordpress_edit_pageReplace text in a page's source without resending the 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

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

bash
# Install dev dependenciesuv sync --all-extras
# Run testsuv run pytest
# Run lintinguv run ruff check src tests
# Run type checkinguv run mypy src
# Format codeuv run ruff format src tests

License

AGPL-3.0-or-later

Credits

Built by crunchtools.com

來源:README.md,提交 671b7a2

工具

0
SourceWeft 尚未在沙箱中啟動過該軟體包,因此其工具未知。

版本歷史

1
  1. v0.4.1最新Sep 16, 2026

評分

已滿足適用檢查項的 50%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分