JUHE API Marketplace
aryahadii avatar
MCP Server

Slack MCP Server

A Model Context Protocol server that provides read-only access to Slack data including messages, channels, and users through secure API endpoints.

0
GitHub Stars
11/21/2025
Last Updated
No Configuration
Please check the documentation below.
  1. Home
  2. MCP Servers
  3. slack-mcp-server

README Documentation

Slack MCP Server

A Model Context Protocol (MCP) server for Slack built with FastMCP. This server provides read-only access to Slack data, including messages, channels, and users, and secures all API endpoints with bearer token authentication.

Features

  • List all channels in a workspace
  • Get detailed information about a specific channel
  • Read messages from channels
  • List all users in a workspace
  • Get detailed information about a specific user
  • Secure API access via bearer token authentication

Setup

  1. Install dependencies:

    pip install -r requirements.txt
    
  2. Create a .env file with your Slack bot token:

    cp sample.env .env
    
  3. Edit the .env file and add your Slack Bot User OAuth Token:

    SLACK_BOT_TOKEN=xoxb-your-token-here
    

    The server uses JWT (JSON Web Tokens) for authentication. You must also add your RSA keypair as base64-encoded PEM strings:

    RSA_PRIVATE_KEY="<base64-encoded-PEM-private-key>"
    RSA_PUBLIC_KEY="<base64-encoded-PEM-public-key>"
    
    • If you do not have these values, run the server or python generate_client_token.py once; it will print out the base64-encoded keys to add to your .env file.
    • The keys must be base64-encoded (not raw PEM).

Getting a Slack Bot Token

  1. Go to https://api.slack.com/apps
  2. Create a new app (or use an existing one)
  3. Navigate to "OAuth & Permissions"
  4. Add the following scopes to your bot:
    • channels:read
    • channels:history
    • groups:read
    • groups:history
    • users:read
  5. Install the app to your workspace
  6. Copy the "Bot User OAuth Token" that starts with xoxb-

Running the Server

Start the server with:

python main.py

The server will run at http://localhost:8000. By default, all API endpoints are protected with bearer token authentication.

Available API Tools

The server exposes the following MCP tools:

list_channels

Lists all channels in the workspace.

get_channel_info

Gets detailed information about a specific channel.

get_messages

Gets messages from a channel with pagination support.

list_users

Lists all users in the workspace.

get_user_info

Gets detailed information about a specific user.

Authentication

All requests to the MCP server require JWT bearer token authentication. When you start the server, it will display a JWT token that can be used for authentication.

To authenticate your requests, include the following header with the token provided by the server:

Authorization: Bearer eyJhbGciOiJS...your-jwt-token...XwQ

This applies to both HTTP API endpoints and the Server-Sent Events (SSE) connection.

Example with curl

curl -H "Authorization: Bearer eyJhbGciOiJS...your-jwt-token...XwQ" http://localhost:8000/mcp/list

Example with JavaScript for SSE

const eventSource = new EventSource('http://localhost:8000/sse', {
  headers: {
    'Authorization': 'Bearer eyJhbGciOiJS...your-jwt-token...XwQ'
  }
});

Note: The JWT token is generated when the server starts. If you restart the server, it will use the same keypair (stored in jwt_keys.json), but you may need to get a new token from the server output.

Integration with LLM

This MCP server can be integrated with LLMs to provide them with read-only access to Slack data. The LLM can query channels, users, and messages but cannot send messages or modify any data. When integrating with LLMs, ensure you securely pass the API token to the client code that establishes the connection.

Quick Actions

View on GitHubView All Servers

Key Features

Model Context Protocol
Secure Communication
Real-time Updates
Open Source

Boost your projects with Wisdom Gate LLM API

Supporting GPT-5, Claude-4, DeepSeek v3, Gemini and more.

Enjoy a free trial and save 20%+ compared to official pricing.

Learn More
JUHE API Marketplace

Accelerate development, innovate faster, and transform your business with our comprehensive API ecosystem.

JUHE API VS

  • vs. RapidAPI
  • vs. API Layer
  • API Platforms 2025
  • API Marketplaces 2025
  • Best Alternatives to RapidAPI

For Developers

  • Console
  • Collections
  • Documentation
  • MCP Servers
  • Free APIs
  • Temp Mail Demo

Product

  • Browse APIs
  • Suggest an API
  • Wisdom Gate LLM
  • Global SMS Messaging
  • Temp Mail API

Company

  • What's New
  • Welcome
  • About Us
  • Contact Support
  • Terms of Service
  • Privacy Policy
Featured on Startup FameFeatured on Twelve ToolsFazier badgeJuheAPI Marketplace - Connect smarter, beyond APIs | Product Huntai tools code.marketDang.ai
Copyright © 2025 - All rights reserved