Slack MCP Server

Slack MCP Server

Enables AI-powered Slack workspace management with 18+ tools for messaging, channel management, conversation analysis, and real-time bot responses. Features an autonomous AI agent that can plan and execute complex multi-step tasks combining Slack operations with web research.

Category
Visit Server

README

πŸš€ Slack MCP Server

Transform your Slack workspace into an intelligent AI assistant with real-time responses

GitHub stars GitHub license Python 3.11+ FastMCP

A production-ready Slack MCP Server that combines real-time Socket Mode integration with AI-powered tools. Built with FastMCP 2.8.0, this project provides 18+ tools for Claude Desktop and features an autonomous AI assistant that can plan and execute complex tasks.

⭐ What Makes This Special?

πŸ€– Real-Time Socket Mode Bot - Instant responses to Slack mentions (< 2 seconds)
🧠 Autonomous AI Agent - AI that plans its own execution strategies
πŸ”§ 18+ MCP Tools - Complete Slack workspace management via Claude Desktop
🌐 Web Research Integration - Real-time web search with Tavily API
⚑ Production Ready - Docker + AWS ECS deployment included
πŸ›‘οΈ Enterprise Security - AWS Secrets Manager integration

πŸŽ₯ Demo

claude_text

slackchat

@MCP Bot analyze yesterday's #product-meeting and research mentioned technologies

↓ *2 seconds later* ↓

πŸ€– Analysis Complete! Found discussion about React 18, TypeScript 5.0, and Docker. πŸ“Š Meeting Summary: [Detailed analysis...] πŸ” Technology Research: [Latest developments...] πŸ“ Action Items: [Extracted tasks...]


## πŸš€ Quick Start (5 Minutes)

