MCP WordPress CrunchTools
MCP WordPress CrunchTools
一个用于 WordPress 内容管理的安全 MCP(模型上下文协议)服务器。专为发布其工作内容的开发者设计。
概述
该 MCP 服务器设计为:
默认安全 - 全面的输入验证、凭据保护和 SSRF 防护
无第三方服务 - 通过 stdio 在本地运行,您的凭据永远不会离开您的机器
跨平台 - 支持 Linux、macOS 和 Windows
自动更新 - GitHub Actions 监控 CVE 并更新依赖
容器化 - 可在
quay.io/crunchtools/mcp-wordpress获取
Related MCP server: TypeScript WordPress MCP Server
命名约定
组件 | 名称 |
GitHub 仓库 | |
容器 |
|
Python 包(PyPI) |
|
CLI 命令 |
|
模块导入 |
|
功能特性
30 个工具,用于文章、页面、媒体和评论
安全优先:凭据保护、输入验证、SSRF 防护
开发者工作流:定时发布、修订版本、搜索
易于集成:兼容 Claude Code 和其他 MCP 客户端
安装
使用 uvx(推荐)
uvx mcp-wordpress-crunchtools使用 pip
pip install mcp-wordpress-crunchtools
mcp-wordpress-crunchtools使用容器
# 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-wordpressSELinux 说明: 使用
:z(小写,共享)而不是:Z(大写,私有)。 MCP 服务器作为长期运行的 stdio 进程运行。使用:Z时,容器启动后复制到 目录中的文件不具有容器的私有 MCS 标签,因此在容器内不可见。:z标志设置一个共享的container_file_t上下文,所有容器和宿主机都可以读写该上下文。提示: 在多个 MCP 容器服务器(例如 mcp-wordpress 和 mcp-gemini)之间使用相同的共享目录(
~/.local/share/mcp-uploads-downloads/), 这样生成的文件无需复制即可立即用于上传。
从源码构建
git clone https://github.com/crunchtools/mcp-wordpress.git
cd mcp-wordpress
uv sync --all-extras
uv run mcp-wordpress-crunchtools配置
设置以下环境变量:
变量 | 描述 | 示例 |
| WordPress 站点 URL |
|
| WordPress 用户名 |
|
| 应用程序密码 |
|
| 容器内上传目录(可选) |
|
创建应用程序密码
登录 WordPress 管理后台
转到用户 → 个人资料
滚动到应用程序密码
输入名称(例如“MCP Server”),然后点击添加
复制生成的密码(仅显示一次)
与 Claude Code 一起使用
使用 uvx(推荐)
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使用 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使用容器
# 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可用工具
站点工具
工具 | 描述 |
| 获取站点标题、描述、URL、时区 |
| 验证 API 凭据是否有效 |
文章工具
工具 | 描述 |
| 使用筛选条件列出文章(状态、分类、搜索) |
| 按 ID 获取单篇文章及完整内容 |
| 按关键词搜索文章 |
| 创建新文章(支持定时发布) |
| 更新现有文章 |
| 删除/移至回收站一篇文章 |
| 列出一篇文章的修订版本 |
| 获取特定修订版本的内容 |
| 列出可用分类 |
| 列出可用标签 |
页面工具
工具 | 描述 |
| 使用筛选条件列出页面 |
| 按 ID 获取单个页面 |
| 创建新页面 |
| 更新现有页面 |
| 删除/移至回收站一个页面 |
| 列出页面修订版本 |
媒体工具
工具 | 描述 |
| 列出媒体项目 |
| 获取媒体项目详情 |
| 从本地路径上传文件 |
| 更新媒体元数据 |
| 删除媒体项目 |
| 获取媒体的公共 URL |
评论工具
工具 | 描述 |
| 使用筛选条件列出评论 |
| 获取单条评论 |
| 向文章添加评论 |
| 更新评论内容/状态 |
| 删除评论 |
| 批准、保留、标记垃圾或删除 |
示例
创建草稿文章
Create a new WordPress post titled "My Technical Article" with the content below. Keep it as a draft.定时发布文章
Update post ID 123 to publish on December 25, 2024 at 10:00 AM.上传图片
Upload this image to WordPress and set the alt text to "Architecture diagram".查找并审核评论
List all comments in "hold" status and approve the legitimate ones.安全性
凭据保护:所有凭据以
SecretStr存储,绝不记录日志SSRF 防护:REST API 路径为硬编码,无法覆盖
输入验证:所有输入均通过 Pydantic 模型验证
速率限制:优雅处理 WordPress 速率限制
TLS 强制:所有请求均使用带证书验证的 HTTPS
大小限制:响应大小限制为 10MB,防止内存问题
超时:所有请求在 30 秒后超时
开发
# 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许可证
AGPL-3.0-or-later
致谢
由 crunchtools.com 构建
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA lightweight MCP server that connects to WordPress via REST API, enabling content management (posts, pages, categories, etc.) and site configuration through natural language commands.Apache 2.0
- Alicense-qualityDmaintenanceMCP server for WordPress content management that provides a secure interface for AI assistants to interact with WordPress sites, enabling content creation, editing, and media management without destructive operations.MIT
- Alicense-qualityBmaintenanceAn MCP server that enables safe reconnaissance, mutation, and verification of WordPress sites through guarded, typed verbs with dry-run previews and change-packet audit records.MIT
- Flicense-qualityDmaintenanceA Model Context Protocol (MCP) server that bridges AI assistants to WordPress, enabling natural-language management of posts, pages, media, comments, users, plugins, and settings across multiple sites simultaneously.
Related MCP Connectors
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
WordPress MCP server: generate SEO posts, AI images, autoblog & WooCommerce on your self-hosted site
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/crunchtools/mcp-wordpress'
If you have feedback or need assistance with the MCP directory API, please join our Discord server