Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AIFire in da houseCheck it out free

slack-mcp-server

MCP.Pizza Chef: ubie-oss

The slack-mcp-server is an MCP server that provides a standardized interface for AI assistants to interact with the Slack API. It exposes Slack workspace data and actions such as listing channels, posting messages, replying to threads, adding reactions, retrieving user profiles, and searching messages. This server enables seamless integration of Slack functionalities into AI workflows, allowing real-time communication and collaboration within Slack from AI-powered applications.

Use This MCP server To

List public Slack channels with pagination Post messages to Slack channels via AI commands Reply to specific Slack message threads Add reaction emojis to Slack messages Retrieve recent messages from Slack channels Fetch all replies in a Slack message thread Get basic profile information of Slack workspace users Access detailed user profile information Search Slack messages across the workspace

README

slack-mcp-server

A MCP(Model Context Protocol) server for accessing Slack API. This server allows AI assistants to interact with the Slack API through a standardized interface.

Features

Available tools:

  • slack_list_channels - List public channels in the workspace with pagination
  • slack_post_message - Post a new message to a Slack channel
  • slack_reply_to_thread - Reply to a specific message thread in Slack
  • slack_add_reaction - Add a reaction emoji to a message
  • slack_get_channel_history - Get recent messages from a channel
  • slack_get_thread_replies - Get all replies in a message thread
  • slack_get_users - Retrieve basic profile information of all users in the workspace
  • slack_get_user_profile - Get a user's profile information
  • slack_search_messages - Search for messages in the workspace

Quick Start

Installation

npm install @ubie-oss/slack-mcp-server

NOTE: Its now hosted in GitHub Registry so you need your PAT.

Configuration

You need to set the following environment variables:

  • SLACK_BOT_TOKEN: Slack Bot User OAuth Token
  • SLACK_USER_TOKEN: Slack User OAuth Token (required for some features like message search)

You can also create a .env file to set these environment variables:

SLACK_BOT_TOKEN=xoxb-your-bot-token
SLACK_USER_TOKEN=xoxp-your-user-token

Usage

Start the MCP server

Directly:

npx @ubie-oss/slack-mcp-server

Or, run the installed module with node:

node node_modules/.bin/slack-mcp-server

Edit MCP configuration json for your client:

{
  "slack": {
    "command": "npx",
    "args": [
      "-y",
      "@ubie-oss/slack-mcp-server"
    ],
    "env": {
      "NPM_CONFIG_//npm.pkg.github.com/:_authToken": "<your-github-pat>",
      "SLACK_BOT_TOKEN": "<your-bot-token>",
      "SLACK_USER_TOKEN": "<your-user-token>"
    }
  }
}

Implementation Pattern

This server adopts the following implementation pattern:

  1. Define request/response using Zod schemas

    • Request schema: Define input parameters
    • Response schema: Define responses limited to necessary fields
  2. Implementation flow:

    • Validate request with Zod schema
    • Call Slack WebAPI
    • Parse response with Zod schema to limit to necessary fields
    • Return as JSON

For example, the slack_list_channels implementation parses the request with ListChannelsRequestSchema, calls slackClient.conversations.list, and returns the response parsed with ListChannelsResponseSchema.

Development

Available Scripts

  • npm run dev - Start the server in development mode with hot reloading
  • npm run build - Build the project for production
  • npm run start - Start the production server
  • npm run lint - Run linting checks (ESLint and Prettier)
  • npm run fix - Automatically fix linting issues

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Run tests and linting: npm run lint
  4. Commit your changes
  5. Push to the branch
  6. Create a Pull Request

slack-mcp-server FAQ

How do I install the slack-mcp-server?
Install it via npm using 'npm install @ubie-oss/slack-mcp-server'.
What Slack API features does this MCP server support?
It supports listing channels, posting messages, replying to threads, adding reactions, retrieving user profiles, and searching messages.
Can I use this server to fetch user profile information?
Yes, it provides tools to retrieve both basic and detailed user profile information.
Does slack-mcp-server support message thread interactions?
Yes, it can reply to threads and fetch all replies within a thread.
Is pagination supported when listing Slack channels?
Yes, the slack_list_channels tool supports pagination for channel listings.
Can this MCP server be integrated with multiple LLM providers?
Yes, it is provider-agnostic and works with OpenAI, Anthropic Claude, and Google Gemini models.
How does slack-mcp-server handle real-time Slack data?
It accesses Slack API endpoints to fetch and post data in real-time, enabling dynamic AI interactions.
What programming languages or environments is slack-mcp-server compatible with?
It is a Node.js package installable via npm, suitable for JavaScript and TypeScript environments.