### 1. Clone & Install
```bash
git clone https://github.com/bahakizil/slack_mcp.git
cd slack_mcp
pip install -r requirements.txt

2. Configure API Keys

Create .env file:

SLACK_BOT_TOKEN=xoxb-your-bot-token        # From api.slack.com/apps
SLACK_APP_TOKEN=xapp-your-app-token        # For Socket Mode (required!)
OPENAI_API_KEY=sk-your-openai-key          # From platform.openai.com
TAVILY_API_KEY=tvly-your-tavily-key        # From tavily.com (optional)

3. Start the Server

python main.py

Success Output:

πŸ€– Starting Slack MCP Server with Real-time Mode
⚑ Socket Mode: Enabled (Real-time auto-responses)
βœ… Bot ready for mentions: @MCP Bot
INFO: Uvicorn running on http://0.0.0.0:8003

4. Test in Slack

@MCP Bot hello!
πŸ€– Hello! I'm your AI assistant. How can I help you today? 😊

πŸŽ‰ Your AI assistant is now live!

πŸ”§ Complete Feature Set

πŸ“± Slack Management (6 Tools)

Tool Description Example
send_slack_message Send messages to channels send_slack_message("general", "Hello team!")
get_slack_channels List all workspace channels get_slack_channels()
get_slack_messages Retrieve channel history get_slack_messages("engineering", limit=50)
search_slack_messages Search across workspace search_slack_messages("deployment")
create_slack_channel Create new channels create_slack_channel("new-project")
analyze_slack_conversation AI-powered analysis analyze_slack_conversation("planning", "summary")

πŸ€– AI Intelligence (3 Tools)

Tool Description Use Case
ask_ai Ask questions to GPT-4o-mini Technical explanations, brainstorming
autonomous_assistant 🌟 Self-planning AI agent Complex multi-step tasks
Socket Mode Bot Real-time auto-responses Instant Slack interaction

🌐 Web Research (3 Tools)

Tool Description Example
search_web General web search search_web("latest AI developments 2024")
search_news News-specific search search_news("tech industry", days=7)
research_topic Deep research analysis research_topic("microservices architecture")

πŸ”— MCP Server Management (6 Tools)

Tool Description Purpose
add_mcp_server Connect external MCP servers Extend functionality
list_mcp_servers Show all configured servers Server management
connect_mcp_server Establish connections Activate external tools
disconnect_mcp_server Close connections Resource management
list_external_tools Browse external tools Tool discovery
call_external_tool Execute external tools Cross-server operations

🧠 Autonomous AI Assistant

The autonomous assistant is the crown jewel of this project. It can:

  • πŸ“‹ Plan its own execution - No pre-programmed workflows
  • πŸ” Discover tools dynamically - Adapts to available resources
  • πŸ”„ Self-reflect and optimize - Learns from execution history
  • πŸ“Š Synthesize multi-source data - Combines Slack + web + AI knowledge

Example: Complex Task Execution

autonomous_assistant(
    request="Analyze all engineering discussions this week, research mentioned technologies, and create a strategic report",
    send_to_slack=True
)

What happens behind the scenes:

  1. πŸ” Discovery: Finds available Slack channels and tools
  2. 🧠 Planning: AI creates step-by-step execution plan
  3. ⚑ Execution: Runs multiple tools in sequence
  4. πŸ”¬ Research: Web searches for mentioned technologies
  5. πŸ“Š Synthesis: Combines all data into comprehensive report
  6. πŸ“¨ Delivery: Posts results to Slack automatically

πŸ–₯️ Claude Desktop Integration

Configuration

Add to claude_desktop_config.json:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "slack-ai-assistant": {
      "command": "python",
      "args": ["/full/path/to/main.py"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-actual-bot-token-here",
        "SLACK_APP_TOKEN": "xapp-your-actual-app-token-here", 
        "OPENAI_API_KEY": "sk-your-actual-openai-api-key-here",
        "TAVILY_API_KEY": "tvly-your-actual-tavily-api-key-here"
      }
    }
  }
}

Usage Examples in Claude Desktop

Meeting Analysis:

Analyze yesterday's #product-meeting channel and summarize key decisions, action items, and sentiment.

Tech Research + Slack Update:

Research current best practices for microservices deployment and share findings in #engineering channel.

Multi-Channel Intelligence:

Compare discussions across #design, #engineering, and #marketing channels this week. Identify common themes and potential collaboration opportunities.

πŸ—οΈ Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                   AUTONOMOUS AI SYSTEM                      β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                β”‚
β”‚  β”‚  SLACK MCP      β”‚    β”‚  TAVILY MCP     β”‚                β”‚
β”‚  β”‚  SERVER         β”‚    β”‚  SERVER         β”‚                β”‚
β”‚  β”‚  Port: 8001     β”‚    β”‚  Port: 8002     β”‚                β”‚
β”‚  β”‚                 β”‚    β”‚                 β”‚                β”‚
β”‚  β”‚ β€’ Slack Tools   β”‚    β”‚ β€’ Web Search    β”‚                β”‚
β”‚  β”‚ β€’ AI Tools      β”‚    β”‚ β€’ News Search   β”‚                β”‚
β”‚  β”‚ β€’ Orchestration β”‚    β”‚ β€’ Research      β”‚                β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                β”‚
β”‚           β”‚                       β”‚                        β”‚
β”‚           └───────────┐   β”Œβ”€β”€β”€β”€β”€β”€β”€β”˜                        β”‚
β”‚                      β”‚   β”‚                               β”‚
β”‚               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚               β”‚ AUTONOMOUS      β”‚                          β”‚
β”‚               β”‚ AGENT           β”‚                          β”‚
β”‚               β”‚                 β”‚                          β”‚
β”‚               β”‚ β€’ Tool Discoveryβ”‚                          β”‚
β”‚               β”‚ β€’ Plan Creation β”‚                          β”‚
β”‚               β”‚ β€’ Execution     β”‚                          β”‚
β”‚               β”‚ β€’ Synthesis     β”‚                          β”‚
β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β”‚                       β”‚                                    β”‚
β”‚               β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                          β”‚
β”‚               β”‚ OPENAI GPT      β”‚                          β”‚
β”‚               β”‚ (gpt-4.1-nano)  β”‚                          β”‚
β”‚               β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜









## ☁️ Production Deployment

### 🐳 Docker Deployment
```bash
# Build and run locally
docker build -t slack-mcp-server .
docker run -p 8003:8003 --env-file .env slack-mcp-server

diagram

πŸš€ AWS ECS Deployment (Production)

# Automated deployment
./deploy.sh

