Token导航 LogoToken导航TokenDH.com
Server Wp MCP logo
运维云端stdio官方级别未说明来源级核验

Server Wp MCP

MCP Server

@smithery/cli

一个通过WordPress REST API实现AI助手与WordPress站点交互的MCP服务器,支持多站点管理、安全认证和自然语言操作。

工具数

0

提示词数

0

GitHub Stars

115

资源数

0
知识管理DockerClaudeAPI集成Claude DesktopClaude

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

emzimmer

提供方

emzimmer

最后核验

2026/5/17 20:21

运行时

Node.js

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

npx -y @smithery/cli install server-wp-mcp --client claude

详细介绍

WordPress MCP服务器

](https://smithery.ai/server/server-wp-mcp)

A. 模型上下文协议(MCP) 使人工智能助手能够通过WordPress REST API与WordPress网站交互的服务器。支持多个具有安全身份验证的WordPress网站,通过自然语言实现内容管理、帖子操作和网站配置。

特性

  • 多站点支持:同时连接到多个WordPress网站
  • REST API集成完全访问 WordPress REST API 端点
  • 安全认证:使用应用程序密码进行安全的API访问
  • 动态端点发现:自动映射每个站点的可用端点
  • 灵活操作:支持GET、POST、PUT、DELETE和PATCH方法
  • 错误处理:通过有意义的消息进行优雅的错误处理
  • 简单配置:易于维护的JSON配置文件

安装

通过Smithery安装

通过以下方式自动安装Claude Desktop的WordPress服务器 史密瑟里:

npx -y @smithery/cli install server-wp-mcp --client claude

手动安装

npm install server-wp-mcp

工具参考

wp_discover_endpoints

映射WordPress网站上的所有可用REST API端点。

论据:

{
	"site": {
		"type": "string",
		"description": "Site alias (as defined in configuration)",
		"required": true
	}
}

退货: 可用终结点及其方法和命名空间的列表。

wp_call_endpoint

执行对WordPress网站的REST API请求。

论据:

{
	"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
	}
}

配置

获取应用程序密码

  1. 登录您的WordPress管理仪表板
  2. 转到用户→ 个人资料
  3. 滚动到“应用程序密码”部分
  4. 输入应用程序的名称(例如“MCP服务器”)
  5. 点击“添加新应用程序密码”
  6. 复制生成的密码(您将无法再次看到它)

注意:应用程序密码需要WordPress 5.6或更高版本和HTTPS。

配置文件设置

创建JSON配置文件(例如。, wp-sites.json)您的WordPress网站详细信息:

{
	"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"
	}
}

每个站点配置都需要:

  • URL:WordPress网站URL(必须包含http://或https://)
  • USER:WordPress用户名
  • PASS:应用程序密码(空格将自动删除)

配置键(例如“myblog”、“testsite”)将成为您在与服务器交互时使用的站点别名。

使用Claude Desktop

添加到您的 claude_desktop_config.json:

{
	"mcpServers": {
		"wordpress": {
			"command": "node",
			"args": ["path/to/server/dist/index.js"],
			"env": {
				"WP_SITES_PATH": "/absolute/path/to/wp-sites.json"
			}
		}
	}
}

WP_SITES_PATH 环境变量必须指向配置文件的绝对路径。

示例用法

配置后,您可以要求Claude执行各种WordPress操作:

列表和查询帖子

Can you show me all posts from myblog published in the last month?
Find all posts on testsite tagged with "technology" and "AI"
Show me draft posts from myblog that need review

创建和编辑内容

Create a new draft post on testsite titled "The Future of AI" with these key points: [points]
Update the featured image on myblog's latest post about machine learning
Add a new category called "Tech News" to myblog

管理评论

Show me all pending comments on myblog's latest post
Find comments from testsite that might be spam
List the most engaged commenters on myblog

插件管理

What plugins are currently active on myblog?
Check if any plugins on testsite need updates
Tell me about the security plugins installed on myblog

用户管理

Show me all users with editor role on testsite
Create a new author account on myblog
Update user roles and permissions on testsite

站点设置和配置

What theme is currently active on myblog?
Check the permalink structure on testsite
Show me the current media library settings on myblog

维护和诊断

Check if there are any broken links on myblog
Show me the PHP version and other system info for testsite
List any pending database updates on myblog

错误处理

服务器处理常见错误,包括:

  • 配置文件路径或格式无效
  • 站点配置无效
  • 身份验证失败
  • 端点缺失或无效
  • API速率限制
  • 网络错误

所有错误都会返回描述性消息,以帮助诊断问题。

安全考虑

  • 保持你的 wp-sites.json 文件安全,从不将其提交到版本控制
  • 考虑在生产中为敏感数据使用环境变量
  • 将配置文件存储在公共目录之外
  • 对所有WordPress网站使用HTTPS
  • 定期轮换应用程序密码
  • 分配用户角色时遵循最小权限原则

依赖项

  • @modelcontextprotocol/sdk-MCP协议实现
  • axios-API请求的HTTP客户端

许可证

麻省理工学院

目录标签

目录标签

知识管理DockerClaudeAPI集成Dockerfile本地部署WordPress管理RESTAPI多站点支持内容管理AI集成

支持客户端

Claude DesktopClaude

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

运行时(runtime,运行环境)

Node.js

部署方式(deploymentType,部署类型)

remote-capable

来源包(packageName,安装包名)

@smithery/cli

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononeremote-capable

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP