Slack MCP Server
Provides examples for accessing the MCP server's endpoints using curl with bearer token authentication.
Uses .env files to manage environment variables including Slack tokens and RSA keys for authentication.
Supports Server-Sent Events (SSE) connections from JavaScript clients with authenticated access to the MCP server.
Uses JWT for authentication, securing all API endpoints with bearer token authentication based on RSA keypairs.
Implemented in Python with utilities for generating client tokens and running the server.
Provides read-only access to Slack data, allowing users to list channels, get channel details, read messages, list users, and get user information from a Slack workspace.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Slack MCP Serverlist all channels in the workspace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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
Related MCP server: Slack MCP Server
Setup
Install dependencies:
pip install -r requirements.txtCreate a
.envfile with your Slack bot token:cp sample.env .envEdit the
.envfile and add your Slack Bot User OAuth Token:SLACK_BOT_TOKEN=xoxb-your-token-hereThe 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.pyonce; it will print out the base64-encoded keys to add to your.envfile.The keys must be base64-encoded (not raw PEM).
Getting a Slack Bot Token
Create a new app (or use an existing one)
Navigate to "OAuth & Permissions"
Add the following scopes to your bot:
channels:readchannels:historygroups:readgroups:historyusers:read
Install the app to your workspace
Copy the "Bot User OAuth Token" that starts with
xoxb-
Running the Server
Start the server with:
python main.pyThe 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...XwQThis 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/listExample 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.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
The HubSpot MCP Server acts as a bridge that enables AI assistants and Large Language Models to securely interact with HubSpot CRM data through natural conversation, without requiring users to understand complex API structures. It provides read-only access to standard CRM objects (contacts, companies, deals, tickets, products, invoices, and more) and their associations, secured via OAuth 2.0, allowing AI agents to perform tasks like summarizing deals, fetching company updates, and looking up record changes.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
Model Context Protocol server for Studex tools, notifications, and profile integrations
Model Context Protocol server for the Apideck Unified API. Connect any MCP-compatible agent framework to 100+ accounting systems, HRIS platforms, file storage providers, and more through one integration. More information https://www.apideck.com/mcp-server
Related MCP Servers
- AlicenseAqualityBmaintenanceA server implementing Model Context Protocol that enables AI assistants to interact with Slack API through a standardized interface, providing tools for messaging, channel management, user information retrieval, and more.11110Apache 2.0
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that integrates with Slack API, allowing users to send messages, view channel history, manage channels, send direct messages, and retrieve user lists from Slack workspaces.1-
- AlicenseNot gradedqualityDmaintenanceA simple Model Context Protocol server for Slack integration that enables messaging, channel management, and workspace search capabilities.54MIT
- AlicenseNot gradedqualityDmaintenanceA read-only MCP server that enables AI assistants to access Slack workspace data, including channels, messages, threads, and user information.24,3163MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/aryahadii/slack-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server