trackmcp
Back to directory
tuannvm

slack-mcp-client

View on GitHub

A Slack bot and MCP client acts as a bridge between Slack and Model Context Protocol (MCP) servers. Using Slack as the interface, it enables large language models (LLMs) to connect and interact with various MCP servers through standardized MCP tools.

171 stars GoOthers Updated Jun 3, 2026
mcpmcp-clientslack

Documentation

Slack MCP Client

A production-ready bridge between Slack and AI models with full MCP compatibility.

This client enables AI models (OpenAI GPT-4.1, Anthropic Claude 4.5, Ollama local models) to interact with real tools and systems through Slack conversations. Built on the industry-standard Model Context Protocol (MCP), it provides secure access to filesystems, databases, Kubernetes clusters, Git repositories, and custom tools.

GitHub Workflow Status
Go Version
Trivy Scan
Docker Image
GitHub Release
License: MIT

> Compatible with MCP Specification 2025-06-18 - Compliant with the latest Model Context Protocol standards

Recent Updates

Oct 2025: langchaingo v0.1.14 with streaming fixes, enhanced agent parsing, and API key sanitization.

Key Features

  • Universal MCP Compatibility - Supports all transport methods (HTTP, SSE, stdio)
  • Multi-Provider LLM Support - OpenAI GPT-4.1/4o, Anthropic Claude 4.5, Ollama (Llama 3.3, Qwen, Mistral, DeepSeek)
  • Agent Mode - Multi-step reasoning with LangChain for complex workflows
  • RAG Integration - Knowledge base with semantic search capabilities
  • Thread-Aware Context - Maintains separate conversation history per Slack thread
  • User Context Integration - Personalized responses with cached user information
  • Unique Tool Naming - Server-prefixed tool names prevent conflicts across MCP servers
  • Production Ready - Comprehensive configuration, monitoring, and security

Use Cases

  • DevOps Teams - Infrastructure automation and monitoring through Slack
  • Development Teams - Code review, Git operations, and file management
  • Support Teams - Database queries, system status checks, and troubleshooting
  • General Use - AI assistance with actual tools and system integration

MCP Compatibility

Compliant with the official Model Context Protocol (2025-06-18 specification):

  • All Transport Methods - HTTP, SSE, and stdio protocols
  • JSON-RPC 2.0 - Standard communication protocol
  • Official MCP Servers - Compatible with all modelcontextprotocol/servers
  • Custom MCP Servers - Works with any MCP-compliant server
  • Security Standards - Implements user consent, data privacy, and tool safety requirements

Authenticating to SSE MCP Servers

Authentication with Server-Sent Events (SSE) MCP servers can be achieved using the following setup:

Example:

json
{
  "httpHeaders": {
    "Authorization": "Bearer YOUR_TOKEN_HERE"
  }
}

Make sure to replace `YOUR_TOKEN_HERE` with your actual token for authentication.

How It Works

