Configuration Guide

This document provides comprehensive configuration guidance for the Slack MCP Client, covering everything from basic setup to advanced deployment scenarios.

Overview

The Slack MCP Client has evolved from a simple MCP server connector to a comprehensive LLM orchestration platform. This guide outlines the unified configuration approach that prioritizes simplicity, DRY principles, and excellent user experience.

Naming Convention

Configuration files use camelCase naming for JSON fields (e.g., botToken, mcpServers, useNativeTools). This follows modern JSON API conventions and provides better IDE support with the included JSON schema.

Note: The application automatically detects and converts legacy snake_case configurations for backward compatibility.

Configuration Architecture

Philosophy: Single File, Logical Sections

Reject complexity. Embrace simplicity.

Instead of multiple configuration files that create cognitive overhead, use a single, well-structured configuration file with logical sections.

Unified Configuration Structure

config.json                     # Single configuration file
custom-prompt.txt               # Optional custom prompt file
├── examples/
│   ├── minimal.json            # Minimal setup example
│   ├── development.json        # Development config example
│   ├── production.json         # Production config example
│   └── custom-prompt.txt       # Custom prompt example
├── schema/
│   └── config-schema.json      # JSON schema for validation
└── scripts/
    └── migrate-config.sh       # Migration utility

JSON Schema Support

The configuration includes comprehensive JSON schema support for enhanced developer experience:

  • Schema Reference: Include "$schema": "https://github.com/tuannvm/slack-mcp-client/schema/config-schema.json" for IDE support

  • Autocomplete: IDEs provide intelligent autocomplete for configuration fields

  • Validation: Real-time validation of field types, required fields, and value constraints

  • Documentation: Inline field descriptions and examples

Complete Configuration Reference

Below is the complete configuration schema showing all available options. Fields marked with ⭐ are required, fields marked with ⚙️ have smart defaults, and fields marked with 🔧 are optional.

Legend:

  • Required: Must be provided or application will fail to start

  • ⚙️ Smart Default: Automatically set if not specified

  • 🔧 Optional: Can be omitted, no default value

Configuration Examples by User Type

1. Quick Start User (5 minutes)

Need: Get up and running in minutes with minimal setup

2. Production User (15 minutes)

Need: Robust configuration with monitoring and security

3. Advanced User (30 minutes)

Need: Maximum customization and control

Environment Variables

Required Environment Variables

Optional Environment Variable Overrides

Slack App Setup

Token Types

The application requires two types of tokens:

  1. Bot Token (SLACK_BOT_TOKEN): Starts with xoxb-

  2. App-Level Token (SLACK_APP_TOKEN): Starts with xapp-

Required Bot Token Scopes

Add these OAuth scopes to your Bot Token in the "OAuth & Permissions" section:

Essential Scopes:

  • app_mentions:read - Allows the bot to receive mention events

  • chat:write - Allows the bot to post messages

  • im:history - Allows the bot to read direct messages

  • im:read - Allows the bot to receive DM events

Additional Scopes (for full functionality):

  • channels:history - Allows reading public channel history

  • groups:history - Allows reading private channel history

  • mpim:history - Allows reading multi-person IM history

App-Level Token Configuration

  1. Go to the "Socket Mode" section in your Slack app settings

  2. Enable Socket Mode

  3. Create an App-Level Token with the connections:write scope

  4. Use this token for the SLACK_APP_TOKEN environment variable

Event Subscriptions

In the "Event Subscriptions" section:

  1. Turn ON Event Subscriptions

  2. Under "Subscribe to bot events", add these event subscriptions:

    • message.im - For direct messages to your app

    • app_mention - For mentions of your app in channels

App Home Configuration

In the "App Home" section:

  1. Enable the Messages Tab

  2. Turn ON "Allow users to send Slash commands and messages from the messages tab"

Custom Prompt Configuration

Option 1: Simple Inline Prompt (Most Common)

Option 2: File-Based Prompt (For Long Prompts)

Priority: customPromptFile takes precedence over customPrompt if both are set

Kubernetes Deployment

Basic Helm Configuration

Security Best Practices

  • Use Secrets for tokens and API keys

  • Use ConfigMaps for non-sensitive configuration

  • Secret key names must match environment variable names in config file

  • Consider using external secret management (AWS Secrets Manager, Vault, etc.)

Configuration Validation

Runtime Validation

The application validates configuration after loading environment variables and applying defaults:

Common Validation Errors

Missing Required Fields:

Invalid Provider Configuration:

Migration from Legacy Format

The application supports both automatic detection and manual migration from legacy formats:

Legacy configurations are automatically detected and converted at runtime:

  • Legacy mcp-servers.json: Automatically detected by presence of mcpServers field without version, slack, or llm fields

  • Snake_case format: Legacy snake_case field names are automatically converted during loading

  • No action required: Existing configurations continue to work without changes

Manual Migration

For permanent migration to the new format:

  1. Automatic Migration: Run ./slack-mcp-client --migrate-config --config legacy-config.json

  2. Manual Migration: Use the provided examples as templates

  3. Validation: Test with --config-validate before deployment

Migration Benefits

  • IDE Support: JSON schema provides autocomplete and validation

  • Modern Format: camelCase follows current JSON API conventions

  • Better Documentation: Inline field descriptions via schema

Troubleshooting

Common Issues

"Sending messages to this app has been turned off"

  • Check App Home settings

  • Verify Event Subscriptions are configured

  • Ensure app is installed with required scopes

Configuration validation failures

  • Check environment variables are set

  • Validate JSON syntax

  • Ensure required fields are present

MCP server connection issues

  • Check server commands and arguments

  • Verify network connectivity for URL-based servers

  • Review server logs for initialization errors

Debug Mode

Enable debug logging for detailed troubleshooting:

Best Practices

  1. Start Simple: Begin with minimal configuration, add complexity as needed

  2. Use Environment Variables: Never hardcode secrets in configuration files

  3. Validate Early: Use --config-validate to catch issues before deployment

  4. Monitor Usage: Enable monitoring to track performance and costs

  5. Version Control: Keep configuration examples in version control

  6. Document Changes: Update configuration documentation when adding new features

Advanced Configuration

For AI/ML-specific configuration options including enhanced LLM providers, advanced RAG settings, and production AI features, see the AI Configuration Guide.

Support

For configuration issues:

  1. Check the troubleshooting section above

  2. Validate your configuration with --config-validate

  3. Review application logs for specific error messages

  4. Consult the AI Configuration Guide for advanced features

Last updated

Was this helpful?