slack-mcp

thinkingmachines/slack-mcp

3.1

If you are the rightful owner of slack-mcp and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

The Slack MCP Server is a powerful Model Context Protocol server designed for Slack Workspaces, offering a range of features for seamless integration and communication.

Tools
5
Resources
0
Prompts
0

Slack MCP Server

Proof-of-concept Slack MCP server

📋 Prerequisites

  • Python 3.8+
  • Azure CLI
  • Docker
  • Slack App credentials (Client ID and Secret)
  • direnv

Local Development

  1. Clone the repository

    git clone https://github.com/thinkingmachines/slack-mcp
    cd slack-mcp
    
  2. Set up development environment

    make dev
    
  3. Fill out the .envrc file with the require values

  4. Start the server

    make start
    

🔧 Development

Available Make Commands

  • make dev - Set up development environment
  • make start - Start the development server
  • make test - Run test suite
  • make status - Check development environment status
  • make deploy - Quick Deploy to Azure Container Apps

Running Tests

# Run all tests
make test

# Run specific test file
uv run pytest tests/test_server.py -v

# Run with coverage
uv run pytest tests/ --cov=src/slack_mcp_server

Project Structure

slack-mcp/
├── src/
│   └── slack_mcp_server/
│       ├── __init__.py
│       ├── main.py              # FastAPI application
│       ├── azure_keyvault.py    # Azure Key Vault wrapper
│       └── slack_mcp.py         # Slack MCP implementation
├── tests/                       # Test suite
├── Dockerfile                   # Docker configuration
├── docker-compose.yml           # Docker Compose setup
├── pyproject.toml               # Project configuration
├── Makefile                     # Development automation
└── quick-deploy.sh              # Azure deployment script

🚀 Deployment

Azure Container Apps

  1. Prerequisites

    • Azure CLI installed and authenticated
    • Azure Key Vault created with proper RBAC permissions
    • Service Principal with Key Vault access
  2. Deploy

    make deploy
    

    This will:

    • Build and push Docker image to Azure Container Registry
    • Create/update Azure Container App
    • Configure environment variables

🔧 Configuration

Environment Variables

VariableDescriptionRequiredDefault
ENVIRONMENTDeployment environmentNodev
MCP_SERVER_HOSTServer host bindingNolocalhost
MCP_SERVER_PORTServer portNo8000
SLACK_CLIENT_IDSlack OAuth client IDYes-
SLACK_CLIENT_SECRETSlack OAuth client secretYes-
AZURE_KEY_VAULT_URLAzure Key Vault URLYes-
AZURE_TENANT_IDAzure tenant IDYes-
AZURE_CLIENT_IDService Principal client IDYes-
AZURE_CLIENT_SECRETService Principal secretYes-

Slack App Configuration

  1. Create a Slack app at api.slack.com/apps
  2. Configure OAuth & Permissions
  3. Add required scopes:
    • channels:history
    • channels:read
    • chat:write
    • groups:read
    • groups:write
    • im:history
    • im:read
    • im:write
    • mpim:history
    • mpim:read
    • mpim:write
    • search:read
    • users:read