Webhook Server APIs
The Slack MCP Server provides a comprehensive webhook server implementation that receives and processes Slack events through the Slack Events API. This webhook server can operate in standalone mode or integrated with the MCP server for complete Slack integration capabilities.
- [mcp]: installs the MCP server feature set.
- [webhook]: installs the webhook server feature set (this page).
- [all]: installs everything.
Overview
The webhook server is built on FastAPI and provides secure, scalable handling of Slack events with the following key features:
- Secure Event Processing: Slack signature verification for all incoming events
- Event Queue Integration: Automatic publishing of events to configurable message queues
- Flexible Deployment: Standalone webhook server or integrated MCP+Webhook server
- Comprehensive Event Support: Handles all Slack event types with Pydantic model validation
- URL Verification: Built-in support for Slack's URL verification challenge
- Retry Mechanisms: Configurable retry logic for network operations
- Production Ready: ASGI-compatible with proper logging and error handling
Available Endpoints
The webhook server exposes the following REST API endpoints:
- ✅ POST /slack/events - Main endpoint for receiving Slack events
Server Modes
The webhook server supports two deployment modes:
⚙️ Server Modes
Choose between standalone and integrated deployment options:
Standalone Mode:
- Dedicated webhook server for Slack events only
- Lightweight deployment focused solely on event processing
- Ideal for microservices architectures
- Default port: 3000
Integrated Mode:
- Combined MCP server and webhook server in one application
- Full-featured deployment with both MCP tools and event processing
- Single deployment for complete Slack integration
- Configurable MCP transport (SSE or HTTP streaming)
Event Processing Flow
The webhook server processes Slack events through a secure validation and queuing pipeline. For detailed architectural information, see Webhook Server Architecture.
Supported Event Types
The webhook server processes all Slack event types including:
Message Events
message- New messages in channelsapp_mention- Bot mentions in messagesmessage.channels- Channel message eventsmessage.groups- Private channel message eventsmessage.mpim- Multi-party IM message events
Reaction Events
reaction_added- Emoji reactions added to messagesreaction_removed- Emoji reactions removed from messages
Channel Events
channel_created- New channels createdchannel_deleted- Channels deletedchannel_rename- Channel name changesmember_joined_channel- Users joining channelsmember_left_channel- Users leaving channels
User Events
team_join- New users joining the workspaceuser_change- User profile changes
Configuration Options
📋 Environment Configuration
Complete configuration guide including:
- Environment variables and authentication
- Queue backend configuration
- SSL/TLS and security settings
- Logging levels and formats
- Retry mechanisms
- Environment file loading
- Queue backend configuration
🚀 Deployment
For deployment patterns, container configurations, and production recommendations, see Webhook Server Architecture.
Development Tools
🛠️ CLI Interface
For complete webhook server CLI options and usage patterns, see CLI Reference.
💻 Local Development
For development setup and testing guides, see Webhook Server Architecture.
Queue Integration
📨 Message Queue Backend
For queue backend architecture and configuration details, see Webhook Server Architecture.
Error Handling
The webhook server provides comprehensive error handling:
Common HTTP Status Codes
200 OK- Event successfully processed401 Unauthorized- Invalid Slack signature400 Bad Request- Malformed request payload500 Internal Server Error- Server processing error
Error Response Format
{
"detail": "Error description",
"status_code": 401
}
Performance & Best Practices
For performance characteristics, deployment best practices, development workflows, and optimization strategies, see Webhook Server Architecture.
Quick Start
# Install dependencies for webhook server
pip install "slack-mcp[webhook]"
# Set environment variables
export SLACK_SIGNING_SECRET="your_signing_secret"
export SLACK_BOT_TOKEN="xoxb-your-bot-token"
# Run standalone webhook server
python -m slack_mcp.webhook --host 0.0.0.0 --port 3000
# Or run integrated server (MCP + Webhook)
python -m slack_mcp.webhook --integrated --mcp-transport sse
For detailed setup instructions, see the Environment Configuration and CLI Execution Methods guides.