Skip to content
Back to search

mcp-client-slackbot

Simple Slackbot MCP Client

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/sooperset--mcp-client-slackbot/badge.svg)](/listings/sooperset--mcp-client-slackbot)

HTML

<a href="/listings/sooperset--mcp-client-slackbot"><img src="/api/listings/sooperset--mcp-client-slackbot/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

1. Create a Slack App

1. Go to [api.slack.com/apps](https://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

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 104 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

  1. # MCP Simple Slackbot
  2. A simple Slack bot that uses the Model Context Protocol (MCP) to enhance its capabilities with external tools.
  3. ## Features
  4. ![2025-03-08-ezgif com-video-to-gif-converter](https://github.com/user-attachments/assets/0e2b6e1c-80f2-48c3-8ca4-1c41f3678478)
  5. - **AI-Powered Assistant**: Responds to messages in channels and DMs using LLM capabilities
  6. - **MCP Integration**: Full access to MCP tools like SQLite database and web fetching
  7. - **Multi-LLM Support**: Works with OpenAI, Groq, and Anthropic models
  8. - **App Home Tab**: Shows available tools and usage information
  9. ## Setup
  10. ### 1. Create a Slack App
  11. 1. Go to [api.slack.com/apps](https://api.slack.com/apps) and click "Create New App"
  12. 2. Choose "From an app manifest" and select your workspace
  13. 3. Copy the contents of `mcp_simple_slackbot/manifest.yaml` into the manifest editor
  14. 4. Create the app and install it to your workspace
  15. 5. Under the "Basic Information" section, scroll down to "App-Level Tokens"
  16. 6. Click "Generate Token and Scopes" and:
  17. - Enter a name like "mcp-assistant"
  18. - Add the `connections:write` scope
  19. - Click "Generate"
  20. 7. Take note of both your:
  21. - Bot Token (`xoxb-...`) found in "OAuth & Permissions"
  22. - App Token (`xapp-...`) that you just generated
  23. ### 2. Install Dependencies
  24. ```bash
  25. # Create a virtual environment
  26. python -m venv venv
  27. # Activate the virtual environment
  28. source venv/bin/activate # On Windows: venv\Scripts\activate
  29. # Install project dependencies
  30. pip install -r mcp_simple_slackbot/requirements.txt
  31. ```
  32. ### 3. Configure Environment Variables
  33. Create a `.env` file in the `mcp_simple_slackbot` directory (see `.env.example` for a template):
  34. ```
  35. # Slack API credentials
  36. SLACK_BOT_TOKEN=xoxb-your-token
  37. SLACK_APP_TOKEN=xapp-your-token
  38. # LLM API credentials
  39. OPENAI_API_KEY=sk-your-openai-key
  40. # or use GROQ_API_KEY or ANTHROPIC_API_KEY
  41. # LLM configuration
  42. LLM_MODEL=gpt-4-turbo
  43. ```
  44. ## Running the Bot
  45. ```bash
  46. # Navigate to the module directory
  47. cd mcp_simple_slackbot
  48. # Run the bot directly
  49. python main.py
  50. ```
  51. The bot will:
  52. 1. Connect to all configured MCP servers
  53. 2. Discover available tools
  54. 3. Start the Slack app in Socket Mode
  55. 4. Listen for mentions and direct messages
  56. ## Usage
  57. - **Direct Messages**: Send a direct message to the bot
  58. - **Channel Mentions**: Mention the bot in a channel with `@MCP Assistant`
  59. - **App Home**: Visit the bot's App Home tab to see available tools
  60. ## Architecture
  61. The bot is designed with a focused architecture:
  62. 1. **SlackMCPBot**: Core class managing Slack events and message processing
  63. 2. **LLMClient**: Handles communication with LLM APIs (OpenAI, Groq, Anthropic)
  64. 3. **Server**: Manages communication with MCP servers
  65. 4. **Tool**: Represents available tools from MCP servers
  66. When a message is received, the bot:
  67. 1. Sends the message to the LLM along with available tools
  68. 2. If the LLM response includes a tool call, executes the tool
  69. 3. Returns the result to the LLM for interpretation
  70. 4. Delivers the final response to the user
  71. ## Credits
  72. This project is based on the [MCP Simple Chatbot example](https://github.com/modelcontextprotocol/python-sdk/tree/main/examples/clients/simple-chatbot).
  73. ## License
  74. MIT License

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.