Cover image
Try Now
2025-03-08

3 years

Works with Finder

1

Github Watches

7

Github Forks

46

Github Stars

MCP Simple Slackbot

A simple Slack bot that uses the Model Context Protocol (MCP) to enhance its capabilities with external tools.

Features

2025-03-08-ezgif com-video-to-gif-converter

  • 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

  1. Go to api.slack.com/apps and click "Create New App"
  2. Choose "From an app manifest" and select your workspace
  3. Copy the contents of mcp_simple_slackbot/manifest.yaml into the manifest editor
  4. Create the app and install it to your workspace
  5. Under the "Basic Information" section, scroll down to "App-Level Tokens"
  6. Click "Generate Token and Scopes" and:
    • Enter a name like "mcp-assistant"
    • Add the connections:write scope
    • Click "Generate"
  7. Take note of both your:
    • Bot Token (xoxb-...) found in "OAuth & Permissions"
    • App Token (xapp-...) that you just generated

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:

  1. Connect to all configured MCP servers
  2. Discover available tools
  3. Start the Slack app in Socket Mode
  4. 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:

  1. SlackMCPBot: Core class managing Slack events and message processing
  2. LLMClient: Handles communication with LLM APIs (OpenAI, Groq, Anthropic)
  3. Server: Manages communication with MCP servers
  4. Tool: Represents available tools from MCP servers

When a message is received, the bot:

  1. Sends the message to the LLM along with available tools
  2. If the LLM response includes a tool call, executes the tool
  3. Returns the result to the LLM for interpretation
  4. Delivers the final response to the user

Credits

This project is based on the MCP Simple Chatbot example.

License

MIT License

相关推荐

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • https://maiplestudio.com
  • Find Exhibitors, Speakers and more

  • Yusuf Emre Yeşilyurt
  • I find academic articles and books for research and literature reviews.

  • Carlos Ferrin
  • Encuentra películas y series en plataformas de streaming.

  • https://zenepic.net
  • Embark on a thrilling diplomatic quest across a galaxy on the brink of war. Navigate complex politics and alien cultures to forge peace and avert catastrophe in this immersive interstellar adventure.

  • https://reddgr.com
  • Delivers concise Python code and interprets non-English comments

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

  • av
  • 毫不费力地使用一个命令运行LLM后端,API,前端和服务。

  • 1Panel-dev
  • 🔥1Panel提供了直观的Web接口和MCP服务器,用于在Linux服务器上管理网站,文件,容器,数据库和LLMS。

  • Mintplex-Labs
  • 带有内置抹布,AI代理,无代理构建器,MCP兼容性等的多合一桌面和Docker AI应用程序。

  • GeyserMC
  • 与Minecraft客户端/服务器通信的库。

  • awslabs
  • AWS MCP服务器 - 将AWS最佳实践直接带入您的开发工作流程的专门MCP服务器

  • WangRongsheng
  • 🧑‍🚀 llm 资料总结(数据处理、模型训练、模型部署、 o1 模型、mcp 、小语言模型、视觉语言模型)|摘要世界上最好的LLM资源。

  • appcypher
  • 很棒的MCP服务器 - 模型上下文协议服务器的策划列表

    Reviews

    4 (1)
    Avatar
    user_RynoTRoP
    2025-04-17

    As an avid user of the mcp-client-slackbot created by sooperset, I am thoroughly impressed by its seamless integration into our Slack environment. This tool has significantly boosted our team's productivity by simplifying communication and task management. The setup was straightforward, thanks to the clear instructions provided in the GitHub repository (https://github.com/sooperset/mcp-client-slackbot). Highly recommended for any team looking to enhance their collaborative efforts!