CLI Execution Methods
Both the MCP server and webhook server can be executed using multiple methods depending on your development workflow and deployment preferences. This guide covers all available execution methods with their respective use cases and examples.
Installation Extras
- [mcp]: installs the MCP server feature set.
- [webhook]: installs the webhook server feature set.
- [all]: installs everything.
Available Execution Methods
Overview
The Slack MCP servers support four primary execution methods:
- Console Script - Recommended for most users and production deployments
- Python Module - Direct execution using Python's module system
- Poetry - Development workflow using Poetry package manager
- UV - Modern Python package management with uv
Execution Method Details
1. Console Script (Recommended)
The console script method is the most straightforward and recommended approach for most users.
- MCP Server
- Webhook Server
# Install and run MCP server
pip install "slack-mcp[mcp]"
slack-mcp-server [OPTIONS]
# Install and run webhook server
pip install "slack-mcp[webhook]"
slack-webhook-server [OPTIONS]
When to use:
- ✅ Production deployments
- ✅ Simple local development
- ✅ CI/CD pipelines
- ✅ Docker containers
2. Python Module
Execute servers directly using Python's module system.
- MCP Server
- Webhook Server
# Run MCP server as Python module
python -m slack_mcp.mcp [OPTIONS]
# Run webhook server as Python module
python -m slack_mcp.webhook [OPTIONS]
When to use:
- ✅ Development environments
- ✅ Custom Python environments
- ✅ Script automation
- ✅ Debugging with specific Python versions
3. Poetry
Development workflow using Poetry for dependency management.
- MCP Server
- Webhook Server
# Setup and run MCP server with Poetry
poetry add slack-mcp -E mcp
poetry run slack-mcp-server [OPTIONS]
# Alternative: Run as module
poetry run python -m slack_mcp.mcp [OPTIONS]
# Setup and run webhook server with Poetry
poetry add slack-mcp -E webhook
poetry run slack-webhook-server [OPTIONS]
# Alternative: Run as module
poetry run python -m slack_mcp.webhook [OPTIONS]
When to use:
- ✅ Local development
- ✅ Contributing to the project
- ✅ Isolated development environments
- ✅ Team development with locked dependencies
4. UV (Modern Package Manager)
Modern Python package management using UV for fast, reliable dependency resolution.
- MCP Server
- Webhook Server
# Setup and run MCP server with UV
uv add "slack-mcp[mcp]"
uv run slack-mcp-server [OPTIONS]
# Alternative: Run as module
uv run python -m slack_mcp.mcp [OPTIONS]
# Setup and run webhook server with UV
uv add "slack-mcp[webhook]"
uv run slack-webhook-server [OPTIONS]
# Alternative: Run as module
uv run python -m slack_mcp.webhook [OPTIONS]
When to use:
- ✅ Modern development workflows
- ✅ Fast dependency resolution
- ✅ CI/CD with performance requirements
- ✅ Large-scale deployments
Installation Methods
Standard Installation (pip)
# Install from PyPI
pip install "slack-mcp[mcp]" # MCP server
pip install "slack-mcp[webhook]" # Webhook server
pip install "slack-mcp[all]" # Everything
# Install development version
pip install -e .
Poetry Installation
# Add to existing Poetry project
poetry add slack-mcp -E mcp # MCP server
poetry add slack-mcp -E webhook # Webhook server
poetry add slack-mcp -E all # Everything
# Development installation
poetry install
UV Installation
# Add to UV project
uv add "slack-mcp[mcp]" # MCP server
uv add "slack-mcp[webhook]" # Webhook server
uv add "slack-mcp[all]" # Everything
# Development installation
uv sync