Includes:

  • βœ… Auto-scaling based on traffic
  • βœ… Health checks and monitoring
  • βœ… AWS Secrets Manager for secure credential management
  • βœ… Application Load Balancer for high availability
  • βœ… CloudWatch logging for debugging

πŸ“Š Production Features

  • Zero downtime deployments
  • Horizontal scaling (multiple instances)
  • SSL/TLS termination
  • Custom domain support
  • Monitoring & alerting

πŸ›‘οΈ Security Best Practices

πŸ” Credential Management

  • Environment variables for local development
  • AWS Secrets Manager for production
  • No hardcoded secrets in code
  • Git ignore for sensitive files

πŸ› οΈ Error Handling

  • Graceful degradation when services are down
  • Retry logic for transient failures
  • User-friendly error messages
  • Comprehensive logging

πŸ“ˆ Performance

  • Socket Mode eliminates polling overhead
  • Async processing for non-blocking operations
  • Connection pooling for API efficiency
  • Response time < 2 seconds

🎯 Real-World Use Cases

πŸ‘₯ For Teams

  • Daily standups: "Summarize yesterday's progress across all channels"
  • Sprint planning: "Analyze #product-backlog and prioritize by urgency"
  • Knowledge sharing: "Research best practices for the technologies we discussed"

🏒 For Managers

  • Team sentiment: "Analyze team mood and engagement this week"
  • Progress tracking: "Extract action items from all project channels"
  • Strategic insights: "Compare our technical discussions with industry trends"

πŸ”¬ For Developers

  • Tech research: "Find the latest updates on frameworks we're using"
  • Code review insights: "Analyze #code-review discussions for common issues"
  • Learning automation: "Create weekly tech digest from our discussions"

πŸ“š Documentation

πŸ”§ Requirements

Slack App Setup

Required Bot Token Scopes:

channels:read, channels:history, chat:write, groups:read, 
groups:history, users:read, search:read, channels:manage

API Keys

  • Slack Bot Token (xoxb-...) - Required
  • Slack App Token (xapp-...) - Required for Socket Mode
  • OpenAI API Key (sk-...) - Required for AI features
  • Tavily API Key (tvly-...) - Optional for web search

System Requirements

  • Python 3.11+
  • 4GB RAM (minimum)
  • Network access to Slack, OpenAI, and Tavily APIs

πŸ” Troubleshooting

Common Issues

1. Socket Mode not working

# Check App Token configuration
echo $SLACK_APP_TOKEN  # Should start with xapp-

# Verify Socket Mode is enabled in Slack app settings
# Go to api.slack.com/apps β†’ Your App β†’ Socket Mode β†’ Enable

2. Bot not responding

# Check bot token
echo $SLACK_BOT_TOKEN  # Should start with xoxb-

# Verify terminal shows:
# βœ… Socket Mode: Enabled (Real-time auto-responses)

3. Claude Desktop not loading

# Check config file path and restart Claude Desktop
# Verify Python is in PATH: python --version

Debug Mode

# Enable detailed logging
export DEBUG=true
export LOG_LEVEL=DEBUG
python main.py

🀝 Contributing

We welcome contributions! Here's how to get started:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

🎯 Areas for Contribution

  • πŸ”§ New MCP tools - Extend functionality
  • 🌐 Language support - Add more languages
  • πŸ“Š Analytics features - Advanced reporting
  • πŸ”Œ Integration templates - More external services
  • πŸ“š Documentation - Examples and tutorials

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ™‹ Support & Community

  • πŸ’¬ Issues: GitHub Issues
  • πŸ“– Documentation: Check the docs/ folder
  • πŸ› Bug Reports: Use issue templates
  • πŸ’‘ Feature Requests: Community-driven roadmap

🌟 Acknowledgments


πŸš€ Ready to Get Started?

  1. ⭐ Star this repository if you find it useful
  2. 🍴 Fork it to start customizing
  3. πŸ“₯ Clone it and follow the 5-minute setup
  4. πŸ€– Mention your bot in Slack and watch the magic happen!

Built with ❀️ by Baha Kızıl

Transform your Slack workspace into an AI-powered productivity hub today! πŸš€

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured