Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/dvlpjrs/guMCP/llms.txt

Use this file to discover all available pages before exploring further.

Overview

The Slack server enables AI agents to read and send messages in Slack channels, create rich canvas messages, and interact with Slack workspaces.

Prerequisites

  • Python 3.11+
  • A Slack App with the following OAuth scopes:
    • channels:history
    • channels:read
    • chat:write
    • chat:write.customize
    • users:read

Authentication

Create a Slack App

  1. Create a Slack App
  2. Add the required OAuth scopes (see above)
  3. Install the app to your workspace
  4. Note your Client ID, Client Secret, and Redirect URI

Setup OAuth Configuration

Create local_auth/oauth_configs/slack/oauth.json:
{
  "client_id": "your_client_id",
  "client_secret": "your_client_secret",
  "redirect_uri": "https://your-redirect-uri"
}
Note: Slack requires HTTPS for redirect URIs. For local development, use ngrok to create a tunnel to port 8080.

Authenticate

python src/servers/slack/main.py auth

Available Tools

Description: Read messages from a Slack channelParameters:
  • channel (string, required): Slack channel ID or name (with # for names)
  • limit (integer, optional): Maximum number of messages to return (default: 20)
Example:
{
  "channel": "#general",
  "limit": 50
}
Returns: List of messages in chronological order with timestamps and users
Description: Send a message to a Slack channel or userParameters:
  • channel (string, required): Channel ID or name (# for channels, @ for users)
  • text (string, required): Message text to send
  • thread_ts (string, optional): Thread timestamp to reply to a thread
Example:
{
  "channel": "#team-updates",
  "text": "Deployment completed successfully! :rocket:",
  "thread_ts": "1234567890.123456"
}
Returns: Confirmation with message timestamp
Description: Create a Slack canvas message with rich Block Kit contentParameters:
  • channel (string, required): Channel ID or name (with # for names)
  • title (string, required): Canvas title
  • blocks (array, required): Array of Slack Block Kit elements
  • thread_ts (string, optional): Thread timestamp to attach canvas to thread
Example:
{
  "channel": "#announcements",
  "title": "Weekly Report",
  "blocks": [
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "*This week's highlights:*"
      }
    },
    {
      "type": "divider"
    },
    {
      "type": "section",
      "text": {
        "type": "mrkdwn",
        "text": "\u2022 Completed 15 tasks\n\u2022 Resolved 8 bugs"
      }
    }
  ]
}
Returns: Confirmation with message timestamp

Resources

The Slack server provides access to channel resources:

List Resources

Lists all accessible Slack channels (public and private) up to 100 at a time. URI Format:
  • slack://channel/{channel_id} - Public channels
  • slack://private/{channel_id} - Private channels

Read Resource

Reads the last 50 messages from a channel with:
  • Message text
  • User information
  • Timestamps
  • Attachments

Usage Examples

Reading Messages

# Read recent messages from a channel
messages = await call_tool("read_messages", {
    "channel": "#general",
    "limit": 30
})

# Read messages using channel ID
messages = await call_tool("read_messages", {
    "channel": "C01234ABCDE",
    "limit": 100
})

Sending Messages

# Send a simple message
await call_tool("send_message", {
    "channel": "#team-updates",
    "text": "Meeting starts in 10 minutes!"
})

# Send a DM to a user
await call_tool("send_message", {
    "channel": "@john.doe",
    "text": "Hi John, can you review the PR?"
})

# Reply to a thread
await call_tool("send_message", {
    "channel": "#development",
    "text": "Fix deployed!",
    "thread_ts": "1234567890.123456"
})

Creating Rich Canvas Messages

# Create a formatted announcement
await call_tool("create_canvas", {
    "channel": "#announcements",
    "title": "Product Launch",
    "blocks": [
        {
            "type": "header",
            "text": {
                "type": "plain_text",
                "text": "New Feature Released!"
            }
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "*Version 2.0* is now live with:\n\u2022 Dark mode\n\u2022 Performance improvements\n\u2022 New dashboard"
            }
        },
        {
            "type": "divider"
        },
        {
            "type": "section",
            "text": {
                "type": "mrkdwn",
                "text": "<https://docs.example.com|View Documentation>"
            }
        }
    ]
})

Channel Identifiers

The Slack server supports multiple ways to identify channels:

Channel Names

"channel": "#general"        # Public channel
"channel": "#team-updates"   # Another public channel

User Names (for DMs)

"channel": "@john.doe"       # Direct message to user
"channel": "@jane.smith"     # Another user

Channel IDs

"channel": "C01234ABCDE"     # Direct channel ID

Slack Block Kit

The create_canvas tool uses Slack Block Kit for rich formatting:

Common Block Types

Block TypeDescriptionUse Case
headerLarge header textTitles, headings
sectionText section with markdownBody content
dividerHorizontal ruleSeparate sections
imageDisplay imagesVisual content
actionsInteractive buttonsUser actions
contextMuted textMetadata, timestamps

Markdown Support

Use mrkdwn text type for formatting:
  • *bold*
  • _italic_
  • ~strikethrough~
  • `code`
  • <url|link text>

Running the Server

Local Development

python src/servers/local.py --server slack --user-id local

Best Practices

  1. Use channel names: Easier to read than IDs (e.g., #general vs C01234ABCDE)
  2. Thread replies: Use thread_ts to keep conversations organized
  3. Rich formatting: Use Block Kit for important announcements
  4. Rate limits: Be mindful of Slack API rate limits

API Reference

ToolPurposeCommon Use Cases
read_messagesRead channel messagesMonitor channels, search history
send_messageSend messagesNotifications, replies, DMs
create_canvasRich messagesAnnouncements, reports, dashboards

Thread Timestamps

Slack uses timestamps as thread identifiers. Get thread_ts from:
  • Response when sending a message
  • Message metadata when reading messages
  • Format: "1234567890.123456" (Unix timestamp with microseconds)