mattermost-mcp-server

mattermost-mcp-server

site icon
2025.03.28 0
TypeScriptMattermost 集成实时消息处理团队监控交流协作
mattermost-mcp-server 是一个为 Mattermost 集成设计的 Model Context Protocol (MCP) 服务器。它通过连接 Mattermost API 端点来检索和处理各种信息,并通过标准的 MCP 传输方式提供这些信息。
View on GitHub

Overview

基本能力

产品定位

mattermost-mcp-server 是一个为 Mattermost 集成设计的 MCP 服务器,主要用于实时处理和监控 Mattermost 中的团队和频道信息。

核心功能

  • 连接 Mattermost API 端点
  • 支持多种传输模式:
  • SSE (Server-Sent Events)
  • Standard I/O
  • 实时消息处理
  • 团队和频道特定监控
  • 基于令牌的安全认证

适用场景

  • 实时监控 Mattermost 团队和频道中的消息
  • 集成 Mattermost 数据到其他系统或服务中
  • 开发基于 Mattermost 的自动化工具或扩展功能

工具列表

  • npm run dev: 开发模式下启动服务器,支持热重载
  • npm run lint: 运行 ESLint
  • npm run format: 使用 Prettier 格式化代码
  • npm test: 运行测试
  • npm run inspect: 运行 MCP 检查器

常见问题解答

  • 如何获取 Mattermost 认证令牌? 需要在 Mattermost 服务器上生成一个个人访问令牌。
  • 如何指定监控的频道? 使用 --channels 参数,传入逗号分隔的频道名称列表。
  • 如何切换传输模式? 使用 --stdio 参数启用 Standard I/O 模式,否则默认使用 SSE 模式。

使用教程

使用依赖

  • Node.js >= 22
  • npm >= 10

安装教程

  1. 克隆仓库:
git clone https://github.com/kakehashi-inc/mattermost-mcp-server.git
cd mattermost-mcp-server
  1. 安装依赖:
npm install
  1. 构建服务器:
npm run build

调试方式

SSE 传输模式

npm start -- --endpoint="https://your-mattermost-server" \
            --token="your-mattermost-token" \
            --team-id="your-team-id" \
            --channels="channel1,channel2" \
            --port 8202

Standard I/O 传输模式

npm start -- --endpoint="https://your-mattermost-server" \
            --token="your-mattermost-token" \
            --team-id="your-team-id" \
            --channels="channel1,channel2" \
            --stdio

调试命令

  • npm run dev: 开发模式下启动服务器,支持热重载
  • npm test: 运行测试
  • npm run inspect: 运行 MCP 检查器

许可证

该项目遵循 MIT 开源许可条款,请参阅 MIT 了解完整条款。