Mattermost 机器人控制器协议(MCP)服务器为 Mattermost 系统提供了强大的机器人控制功能,可帮助用户更高效地管理和监控 Mattermost 平台,提升工作效率和管理便捷性。
若你想快速搭建并使用 Mattermost 机器人控制器协议(MCP)服务器,可按照以下步骤操作。
git clone https://github.com/mattermost/mattermost-mcp.git
cd mattermost-mcp
npm install
npm run build
创建一个 config.json 文件,内容如下:
{
"mattermostUrl": "https://your-mattermost-instance.com",
"teamId": "your-team-id",
"port": 3456,
"webRoot": "/path/to/webroot"
}
在项目根目录运行:
node build/index.js
将以下内容添加到 config.json:
{
"mattermostUrl": "https://my-mattermost-server.com",
"teamId": "T1234567890"
}
{
"mattermostUrl": "https://my-mattermost-server.com",
"teamId": "T1234567890",
"port": 3456,
"webRoot": "/var/www/mattermost-web"
}
在 claude_desktop_config.json 中添加:
{
"mcpServers": {
"mattermost": {
"command": "node",
"args": [
"/path/to/mattermost-mcp/build/index.js"
]
}
}
}
config.json 中。通过以下URL触发监控流程:
curl http://localhost:3456/run-monitoring
获取服务器和监控状态信息:
curl http://localhost:3456/status
使用此脚本通过HTTP端点触发监控:
./run-monitoring-http.sh
特点:
显示指定频道的最新消息:
node view-channel-messages.js
node view-channel-messages.js
示例:
node view-channel-messages.js general 10
提供频道消息的详细统计信息:
node analyze-channel.js
node analyze-channel.js
示例:
node analyze-channel.js announcements
显示可用命令和用法说明:
node utils/help.js
本项目遵循MIT许可证。