A simple Slack bot that uses the Model Context Protocol (MCP) to enhance its capabilities with external tools.
A simple Slack bot that uses the Model Context Protocol (MCP) to enhance its capabilities with external tools.
mcp_simple_slackbot/manifest.yaml
into the manifest editorconnections:write
scopexoxb-...
) found in "OAuth & Permissions"xapp-...
) that you just generated# 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
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
# Navigate to the module directory
cd mcp_simple_slackbot
# Run the bot directly
python main.py
The bot will:
@MCP Assistant
The bot is designed with a focused architecture:
When a message is received, the bot:
This project is based on the MCP Simple Chatbot example.
MIT License