SM 

sooperset/mcp-client-slackbot 是从 https://github.com/sooperset/mcp-client-slackbot. 导入的 MCP 服务器候选
概览
sooperset/mcp-client-slackbot 是从 https://github.com/sooperset/mcp-client-slackbot. 导入的 MCP 服务器候选
概述(AI 翻译)
一个简单的Slack机器人,使用模型上下文协议(MCP)来增强其外部工具的能力。
特色
- AI驱动助手:利用LLM功能响应频道和私信中的消息
- MCP 集成:完全访问 SQLite 数据库和网页取用等 MCP 工具
- 多LLM支持:支持OpenAI、Groq和Anthropic模型
- 应用主页标签页:显示可用工具和使用信息
布置
1.创建一个 Slack 应用
- 进入 api.slack.com/apps 并点击“创建新应用”
- 选择“从应用清单”,选择你的工作区
- 将
mcp_simple_slackbot/manifest.yaml的内容复制到清单编辑器中 - 创建应用并安装到你的工作区
- 在“基本信息”部分,向下滚动至“应用级代币”
- 点击“生成令牌和范围”,然后:
- 输入类似“mcp-assistant”这样的名称
- 添加
connections:write作用域 - 点击“生成”
- 注意你两人:
- 机器人令牌(
xoxb-...),见于“OAuth & Permissions” - 你刚刚生成的应用令牌(
xapp-...)
2.安装依赖
3.配置环境变量
创建一个“。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
MCP Simple Slackbot
A simple Slack bot that uses the Model Context Protocol (MCP) to enhance its capabilities with external tools.
Features
- AI-Powered Assistant: Responds to messages in channels and DMs using LLM capabilities
- MCP Integration: Full access to MCP tools like SQLite database and web fetching
- Multi-LLM Support: Works with OpenAI, Groq, and Anthropic models
- App Home Tab: Shows available tools and usage information
Setup
1. Create a Slack App
- Go to api.slack.com/apps and click “Create New App”
- Choose “From an app manifest” and select your workspace
- Copy the contents of
mcp_simple_slackbot/manifest.yamlinto the manifest editor - Create the app and install it to your workspace
- Under the “Basic Information” section, scroll down to “App-Level Tokens”
- Click “Generate Token and Scopes” and:
- Enter a name like “mcp-assistant”
- Add the
connections:writescope - Click “Generate”
- Take note of both your:
- Bot Token (
xoxb-...) found in “OAuth & Permissions” - App Token (
xapp-...) that you just generated
- Bot Token (
2. Install Dependencies
# Create a virtual environment
python -m venv venv
# Activate the virtual environment
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install project dependencies
pip install -r mcp_simple_slackbot/requirements.txt
3. Configure Environment Variables
Create a .env file in the mcp_simple_slackbot directory (see .env.example for a template):
# Slack API credentials
SLACK_BOT_TOKEN=xoxb-your-token
SLACK_APP_TOKEN=xapp-your-token
# LLM API credentials
OPENAI_API_KEY=sk-your-openai-key
# or use GROQ_API_KEY or ANTHROPIC_API_KEY
# LLM configuration
LLM_MODEL=gpt-4-turbo
Running the Bot
# Navigate to the module directory
cd mcp_simple_slackbot
# Run the bot directly
python main.py
The bot will:
- Connect to all configured MCP servers
- Discover available tools
- Start the Slack app in Socket Mode
- Listen for mentions and direct messages
Usage
- Direct Messages: Send a direct message to the bot
- Channel Mentions: Mention the bot in a channel with
@MCP Assistant - App Home: Visit the bot’s App Home tab to see available tools
Architecture
The bot is designed with a focused architecture:
- SlackMCPBot: Core class managing Slack events and message processing
- LLMClient: Handles communication with LLM APIs (OpenAI, Groq, Anthropic)
- Server: Manages communication with MCP servers
- Tool: Represents available tools from MCP servers
When a message is received, the bot:
- Sends the message to the LLM along with available tools
- If the LLM response includes a tool call, executes the tool
- Returns the result to the LLM for interpretation
安装
This server does not publish a one-line install command.
Open the repository installation guide 新手?先看 mcpskill.org 教程 →