@lichao176/mcp-wsmonitor
v1.0.0
Published
MCP server for Mattermost WebSocket monitoring (wsmonitor). Supports local/pre/prod environments.
Maintainers
Readme
@anthropic-cses/mcp-wsmonitor
Mattermost WebSocket 监控 MCP 服务。为 AI 助手(Claude Code 等)提供实时 WebSocket 系统状态查询能力。
快速使用
在 .mcp.json 或 Claude Code 配置中添加:
{
"mcpServers": {
"wsmonitor": {
"command": "npx",
"args": ["-y", "@anthropic-cses/mcp-wsmonitor@latest", "--env", "local"]
}
}
}环境配置
通过 --env 参数指定目标环境:
| 环境 | 参数 | 目标地址 |
|------|------|----------|
| 本地开发 | --env local | http://localhost:8065 |
| 预发布 | --env pre | http://api-im-pre.jinqidongli.com |
| 生产环境 | --env prod | http://api-im.jinqidongli.com |
自定义地址(覆盖 --env):
{
"args": ["-y", "@anthropic-cses/mcp-wsmonitor@latest", "--base-url", "http://your-server:8065"]
}多环境配置示例
{
"mcpServers": {
"wsmonitor-local": {
"command": "npx",
"args": ["-y", "@anthropic-cses/mcp-wsmonitor@latest", "--env", "local"]
},
"wsmonitor-pre": {
"command": "npx",
"args": ["-y", "@anthropic-cses/mcp-wsmonitor@latest", "--env", "pre"]
},
"wsmonitor-prod": {
"command": "npx",
"args": ["-y", "@anthropic-cses/mcp-wsmonitor@latest", "--env", "prod"]
}
}
}提供的 MCP 工具
| 工具 | 说明 |
|------|------|
| wsmonitor_snapshot | 实时系统快照(连接数、Hub 状态、Top 排行) |
| wsmonitor_events | 历史广播事件查询(ES) |
| wsmonitor_connections | 连接/断连事件历史(ES) |
| wsmonitor_throughput | 时序吞吐量聚合(ES) |
| wsmonitor_hub_status | Hub 详细状态 |
提供的 MCP 资源
| 资源 URI | 说明 |
|----------|------|
| wsmonitor://status | 系统状态概要(文本格式) |
要求
- Node.js >= 16
- Mattermost 服务需开启 wsmonitor 模块
