
WordPress MCP Integration

2025.04.03
1
TypeScriptWordPress 集成内容管理内容生成
WordPress MCP Integration 是一个专注于 WordPress 集成的 Model Context Protocol (MCP) TypeScript SDK 精简版本。它通过 WordPress REST API 使用 MCP 协议与 WordPress 站点进行交互。主要功能包括创建、检索和更新 WordPress 文章。适用于需要自动化管理 WordPress 内容的场景。
View on GitHub
Overview
基本能力
产品定位
WordPress MCP Integration 是一个专注于 WordPress 集成的工具,通过 MCP 协议与 WordPress 站点进行交互,实现内容的自动化管理。
核心功能
- 创建新的 WordPress 文章
- 检索现有的 WordPress 文章
- 更新现有的 WordPress 文章
适用场景
- 自动化管理 WordPress 内容
- 批量创建或更新文章
- 集成 WordPress 内容管理到其他系统
工具列表
- create_post: 创建新的 WordPress 文章。
- 参数:
siteUrl
,username
,password
,title
,content
,status
- get_posts: 检索 WordPress 文章。
- 参数:
siteUrl
,username
,password
,perPage
,page
- update_post: 更新现有的 WordPress 文章。
- 参数:
siteUrl
,username
,password
,postId
,title
,content
,status
常见问题解答
- 安全问题: 建议使用 WordPress 应用密码而非主账户密码,可在 WordPress 仪表盘的 Users → Security → Application Passwords 中生成。
使用教程
使用依赖
- Node.js 18.0.0 或更高版本
- 启用 REST API 的 WordPress 站点
- 用于身份验证的 WordPress 应用密码
安装教程
- 克隆仓库
- 安装依赖:
npm install
配置方式
- 环境变量:
WORDPRESS_SITE_URL
: WordPress 站点 URLWORDPRESS_USERNAME
: WordPress 用户名WORDPRESS_PASSWORD
: WordPress 应用密码- 请求参数: 直接在调用工具时提供凭据。
调试方式
启动 WordPress MCP 服务器:
npm run server
默认在 stdio 上启动。要在特定端口(如 3000)上运行:
npm run server 3000