Image
mermaid
flowchart LR
    User([πŸ‘€ User]) --> Slack{πŸ”— Slack Interface}

    subgraph Infrastructure[Observability]
        Config[πŸ“‹ Unified ConfigJSON Schema]
        Monitoring[πŸ“Š MonitoringPrometheus Metrics]
        Tracing[πŸ” OpenTelemetry TracingLangfuse & OTLP]
        Logging[πŸ“ Structured LoggingDebug & Analytics]
    end
    
    subgraph Core[Features]
        Slack --> Bridge[πŸŒ‰ LLM-MCP BridgeOrchestration Layer]
        
        subgraph LLM[πŸ€– AI Processing]
            Bridge --> LLMRegistry[LLM Provider Registry]
            LLMRegistry --> OpenAI[OpenAIGPT-4o]
            LLMRegistry --> Anthropic[AnthropicClaude]
            LLMRegistry --> Ollama[OllamaLocal Models]
            
            Bridge --> Agent{🎯 Agent Mode?}
            Agent -->|Yes| LangChain[πŸ”„ LangChain AgentMulti-step Reasoning]
            Agent -->|No| Standard[⚑ Standard ModeSingle Response]
        end
        
        subgraph Knowledge[πŸ“š Knowledge & Memory]
            Bridge --> RAG[🧠 RAG System]
            RAG --> SimpleRAG[πŸ“„ JSON StoreSimple Documents]
            RAG --> VectorRAG[πŸ” OpenAI Vector StoreSemantic Search]
        end
        
        subgraph Tools[πŸ› οΈ MCP Mode]
            Bridge --> MCPManager[MCP Client]
            MCPManager --> FileSystem[πŸ“ Filesystem MCP ServerRead/Write Files]
            MCPManager --> Git[🌿 Git MCP Server Repository Tools]
            MCPManager --> Kubernetes[☸️ Kubernetes MCP ServerCluster Management]
        end
    end
    
    
    Config -.-> Core
    Core -.-> Monitoring
    Core -.-> Tracing
    Core -.-> Logging
    
    style Core fill:#F8F9FA,stroke:#6C757D,stroke-width:3px
    style LLM fill:#E3F2FD,stroke:#1976D2,stroke-width:2px
    style Knowledge fill:#E8F5E8,stroke:#388E3C,stroke-width:2px
    style Tools fill:#FFF3E0,stroke:#F57C00,stroke-width:2px
    style Infrastructure fill:#F3E5F5,stroke:#7B1FA2,stroke-width:2px
    
    style User fill:#4CAF50,stroke:#2E7D32,stroke-width:2px,color:#fff
    style Slack fill:#4A90E2,stroke:#1565C0,stroke-width:2px,color:#fff
    style Bridge fill:#FF9800,stroke:#E65100,stroke-width:2px,color:#fff
    style LangChain fill:#9C27B0,stroke:#4A148C,stroke-width:2px,color:#fff
    style RAG fill:#2196F3,stroke:#0D47A1,stroke-width:2px,color:#fff

1. User interacts through Slack, sending messages that trigger intelligent AI workflows

