wpagent-mcp
wpagent-mcp
一个 MCP 服务器,让 Claude —— 或任何兼容 MCP 的客户端 —— 真正操作 WordPress 站点:插件、内容、主题、菜单、媒体、用户、WooCommerce、Elementor 和 WP-CLI。
它通过免费的 WpAgent 桥接插件,经 REST API 与你的站点通信,每个请求都使用 HMAC-SHA256 签名。不涉及任何站点凭据,也没有数据经过第三方服务:连接就是客户端 → 你的 WordPress,直连。
安装
无需提前安装任何东西 —— 下面的配置会按需获取它。
在你的 WordPress 站点上安装 WpAgent 插件并激活它。
在 WordPress 管理后台中,打开 WpAgent 并生成一个 API 密钥。选择你希望助手拥有的权限;只读密钥是稳妥的起步方式。
将服务器添加到你的 MCP 客户端。对于 Claude Desktop,在
claude_desktop_config.json中:
{
"mcpServers": {
"wpagent": {
"command": "npx",
"args": ["-y", "wpagent-mcp"],
"env": {
"WP_SITE_URL": "https://your-site.com",
"WP_API_KEY_ID": "wpaia_xxxxxxxxxxxx",
"WP_API_SECRET": "the secret shown once when you generated the key"
}
}
}
}对于 Claude Code:
claude mcp add wpagent \
--env WP_SITE_URL=https://your-site.com \
--env WP_API_KEY_ID=wpaia_xxxxxxxxxxxx \
--env WP_API_SECRET=... \
-- npx -y wpagent-mcp环境变量
变量 | 必需 | 说明 |
| 是 | 你站点的基础 URL,无尾部斜杠 |
| 是 | 插件中显示的密钥 ID |
| 是 | 密钥,生成时仅显示一次 |
| 否 | 一个友好名称;默认为主机名 |
Related MCP server: wp-mcp-control-server
它能做什么
区域 | 示例 |
插件 | 列出、搜索 wordpress.org、安装、激活、停用、更新、删除 |
内容 | 文章、页面、产品、任意自定义文章类型,支持元数据和特色图片 |
主题 | 列出、搜索、安装、激活、主题修改、自定义 CSS、标志、颜色 |
WooCommerce | 设置、订单、优惠券、配送区域、支付网关、税率、统计 |
结构 | 菜单、小工具、侧边栏、分类法、术语、重定向 |
媒体 | 浏览、上传、删除 |
用户与评论 | 列出、创建、更新、审核 |
审计 | 对安全性、SEO、性能进行最佳实践检查,支持自动修复 |
WP-CLI | 允许列表中的命令,默认关闭,除非在 |
它不会做什么
该 API 无法访问任意 PHP、无法访问你的数据库、也无法访问 wp-config.php。WP-CLI 执行处于禁用状态,除非站点所有者在服务器上添加 define('WPAIA_ENABLE_WPCLI', true);,即便如此,也只运行允许列表中的命令 —— db、eval、eval-file、shell、server、config 和 package 始终被拒绝。
安全性
每个请求都使用 HMAC-SHA256 签名并带有时间戳;超过五分钟的请求会被拒绝。
权限按密钥划分,并在每条路由上进行检查,因此只读密钥始终保持只读。
每次调用都会写入审计日志,你可以在 WordPress 管理后台中查看。
在 WordPress 中吊销密钥会立即生效。
在执行破坏性操作前,请让助手先确认,并保留一份最新备份 —— 当你要求时,它可以删除内容。
相关项目
WpAgent —— 基于同一桥接插件构建的托管仪表盘,提供免费的只读套餐
桥接插件采用 GPL-2.0-or-later 许可;本服务器采用 MIT 许可。
许可证
MIT © KipDev
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
FlicenseNot gradedqualityAmaintenanceProduction MCP server that runs as a WordPress plugin, exposing 40+ tools for managing posts, pages, custom post types, WooCommerce products, media, users, and menus from any MCP client. Includes API key + OAuth 2.0 authentication, rate limiting (60 req/min per IP), and activity logging. Free on WordPress.org9- FlicenseBqualityAmaintenanceMCP server that connects AI clients to WordPress for content management, site settings, Elementor editing, and more via a secure API.60
- FlicenseNot gradedqualityDmaintenanceEnables interaction with WordPress sites through the WordPress REST API, dynamically exposing all routes as MCP tools for content management and site configuration.
- AlicenseNot gradedqualityAmaintenanceProvides a secure MCP bridge to interact with WordPress sites via signed requests, scoped keys, and approval workflows.1GPL 2.0
Related MCP Connectors
Security-first WordPress MCP server. 129 tools for Claude, ChatGPT, Gemini. Free on wp.org.
WordPress MCP server: publish posts, AI images, SEO and full site management, self-hosted
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/THE-KIPDEV/wpagent-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server