Slack MCP Server with SSE Transport
Slack MCP Server with SSE transport
dVelopment
README
Slack MCP Server with SSE Transport
A Model Context Protocol (MCP) server that provides Slack API integration using Server-Sent Events (SSE) transport. This server allows AI assistants to interact with Slack workspaces through a simple HTTP-based interface.
Features
- SSE Transport: Uses Server-Sent Events (SSE) instead of stdio, enabling communication over HTTP/HTTPS
- Slack API Integration: Provides access to essential Slack API functionality
- Simple Web Interface: Includes a basic web UI and health check endpoint
- Docker Support: Fully containerized with Docker for easy deployment
- TypeScript Implementation: Built with TypeScript for type safety and better developer experience
- Cross-Platform Compatibility: Works with any MCP client that supports SSE transport
Prerequisites
- Node.js 18 or higher
- Slack Bot Token with appropriate permissions
- Slack Team ID
- Docker (optional, for containerized deployment)
Environment Variables
Variable | Description | Default |
---|---|---|
SLACK_BOT_TOKEN |
Your Slack Bot User OAuth Token (starts with xoxb- ) |
Required |
SLACK_TEAM_ID |
Your Slack Workspace/Team ID | Required |
PORT |
Port on which the server will run | 3000 |
Setup Instructions
Obtaining Slack Bot Token and Team ID
-
Create a Slack App:
- Visit the Slack Apps page
- Click "Create New App"
- Choose "From scratch"
- Name your app and select your workspace
-
Configure Bot Token Scopes:
- Navigate to "OAuth & Permissions" in your app settings
- Add these scopes:
channels:history
- View messages and other content in public channelschannels:read
- View basic channel informationchat:write
- Send messages as the appreactions:write
- Add emoji reactions to messagesusers:read
- View users and their basic information
-
Install App to Workspace:
- Click "Install to Workspace" and authorize the app
- Save the "Bot User OAuth Token" that starts with
xoxb-
-
Get your Team ID:
- Open Slack in a web browser
- Once logged in, check the URL in your browser
- The URL will be in a format like:
https://app.slack.com/client/T01234567/...
- Your Team ID is the string beginning with T (e.g.,
T01234567
)
Local Development
- Clone the repository
- Install dependencies:
npm install
- Create a
.env
file based on.env.example
:SLACK_BOT_TOKEN=xoxb-your-slack-bot-token SLACK_TEAM_ID=your-slack-team-id PORT=3000
- Build the TypeScript code:
npm run build
- Start the server:
npm start
For development with automatic reloading:
npm run dev
Docker Deployment
Using Docker Compose (Recommended)
- Create a
.env
file with your Slack credentials as shown above - Build and run the container:
docker compose up --build
Using Pre-built Image
docker run -p 3000:3000 \
-e SLACK_BOT_TOKEN=xoxb-your-slack-bot-token \
-e SLACK_TEAM_ID=your-slack-team-id \
ghcr.io/dvelopment/slack-mcp-server-sse:latest
For more detailed Docker instructions, including publishing to GitHub Container Registry, see DOCKER.md.
Server Endpoints
- SSE Endpoint:
/sse
- Connect to this endpoint to receive SSE events - Health Check:
/health
- Simple health check endpoint (returns{"status":"ok"}
) - Home Page:
/
- Simple HTML page with information about the server
Available Slack API Tools
Tool Name | Description | Required Parameters |
---|---|---|
slack_list_channels |
List public channels in the workspace with pagination | None (optional: limit , cursor ) |
slack_post_message |
Post a new message to a Slack channel | channel_id , text |
slack_reply_to_thread |
Reply to a specific message thread in Slack | channel_id , thread_ts , text |
slack_add_reaction |
Add a reaction emoji to a message | channel_id , timestamp , reaction |
slack_get_channel_history |
Get recent messages from a channel | channel_id (optional: limit ) |
slack_get_thread_replies |
Get all replies in a message thread | channel_id , thread_ts |
slack_get_users |
Get a list of all users in the workspace | None (optional: cursor , limit ) |
slack_get_user_profile |
Get detailed profile information for a specific user | user_id |
Connecting to the Server
Node.js Client Example
// Replace with your server URL
const SERVER_URL = 'http://localhost:3000/sse';
// Create EventSource to connect to the SSE endpoint
const eventSource = new EventSource(SERVER_URL);
// Handle connection open
eventSource.onopen = () => {
console.log('Connected to SSE server');
};
// Handle messages
eventSource.onmessage = (event) => {
console.log('Received message:', event.data);
try {
const data = JSON.parse(event.data);
console.log('Parsed data:', data);
} catch (error) {
console.log('Raw message (not JSON):', event.data);
}
};
// Handle errors
eventSource.onerror = (error) => {
console.error('SSE connection error:', error);
eventSource.close();
};
See the examples
directory for complete client examples:
examples/client.js
- Node.js client exampleexamples/browser-client.html
- Browser client example
Using with Claude MCP Wrapper
To use this server with the Claude MCP wrapper:
claude_mcp_wrapper.sh -y docker run -i --rm -e SLACK_BOT_TOKEN -e SLACK_TEAM_ID mcp/slack
Or for an SSE-based connection:
claude_mcp_wrapper.sh -y http://localhost:3000/sse
License
MIT
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
MCP Package Docs Server
Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.
Claude Code MCP
An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.
@kazuph/mcp-taskmanager
Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.
Linear MCP Server
Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.
mermaid-mcp-server
A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.
Jira-Context-MCP
MCP server to provide Jira Tickets information to AI coding agents like Cursor

Linear MCP Server
A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Sequential Thinking MCP Server
This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.