Skip to main content
Version: 0.0.2

MCP Server APIs

The MCP (Model Context Protocol) Server APIs provide programmatic interfaces for client libraries and applications to interact with Slack resources through a standardized protocol. For more information about MCP, see the official documentation.

Server Setup & Configuration

Before using the MCP Server APIs, you need to properly configure and deploy the server:

Deployment Modes

MCP Server supports two operational deployment modes:

  1. Standalone Mode - Dedicated MCP server for client library integration
  2. Integrated Mode - Combined MCP + Webhook server for complete Slack platform integration

For detailed deployment options and usage examples, see Server Modes.

Transport Options

MCP Server supports three transport mechanisms:

  1. stdio - Standard input/output communication (default)
  2. Server-Sent Events (SSE) - Event-based communication over HTTP
  3. Streamable HTTP - HTTP-based streaming communication

For detailed transport configuration, see the CLI Reference.

Available Tools

The following MCP tools are available for Slack integration:

Tool Categories

Message Operations

  • slack_post_message - Send messages to channels
  • slack_thread_reply - Reply to existing threads

Data Retrieval

  • slack_read_channel_messages - Get channel message history
  • slack_read_thread_messages - Get thread conversation history
  • slack_read_emojis - Get workspace emoji information

Interactive Features

  • slack_add_reactions - Add emoji reactions to messages

Authentication

All MCP tools require a valid Slack bot token set in one of the following environment variables:

  • SLACK_BOT_TOKEN (recommended)
  • SLACK_TOKEN (fallback)

Required OAuth Scopes

The bot must have appropriate OAuth scopes depending on the tools used:

ToolRequired Scopes
Post Messagechat:write, channels:read
Read Channel Messageschannels:history, channels:read
Read Thread Messageschannels:history, channels:read
Thread Replychat:write, channels:read
Read Emojisemoji:read
Add Reactionsreactions:write, channels:read

Usage Examples

Basic Message Sending

{
"channel": "#general",
"text": "Hello from the MCP server!"
}

Reading Channel History

{
"channel": "#general",
"limit": 50
}

Adding Reactions

{
"channel": "#general",
"timestamp": "1234567890.123456",
"emojis": ["thumbsup", "heart"]
}

Error Handling

MCP Server API responses follow Slack's standard format. Successful responses have "ok": true, while errors have "ok": false with error details:

{
"ok": false,
"error": "channel_not_found",
"detail": "Value passed for channel was invalid."
}

Common Error Types

  • Authentication Errors: invalid_auth, not_authed
  • Permission Errors: not_in_channel, channel_not_found
  • Rate Limiting: rate_limited
  • Validation Errors: invalid_ts, msg_too_long

Rate Limiting

Slack enforces rate limits on API endpoints. The server automatically handles retries according to Slack's rate limiting headers. Consider implementing client-side rate limiting for high-frequency operations.

Best Practices

  • Error Handling: Always check the ok field in responses
  • Channel Format: Use channel IDs (e.g., C1234567890) for better reliability
  • Token Security: Store tokens securely and never expose them in client-side code
  • Rate Management: Implement appropriate delays between API calls
  • Scope Minimization: Only request necessary OAuth scopes