slack_channel_history

Pack: slack_connect · Endpoint: https://gateway.pipeworx.io/slack_connect/mcp

Get message history from a Slack channel. Bot auto-joins the channel if needed.

Parameters

NameTypeRequiredDescription
channelstringyesChannel ID (e.g., “C01234ABCDE”)
limitnumbernoMax number of messages to return (default 20, max 1000)
cursorstringnoPagination cursor for next page of results
oldeststringnoOnly messages after this Unix timestamp
lateststringnoOnly messages before this Unix timestamp

Example call

Arguments

{
  "channel": "C01234ABCDE",
  "limit": 20
}

curl

curl -X POST https://gateway.pipeworx.io/slack_connect/mcp \
  -H 'Content-Type: application/json' \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"slack_channel_history","arguments":{"channel":"C01234ABCDE","limit":20}}}'

TypeScript (@pipeworx/sdk)

import { Pipeworx } from '@pipeworx/sdk';
const pipeworx = new Pipeworx();

const result = await pipeworx.call('slack_channel_history', {
  "channel": "C01234ABCDE",
  "limit": 20
});

More examples

{
  "channel": "C01234ABCDE",
  "limit": 100,
  "oldest": "1609459200"
}

Response shape

FieldTypeDescription
okbooleanWhether the API call succeeded
messagesarrayList of messages in the channel
response_metadataobjectPagination metadata
errorstringError code if API call failed
messagestringError message or connection message
Full JSON Schema
{
  "type": "object",
  "properties": {
    "ok": {
      "type": "boolean",
      "description": "Whether the API call succeeded"
    },
    "messages": {
      "type": "array",
      "description": "List of messages in the channel",
      "items": {
        "type": "object",
        "properties": {
          "type": {
            "type": "string",
            "description": "Message type (e.g., 'message')"
          },
          "user": {
            "type": "string",
            "description": "User ID of message sender"
          },
          "text": {
            "type": "string",
            "description": "Message text content"
          },
          "ts": {
            "type": "string",
            "description": "Unix timestamp with milliseconds"
          },
          "thread_ts": {
            "type": "string",
            "description": "Thread timestamp if message is in a thread"
          },
          "reply_count": {
            "type": "number",
            "description": "Number of replies in thread"
          },
          "reply_users_count": {
            "type": "number",
            "description": "Number of unique users who replied"
          }
        }
      }
    },
    "response_metadata": {
      "type": "object",
      "description": "Pagination metadata",
      "properties": {
        "next_cursor": {
          "type": "string",
          "description": "Cursor for next page of results"
        }
      }
    },
    "error": {
      "type": "string",
      "description": "Error code if API call failed"
    },
    "message": {
      "type": "string",
      "description": "Error message or connection message"
    }
  }
}

Connect

Add this to your MCP client config, or use one-click install buttons:

{
  "mcpServers": {
    "slack_connect": {
      "url": "https://gateway.pipeworx.io/slack_connect/mcp"
    }
  }
}

See Getting Started for client-specific install steps.

Regenerated from source · build May 9, 2026