agentic-slackbot

MCP.Pizza Chef: John-Lin

agentic-slackbot is a client MCP entity that acts as an interactive Slack bot leveraging the OpenAI Agents SDK to communicate with MCP servers. It enables real-time, context-aware interactions within Slack by integrating LLM capabilities through MCP, supporting environment variables for flexible deployment including Azure OpenAI. Designed for developers and teams, it facilitates automated, intelligent Slack workflows powered by advanced language models.

Use This MCP client To

Automate Slack conversations with context-aware AI responses Integrate MCP-powered agents into Slack workflows Run interactive Slack bots using OpenAI Agents SDK Deploy Slack bots with environment-configured LLM access Enable real-time model-driven Slack interactions Use Slack bot to trigger MCP server toolchains Manage Slack notifications with AI-generated summaries Facilitate team collaboration via AI-powered Slack commands

README

agentic-slackbot

A simple Slack bot that uses the OpenAI Agents SDK to interact with the Model Context Protocol (MCP) server.

Install Dependencies

uv sync

Environment Variables

Create a .envrc file in the root directory of the project and add the following environment variables:

export OPENAI_API_KEY=""
export SLACK_BOT_TOKEN=""
export SLACK_APP_TOKEN=""
export OPENAI_MODEL="gpt-4o"
export HTTP_PROXY=""

If you are using Azure OpenAI, you can set the following environment variables instead:

AZURE_OPENAI_API_KEY=""
AZURE_OPENAI_ENDPOINT="https://<myopenai>.azure.com/"
OPENAI_MODEL="gpt-4o"
AZURE_OPENAI_API_VERSION="2025-03-01-preview"

Running the Bot

uv run bot

Running the bot in docker

docker build . -t slackbot

docker run -e SLACK_BOT_TOKEN="" \
    -e SLACK_APP_TOKEN="" \
    -e HTTP_PROXY="" \
    -e OPENAI_PROXY_BASE_URL="" \
    -e OPENAI_PROXY_API_KEY="" \
    -e OPENAI_MODEL=gpt-4o \
    -e FIRECRAWL_API_URL="" slackbot

Credit

This project is based on the sooperset/mcp-client-slackbot example.

agentic-slackbot FAQ

How do I configure environment variables for agentic-slackbot?
Create a .envrc file with keys like OPENAI_API_KEY, SLACK_BOT_TOKEN, SLACK_APP_TOKEN, and optionally Azure OpenAI variables for deployment.
Can agentic-slackbot run with Azure OpenAI instead of OpenAI?
Yes, it supports Azure OpenAI by setting AZURE_OPENAI_API_KEY, AZURE_OPENAI_ENDPOINT, and AZURE_OPENAI_API_VERSION environment variables.
How do I start the agentic-slackbot?
Run the bot using 'uv run bot' or build and run the provided Docker container with appropriate environment variables.
What SDK does agentic-slackbot use to interact with MCP?
It uses the OpenAI Agents SDK to communicate with MCP servers for model-driven Slack interactions.
Is it possible to run agentic-slackbot inside Docker?
Yes, the project includes Docker build and run instructions for containerized deployment.
Does agentic-slackbot support proxy configurations?
Yes, HTTP_PROXY and OPENAI_PROXY_BASE_URL environment variables can be set for proxy support.
What models can agentic-slackbot use?
It supports models like GPT-4o and can be configured for other models via environment variables, compatible with providers like OpenAI, Claude, and Gemini.
How does agentic-slackbot enhance Slack workflows?
By enabling real-time, context-aware AI interactions, it automates tasks and improves communication within Slack channels.