- Slack MCP Host
Content
Slack MCP Host
A Slack bot that integrates MCP (Machine Control Protocol) servers with Slack, providing LLM-powered interactions in dedicated channels. The bot can execute tools from configured MCP servers and present results in a user-friendly format.
Features
- 🤖 LLM-powered conversations in Slack
- 🔧 Integration with multiple MCP servers
- 📝 Markdown rendering support
- 🔍 Collapsible tool execution results
- 💾 Conversation history maintenance
- 🔐 Secure configuration management
Prerequisites
- Python 3.11+
- uv for dependency management
- A Slack workspace with admin access
- OpenAI API access
- One or more MCP servers
Setup
- Clone the repository
git clone https://github.com/yourusername/slack-mcp-host.git
cd slack-mcp-host
- Create and activate virtual environment
uv venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate
- Install dependencies
uv sync
- Configure environment
cp .env.example .env
Edit .env with your credentials:
SLACK_API_KEY=xoxb-your-slack-bot-token
OPENAI_API_KEY=your-openai-api-key
OPENAI_BASE_URL=https://api.openai.com/v1
OPENAI_MODEL=gpt-4
# MCP Servers
SLACK_MCP_NEO4J_MOVIES=uvx mcp-neo4j-cypher --url neo4j+s://demo.neo4jlabs.com --username movies --password movies
SLACK_MCP_TIME=uvx mcp-server-time
- Create Slack App
- Go to api.slack.com/apps
- Click "Create New App" → "From an app manifest"
- Select your workspace
- Copy and paste the contents of
manifest.yml - Create the app and install it to your workspace
Deployment
Cloudflare Workers
- Install Wrangler
npm install -g wrangler
- Login to Cloudflare
wrangler login
- Set secrets
wrangler secret put SLACK_API_KEY
wrangler secret put OPENAI_API_KEY
- Deploy
wrangler deploy
- Update Slack App configuration
- Go to your Slack App settings
- Update the Event Subscription URL to your Cloudflare Workers URL:
https://slack-mcp-host.<your-worker-subdomain>.workers.dev/slack/events
Usage Example
Here's an example interaction flow:
- User starts conversation
User: Can you help me find movies directed by Christopher Nolan?
- Bot responds with tool execution
Bot: I'll help you find movies directed by Christopher Nolan using the Neo4j Movies database.
<details><summary>Tool Results</summary>
Tool neo4j_movies result:
- Inception (2010)
- The Dark Knight (2008)
- Interstellar (2014)
- Memento (2000)
- The Prestige (2006)
</details>
Would you like to know more details about any of these movies?
- User follows up
User: Tell me more about Inception
- Bot executes another query
Bot: I'll get the details about Inception for you.
<details><summary>Tool Results</summary>
Tool neo4j_movies result:
Title: Inception (2010)
Director: Christopher Nolan
Cast: Leonardo DiCaprio, Joseph Gordon-Levitt, Ellen Page
Plot: A thief who steals corporate secrets through dream-sharing technology is given the inverse task of planting an idea into the mind of a C.E.O.
</details>
The movie received critical acclaim for its innovative storytelling and visual effects. Would you like to know about any other movies or specific aspects of Inception?
Development
To run locally for development:
uvicorn src.api:app --reload --port 8000
Use ngrok or similar to expose your local server:
ngrok http 8000
Update your Slack App's Event Subscription URL with the ngrok URL.
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Recommend Servers
TraeBuild with Free GPT-4.1 & Claude 3.7. Fully MCP-Ready.
ChatWiseThe second fastest AI chatbot™
Zhipu Web SearchZhipu Web Search MCP Server is a search engine specifically designed for large models. It integrates four search engines, allowing users to flexibly compare and switch between them. Building upon the web crawling and ranking capabilities of traditional search engines, it enhances intent recognition capabilities, returning results more suitable for large model processing (such as webpage titles, URLs, summaries, site names, site icons, etc.). This helps AI applications achieve "dynamic knowledge acquisition" and "precise scenario adaptation" capabilities.
Serper MCP ServerA Serper MCP Server
Howtocook Mcp基于Anduin2017 / HowToCook (程序员在家做饭指南)的mcp server,帮你推荐菜谱、规划膳食,解决“今天吃什么“的世纪难题;
Based on Anduin2017/HowToCook (Programmer's Guide to Cooking at Home), MCP Server helps you recommend recipes, plan meals, and solve the century old problem of "what to eat today"
Baidu Map百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Tavily Mcp
TimeA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.
Context7Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
BlenderBlenderMCP connects Blender to Claude AI through the Model Context Protocol (MCP), allowing Claude to directly interact with and control Blender. This integration enables prompt assisted 3D modeling, scene creation, and manipulation.
MCP AdvisorMCP Advisor & Installation - Use the right MCP server for your needs
Playwright McpPlaywright MCP server
CursorThe AI Code Editor
WindsurfThe new purpose-built IDE to harness magic
DeepChatYour AI Partner on Desktop
EdgeOne Pages MCPAn MCP service designed for deploying HTML content to EdgeOne Pages and obtaining an accessible public URL.
Amap Maps高德地图官方 MCP Server
AiimagemultistyleA Model Context Protocol (MCP) server for image generation and manipulation using fal.ai's Stable Diffusion model.
Jina AI MCP ToolsA Model Context Protocol (MCP) server that integrates with Jina AI Search Foundation APIs.
MiniMax MCPOfficial MiniMax Model Context Protocol (MCP) server that enables interaction with powerful Text to Speech, image generation and video generation APIs.
Visual Studio Code - Open Source ("Code - OSS")Visual Studio Code