JS

jagan-shanmugam/mattermost-mcp-host

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

34 stars 16 forks 质量 46 趋势 12MIT

jagan-shanmugam/mattermost-mcp-host 是从 https://github.com/jagan-shanmugam/mattermost-mcp-host. 导入的 MCP 服务器候选。

概览

jagan-shanmugam/mattermost-mcp-host 是从 https://github.com/jagan-shanmugam/mattermost-mcp-host. 导入的 MCP 服务器候选。

概述(AI 翻译)

Mattermost 集成,连接模型上下文协议(MCP)服务器,利用基于 LangGraph 的 AI 代理,提供智能界面,直接在 Mattermost 内与用户交互和执行工具。

演示

1.支持频道中的Github代理——搜索现有问题和PR,如果找不到会创建新问题

2.在网上搜索并使用 Mattermost-MCP-server 发布到频道

在下方滚动查看YouTube上的完整演示

特色

  • 🤖 Langgraph代理集成:使用LangGraph代理理解用户请求并协调响应。
  • 🔌 MCP 服务器集成:连接多个定义在 mcp-servers.json 中的 MCP 服务器。
  • 🛠️ 动态工具加载:自动从连接的MCP服务器中发现工具并向AI代理开放。将MCP工具转换为langchain结构化工具。
  • 💬 线程感知对话:在Mattermost线程内保持对话上下文,确保互动连贯。
  • 🔄 智能工具使用:AI代理可以决定何时使用可用工具(包括串联多重呼叫)以满足用户请求。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Mattermost MCP Host

A Mattermost integration that connects to Model Context Protocol (MCP) servers, leveraging a LangGraph-based AI agent to provide an intelligent interface for interacting with users and executing tools directly within Mattermost.

Demo

1. Github Agent in support channel - searches the existing issues and PRs and creates a new issue if not found

2. Search internet and post to a channel using Mattermost-MCP-server

Scroll below for full demo in YouTube

Features

  • 🤖 Langgraph Agent Integration: Uses a LangGraph agent to understand user requests and orchestrate responses.
  • 🔌 MCP Server Integration: Connects to multiple MCP servers defined in mcp-servers.json.
  • 🛠️ Dynamic Tool Loading: Automatically discovers tools from connected MCP servers and makes them available to the AI agent. Converts MCP tools to langchain structured tools.
  • 💬 Thread-Aware Conversations: Maintains conversational context within Mattermost threads for coherent interactions.
  • 🔄 Intelligent Tool Use: The AI agent can decide when to use available tools (including chaining multiple calls) to fulfill user requests.
  • 🔍 MCP Capability Discovery: Allows users to list available servers, tools, resources, and prompts via direct commands.
  • #️⃣ Direct Command Interface: Interact directly with MCP servers using a command prefix (default: #).

Overview

The integration works as follows:

  1. Mattermost Connection (mattermost_client.py): Connects to the Mattermost server via API and WebSocket to listen for messages in a specified channel.
  2. MCP Connections (mcp_client.py): Establishes connections (primarily stdio) to each MCP server defined in src/mattermost_mcp_host/mcp-servers.json. It discovers available tools on each server.
  3. Agent Initialization (agent/llm_agent.py): A LangGraphAgent is created, configured with the chosen LLM provider and the dynamically loaded tools from all connected MCP servers.
  4. Message Handling (main.py):
    • If a message starts with the command prefix (#), it’s parsed as a direct command to list servers/tools or call a specific tool via the corresponding MCPClient.
    • Otherwise, the message (along with thread history) is passed to the LangGraphAgent.
  5. Agent Execution: The agent processes the request, potentially calling one or more MCP tools via the MCPClient instances, and generates a response.
  6. Response Delivery: The final response from the agent or command execution is posted back to the appropriate Mattermost channel/thread.

Setup

在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →