pushplus-hxtrip-mcp-server
v1.0.0
Published
MCP server for sending notifications via PushPlus (hxtrip)
Maintainers
Readme
PushPlus MCP Server
基于 Node.js 与 Model Context Protocol 实现的 PushPlus 消息推送服务端
允许 AI 助手通过 http://pushplus.hxtrip.com/send 接口向指定微信或企业微信用户发送实时通知消息
🚀 特性
- 即开即用:标准 MCP Stdio 服务,兼容所有支持 MCP 协议的客户端
- 灵活的 Token 策略:
- 支持在客户端全局环境变量配置
PUSHPLUS_TOKEN,对话时无需重复指定 Token - 也支持单次调用时通过参数临时覆盖或传递
token
- 支持在客户端全局环境变量配置
- 模板支持:支持
html与json两种消息模板,默认使用html - 健壮性保障:完整的错误捕获、HTTP 状态码及 PushPlus 业务返回码解析,标准输出隔离防止影响 JSON-RPC 通信
🛠️ 提供的工具
本服务注册了两个功能一致的工具:
send_pushplus_messagesend_message
参数说明
| 参数名 | 类型 | 必填 | 默认值 | 描述 |
| :--------- | :------- | :----- | :---------- | :--------------------------------------------------------- |
| content | string | 是 | - | 具体消息内容,根据不同模板支持对应格式 |
| title | string | 否 | undefined | 消息标题 |
| template | string | 否 | "html" | 消息模板,支持 "html" 或 "json",默认为 "html" |
| token | string | 否 | 环境变量 | PushPlus 用户令牌。若未传,将读取环境变量 PUSHPLUS_TOKEN |
📦 本地构建与安装
克隆或进入项目目录:
cd pushplus-hxtrip-mcp-server安装依赖:
npm install编译项目:
npm run build编译后产物位于
dist/index.js
⚙️ 客户端配置指南
通过 NPX 运行
无需本地克隆和构建,直接通过 npx 即可运行:
{
"mcpServers": {
"pushplus": {
"command": "npx",
"args": ["-y", "pushplus-hxtrip-mcp-server"],
"env": {
"PUSHPLUS_TOKEN": "你的 PushPlus Token"
}
}
}
}💡 使用示例
配置完成后,您可以直接对 AI 说:
- “帮我发一条 PushPlus 消息,提醒我今天下午3点有架构评审会议,标题为‘会议提醒’。”
- “将今天的构建结果以 JSON 格式推送给我:{ "status": "success", "commit": "a1b2c3d" },使用 json 模板。”
- “发送一条消息‘测试消息’,使用 token: xxx。”
AI 将会自动调用 send_pushplus_message 工具完成推送
📄 接口对照
本 MCP Server 对接的原始接口定义:
- URL:
http://pushplus.hxtrip.com/send - Method:
POST - Content-Type:
application/json - Body:
{ "token": "用户令牌", "title": "消息标题", "content": "具体消息内容", "template": "html" }
📜 开源协议
本项目基于 GPL-3.0 协议开源