2. LLM-MCP Bridge serves as the intelligent orchestration layer that:

    3. Knowledge & Memory system provides contextual intelligence:

      4. Tool Ecosystem connects to diverse external systems:

        5. Infrastructure ensures production-ready deployment:

          Features

          • βœ… Multi-Mode MCP Client:
            • Server-Sent Events (SSE) for real-time communication with automatic retry
            • HTTP transport for JSON-RPC
            • stdio for local development and testing
          • βœ… Slack Integration:
            • Uses Socket Mode for secure, firewall-friendly communication
            • Works with both channels and direct messages
            • Rich message formatting with Markdown and Block Kit
            • Thread-aware conversation tracking with separate context per thread
            • User context caching for personalized interactions
            • Customizable bot behavior and message history
          • βœ… Multi-Provider LLM Support:
            • OpenAI (GPT-4.1, GPT-4o, o3-pro)
            • Anthropic (Claude Sonnet 4.5, Opus 4.1)
            • Ollama (Llama 3.3, Qwen2.5, Mistral, DeepSeek)
            • Native tool calling and unified LangChain gateway
          • βœ… Agent Mode:
            • Autonomous AI agents powered by LangChain (langchaingo v0.1.14)
            • Enhanced multi-step reasoning and tool orchestration
            • Improved parsing for complex multi-line tool calls
            • Configurable agent iterations and behavior
            • Reliable streaming responses with memory leak fixes
            • Advanced prompt engineering capabilities
          • βœ… RAG (Retrieval-Augmented Generation):
            • Multiple providers: Simple JSON storage, OpenAI Vector Store
            • Reusable vector stores with `vectorStoreId` support
            • Configurable search parameters and similarity metrics
            • PDF ingestion with intelligent chunking
            • CLI tools for document management
          • βœ… Unified Configuration:
            • Single JSON configuration file with JSON schema validation
            • Comprehensive timeout and retry configuration
            • Environment variable substitution and overrides
            • All underlying package options exposed
            • Smart defaults with full customization capability
            • Server-prefixed tool names to prevent naming conflicts
          • βœ… Production Ready:
            • Docker container support with GHCR publishing
            • Kubernetes Helm charts with OCI registry
            • Comprehensive logging and error handling
            • Test coverage with security scanning
          • βœ… Monitoring & Observability:
            • Prometheus metrics integration
            • Tool invocation tracking with error rates
            • LLM token usage monitoring by model and type
            • OpenTelemetry tracing with Langfuse and simple providers
            • Configurable observability providers with graceful fallbacks
            • Comprehensive span tracking for LLM operations and tool calls
            • Configurable metrics endpoint and logging levels

          Installation

          From Binary Release

          Download the latest binary from the GitHub releases page or install using Go:

          bash
          # Install latest version using Go
          go install github.com/tuannvm/slack-mcp-client@latest
          
          # Or build from source
          git clone https://github.com/tuannvm/slack-mcp-client.git
          cd slack-mcp-client
          make build
          # Binary will be in ./bin/slack-mcp-client

          Running Locally with Binary

          After installing the binary, you can run it locally with the following steps:

          1. Set up environment variables:

          bash
          # Using environment variables directly
          export SLACK_BOT_TOKEN="xoxb-your-bot-token"
          export SLACK_APP_TOKEN="xapp-your-app-token"
          export OPENAI_API_KEY="sk-your-openai-key"
          export OPENAI_MODEL="gpt-4.1"  # or gpt-4o, o3-pro
          export LOG_LEVEL="info"
          
          # Or create a .env file and source it
          cat > .env  config.json  sales-assistant.txt  values.yaml  **Note**: The reload feature is **disabled by default** and must be explicitly enabled in your configuration file.
          
          ### Configuration
          
          To enable reload functionality, add reload settings to your `config.json`:

          {

          "version": "2.0",

          "reload": {

          "enabled": true,

          "interval": "30m"

          }

          }

          code
          **Configuration Options**:
          - `enabled`: Must be set to `true` to activate reload functionality (default: `false`)
          - `interval`: Time between automatic reloads (default: `"30m"`, minimum: `"10s"`)
          
          ### Usage
          
          **Automatic Reload**: When enabled, the application automatically reloads at the configured interval to reconnect to MCP servers and refresh tool discovery.
          
          **Manual Reload**: Even with automatic reload disabled, you can trigger manual reloads using signals:

          In Kubernetes

          kubectl exec -it -- kill -USR1 1

          Local process

          kill -USR1

          code
          ### Benefits
          
          - **Zero Downtime**: Application stays running during reload
          - **Kubernetes-Friendly**: Pod continues running while application components restart
          - **Opt-in**: Disabled by default, only enabled when explicitly configured
          - **Flexible**: Both automatic (periodic) and manual (signal) triggers
          - **Safe**: Minimum interval validation prevents excessive reloading
          
          When enabled, the reload feature automatically:
          - Reconnects to all configured MCP servers
          - Rediscovers available tools
          - Refreshes configuration settings
          - Maintains Slack connection throughout the process
          
          Perfect for production environments where MCP servers may restart due to updates, scaling, or maintenance.
          
          ## Slack-Formatted Output
          
          The client includes a comprehensive Slack-formatted output system that enhances message display in Slack:
          
          - **Automatic Format Detection**: Automatically detects message type (plain text, markdown, JSON Block Kit, structured data) and applies appropriate formatting
          - **Markdown Formatting**: Supports Slack's mrkdwn syntax with automatic conversion from standard Markdown
            - Converts `**bold**` to `*bold*` for proper Slack bold formatting
            - Preserves inline code, block quotes, lists, and other formatting elements
          - **Quoted String Enhancement**: Automatically converts double-quoted strings to inline code blocks for better visualization
            - Example: `"namespace-name"` becomes `` `namespace-name` `` in Slack
            - Improves readability of IDs, timestamps, and other quoted values
          - **Block Kit Integration**: Converts structured data to Block Kit layouts for better visual presentation
            - Automatically validates against Slack API limits
            - Falls back to plain text if Block Kit validation fails
          
          For more details, see the [Slack Formatting Guide](docs/format.md).
          
          ## Transport Modes
          
          The client supports three transport modes:
          
          - **SSE (default)**: Uses Server-Sent Events for real-time communication with the MCP server, includes automatic retry logic for enhanced reliability
          - **HTTP**: Uses HTTP POST requests with JSON-RPC for communication
          - **stdio**: Uses standard input/output for local development and testing
          
          ## Documentation
          
          Comprehensive documentation is available in the `docs/` directory:
          
          ### Configuration & Setup
          - **[Slack Configuration Guide](docs/configuration.md)** - Complete guide for setting up your Slack app, including required permissions, tokens, and troubleshooting common issues
          
          ### Development & Implementation
          - **[Implementation Notes](docs/implementation.md)** - Detailed technical documentation covering the current architecture, core components, and implementation details
          - **[Requirements Specification](docs/requirements.md)** - Comprehensive requirements documentation including implemented features, quality requirements, and future enhancements
          
          ### User Guides
          - **[Slack Formatting Guide](docs/format.md)** - Complete guide to message formatting including Markdown-to-Slack conversion, Block Kit layouts, and automatic format detection
          - **[RAG Implementation Guide](docs/rag-json.md)** - Detailed guide for the improved RAG system with LangChain Go compatibility and performance optimizations
          - **[RAG SQLite Implementation](docs/rag-sqlite.md)** - Implementation plan for native Go SQLite integration with ChatGPT-like upload experience
          - **[Testing Guide](docs/test.md)** - Comprehensive testing documentation covering unit tests, integration tests, manual testing procedures, and debugging
          
          ### Quick Links
          - **Setup**: Start with the [Slack Configuration Guide](docs/configuration.md) for initial setup
          - **Agent Mode**: See the Agent Mode section above for autonomous AI agents with tool chaining
          - **RAG**: Check the [RAG Implementation Guide](docs/rag-json.md) for document knowledge base integration
          - **Formatting**: See the [Slack Formatting Guide](docs/format.md) for message formatting capabilities
          - **RAG SQLite**: See the [RAG SQLite Implementation](docs/rag-sqlite.md) for native Go implementation with modern upload UX
          - **Development**: Check the [Implementation Notes](docs/implementation.md) for technical details
          - **Testing**: Use the [Testing Guide](docs/test.md) for testing procedures and debugging
          - **Monitoring**: See the metrics configuration section above for Prometheus integration
          - **Dependencies**: Review [Dependencies](docs/DEPENDENCIES.md) for version tracking and upgrade history
          
          ## Contributing
          
          Contributions are welcome! Please feel free to submit a Pull Request.
          
          ## License
          
          This project is licensed under the MIT License - see the LICENSE file for details.
          
          ## CI/CD and Releases
          
          This project uses GitHub Actions for continuous integration and GoReleaser for automated releases.
          
          ### Continuous Integration Checks
          
          Our CI pipeline performs the following checks on all PRs and commits to the main branch:
          
          #### Code Quality
          - **Linting**: Using golangci-lint to check for common code issues and style violations
          - **Go Module Verification**: Ensuring go.mod and go.sum are properly maintained
          - **Formatting**: Verifying code is properly formatted with gofmt
          
          #### Security
          - **Vulnerability Scanning**: Using govulncheck to check for known vulnerabilities in dependencies
          - **Dependency Scanning**: Using Trivy to scan for vulnerabilities in dependencies
          - **SBOM Generation**: Creating a Software Bill of Materials for dependency tracking
          
          #### Testing
          - **Unit Tests**: Running tests with race detection and code coverage reporting
          - **Build Verification**: Ensuring the codebase builds successfully
          
          ### Release Process
          
          When changes are merged to the main branch:
          1. CI checks are run to validate code quality and security
          2. If successful, a new release is automatically created with:
             - Semantic versioning based on commit messages
             - Binary builds for multiple platforms
             - Docker image publishing to GitHub Container Registry
             - Helm chart publishing to GitHub Container Registry

          Frequently asked questions

          What is slack-mcp-client?

          slack-mcp-client is A Slack bot and MCP client acts as a bridge between Slack and Model Context Protocol (MCP) servers. Using Slack as the interface, it enables large language models (LLMs) to connect and interact with various MCP servers through standardized MCP tools.

          How do I install slack-mcp-client?

          Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

          Is slack-mcp-client open source?

          Yes β€” it is hosted on GitHub at https://github.com/tuannvm/slack-mcp-client and has 171 stars.

          Related MCP tools

          Run your own MCP server? See who uses it and what to fix.

          Measure it with TrackMCP