
emzimmer/server-wp-mcp 是从 https://github.com/emzimmer/server-wp-mcp. 导入的 MCP 服务器候选
概览
emzimmer/server-wp-mcp 是从 https://github.com/emzimmer/server-wp-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
模型上下文协议(MCP)服务器,使 AI 助手能够通过 WordPress REST API 与 WordPress 网站交互。支持多个 WordPress 站点,并支持安全认证,支持内容管理、帖子操作和通过自然语言进行站点配置。
特色
- 多站点支持:同时连接多个WordPress站点
- REST API 集成:完全访问 WordPress REST API 端点
- 安全认证:使用应用密码进行安全 API 访问
- 动态端点发现:自动映射每个站点的可用端点
- 灵活操作:支持GET、POST、PUT、DELETE和PATCH方法。
- 错误处理:优雅的错误处理与有意义的消息
- 简单配置:易于维护的JSON配置文件
安装
通过Smithery安装
通过Smithery自动安装Claude Desktop的WordPress Server:
手动安装
工具参考
wp_discover_endpoints
映射WordPress网站上所有可用的REST API端点。
争论:
退货: 可用端点及其方法和命名空间列表。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
WordPress MCP Server
A Model Context Protocol (MCP) server that enables AI assistants to interact with WordPress sites through the WordPress REST API. Supports multiple WordPress sites with secure authentication, enabling content management, post operations, and site configuration through natural language.
Features
- Multi-Site Support: Connect to multiple WordPress sites simultaneously
- REST API Integration: Full access to WordPress REST API endpoints
- Secure Authentication: Uses application passwords for secure API access
- Dynamic Endpoint Discovery: Automatically maps available endpoints for each site
- Flexible Operations: Support for GET, POST, PUT, DELETE, and PATCH methods
- Error Handling: Graceful error handling with meaningful messages
- Simple Configuration: Easy-to-maintain JSON configuration file
Installation
Installing via Smithery
To install WordPress Server for Claude Desktop automatically via Smithery:
npx -y @smithery/cli install server-wp-mcp --client claude
Manual Installation
npm install server-wp-mcp
Tools Reference
wp_discover_endpoints
Maps all available REST API endpoints on a WordPress site.
Arguments:
{
"site": {
"type": "string",
"description": "Site alias (as defined in configuration)",
"required": true
}
}
Returns: List of available endpoints with their methods and namespaces.
wp_call_endpoint
Executes REST API requests to WordPress sites.
Arguments:
{
"site": {
"type": "string",
"description": "Site alias",
"required": true
},
"endpoint": {
"type": "string",
"description": "API endpoint path",
"required": true
},
"method": {
"type": "string",
"enum": ["GET", "POST", "PUT", "DELETE", "PATCH"],
"description": "HTTP method",
"default": "GET"
},
"params": {
"type": "object",
"description": "Request parameters or body data",
"required": false
}
}
Configuration
Getting an Application Password
- Log in to your WordPress admin dashboard
- Go to Users → Profile
- Scroll to the “Application Passwords” section
- Enter a name for the application (e.g., “MCP Server”)
- Click “Add New Application Password”
- Copy the generated password (you won’t be able to see it again)
Note: Application Passwords require WordPress 5.6 or later and HTTPS.
Configuration File Setup
Create a JSON configuration file (e.g., wp-sites.json) with your WordPress site details:
{
"myblog": {
"URL": "https://myblog.com",
"USER": "yourusername",
"PASS": "abcd 1234 efgh 5678"
},
"testsite": {
"URL": "https://test.example.com",
"USER": "anotherusername",
"PASS": "wxyz 9876 lmno 5432"
}
}
Each site configuration requires:
安装
npx -y @smithery/cli install server-wp-mcp --client claude配置
{
"mcpServers": {
"wordpress": {
"command": "node",
"args": ["path/to/server/dist/index.js"],
"env": {
"WP_SITES_PATH": "/absolute/path/to/wp-sites.json"
}
}
}
}