slack-mcp-server
Read-only MCP server for Slack workspace data
Install / Use
claude mcp add mynghn -- npx -y github:mynghn/slack-mcp-serverIf the server publishes to npm under a different name, use that package instead — check the repo README.
MCP Server
Model Context Protocol server
Quality Score
Category
CommunicationSupported Platforms
Our assessment of slack-mcp-server
slack-mcp-server scores 70/100 on our quality scale, 40th of 59 Communication skills we index.
Its MCP Server is 7.4 KB long, well organised into 31 sections with 8 code examples: a thorough specification that gives an agent plenty to work with.
It has 3 GitHub stars, so there is little community track record yet; judge it on its content.
Maintenance, license and trust
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
- No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
- Its trust signals score 69/100, with 4 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit — read the skill file before letting an agent act on it.
slack-mcp-server compared with similar skills
All 4 of these similar skills score higher than slack-mcp-server; compare them before choosing.
| Skill | Score | Stars | Updated | Format |
|---|---|---|---|---|
| slack-mcp-server (this skill)by mynghn | 70 | 3 | 9mo ago | MCP Server |
| Agent-Reachby Panniantong | 100 | 85.0k | 8d ago | CLAUDE.md |
| headroomby headroomlabs-ai | 100 | 73.6k | today | CLAUDE.md |
| rufloby ruvnet | 100 | 73.1k | today | CLAUDE.md |
| CowAgentby zhayujie | 100 | 47.1k | today | CLAUDE.md |
Frequently asked questions
- How do I install slack-mcp-server?
- Run
claude mcp add mynghn -- npx -y github:mynghn/slack-mcp-server. The install tabs above show the steps for each supported agent. - Which AI agents does slack-mcp-server work with?
- It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
- Is slack-mcp-server safe to use?
- It declares no license and scores 69/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
- Is slack-mcp-server still maintained?
- The repository was last updated about 9 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
Skill content
View source on GitHubSlack MCP Server
A read-only Model Context Protocol (MCP) server for accessing Slack workspace data. This server enables AI assistants like Claude to read channels, messages, threads, and user information from your Slack workspace.
Features
| Tool | Description | Auth Required |
|------|-------------|---------------|
| list_channels | List all accessible public channels with pagination | Bot or User |
| get_channel_history | Retrieve message history from a specific channel | Bot or User |
| get_thread_replies | Get all replies in a message thread (including parent) | Bot or User |
| list_users | List all workspace users with pagination | Bot or User |
| get_user_profile | Get detailed profile information for a specific user | Bot or User |
| search_messages | Search messages across all channels | User only |
| refresh_credentials | Manually trigger credential refresh | User only |
All read tools support cursor-based pagination. The refresh_credentials tool enables automatic credential management for user token authentication.
Installation
Prerequisites
- Node.js 20+
- pnpm (or npm/yarn)
- A Slack workspace with appropriate access
Setup
# Clone the repository
git clone https://github.com/your-username/slack-mcp-server.git
cd slack-mcp-server
# Install dependencies
pnpm install
# Build the project
pnpm run build
Authentication
The server supports two authentication methods:
Option 1: Bot Token (Recommended)
Use a standard Slack Bot User OAuth token for most use cases.
- Create a Slack App at api.slack.com/apps
- Add the following Bot Token Scopes under OAuth & Permissions:
channels:read- List public channelschannels:history- Read channel messagesusers:read- List workspace usersusers.profile:read- Read user profiles
- Install the app to your workspace
- Copy the Bot User OAuth Token (starts with
xoxb-)
export SLACK_BOT_TOKEN=xoxb-your-token-here
Option 2: User Token (Unofficial - Required for Search)
Use a user token to enable the search_messages tool. This method uses browser session credentials.
Warning: This authentication method uses unofficial session credentials extracted from your browser. It may violate Slack's Terms of Service. Session tokens expire and require manual re-extraction. Use at your own risk and only with workspaces where you have appropriate authorization.
- Open your Slack workspace in a browser
- Open Developer Tools (F12) → Application → Cookies
- Find and copy the
dcookie value (starts withxoxd-) - In the Network tab, find any API request and copy the token from the Authorization header (starts with
xoxc-)
export SLACK_USER_TOKEN=xoxc-your-token-here
export SLACK_COOKIE_D=xoxd-your-cookie-here
Note: If both bot token and user token are configured, the bot token takes precedence.
Token Auto-Refresh (User Token Only)
User tokens expire periodically. The server can automatically refresh credentials to maintain uninterrupted access.
Required for auto-refresh:
export SLACK_USER_TOKEN=xoxc-your-token-here
export SLACK_COOKIE_D=xoxd-your-cookie-here
export SLACK_WORKSPACE=your-workspace-name # e.g., "mycompany" from mycompany.slack.com
Optional configuration:
# Credential storage location (default: ~/.slack-mcp-server/credentials.json)
export SLACK_CREDENTIALS_PATH=/custom/path/credentials.json
# Refresh interval in days (default: 7)
export SLACK_REFRESH_INTERVAL_DAYS=7
# Enable/disable auto-refresh (default: true)
export SLACK_REFRESH_ENABLED=true
How it works:
- On startup, credentials are loaded from storage (if available) or saved from environment variables
- Every hour, the system checks if refresh is due based on the configured interval
- When due, both xoxc token and d cookie are refreshed via a request to your workspace
- New credentials are persisted to the credentials file with secure permissions (0600)
- If refresh fails, retries occur with exponential backoff (max 3 attempts)
- You can also manually trigger refresh using the
refresh_credentialstool
Usage
Running the Server
# With bot token
SLACK_BOT_TOKEN=xoxb-... pnpm start
# With user token (enables search)
SLACK_USER_TOKEN=xoxc-... SLACK_COOKIE_D=xoxd-... pnpm start
Claude Code Configuration
Add this MCP server to Claude Code:
# With bot token
claude mcp add slack -- node /absolute/path/to/slack-mcp-server/build/index.js \
-e SLACK_BOT_TOKEN=xoxb-your-token-here
# With user token (enables search)
claude mcp add slack -- node /absolute/path/to/slack-mcp-server/build/index.js \
-e SLACK_USER_TOKEN=xoxc-your-token-here \
-e SLACK_COOKIE_D=xoxd-your-cookie-here
To verify the server is configured:
claude mcp list
Tool Reference
list_channels
List all accessible public channels in the workspace.
Parameters:
limit(optional): Maximum channels to return (1-1000, default: 100)cursor(optional): Pagination cursor from previous responseexclude_archived(optional): Exclude archived channels (default: true)
get_channel_history
Retrieve message history from a specific channel.
Parameters:
channel_id(required): Channel ID (e.g., C1234567890)limit(optional): Maximum messages to return (1-1000, default: 50)cursor(optional): Pagination cursoroldest(optional): Only messages after this timestamplatest(optional): Only messages before this timestamp
get_thread_replies
Retrieve all replies in a message thread.
Parameters:
channel_id(required): Channel ID containing the threadthread_ts(required): Timestamp of the parent messagelimit(optional): Maximum replies to return (1-1000, default: 50)cursor(optional): Pagination cursor
list_users
List all users in the workspace.
Parameters:
limit(optional): Maximum users to return (1-1000, default: 200)cursor(optional): Pagination cursor
get_user_profile
Get detailed profile information for a specific user.
Parameters:
user_id(required): User ID (e.g., U1234567890)
search_messages
Search for messages across all accessible channels. Requires user token authentication.
Parameters:
query(required): Search query (supports Slack modifiers:from:,in:,before:,after:)sort(optional): Sort byscoreortimestamp(default: score)sort_dir(optional): Sort directionascordesc(default: desc)count(optional): Results per page (1-100, default: 20)page(optional): Page number (default: 1)
refresh_credentials
Manually trigger a refresh of Slack user credentials. Requires user token authentication with SLACK_WORKSPACE configured.
Parameters: None
Returns:
- On success:
{ success: true, message, refreshedAt, totalRefreshes } - On failure:
{ success: false, error: { code, message, retryable } }
Error codes:
REFRESH_NOT_AVAILABLE- Bot token auth or workspace not configuredREFRESH_IN_PROGRESS- Another refresh is already runningSESSION_REVOKED- Credentials invalidated, manual re-auth requiredNETWORK_ERROR- Connectivity issue (retryable)
Disclaimer
This project is not affiliated with Slack Technologies, LLC.
User token authentication is unofficial and may not comply with Slack's Terms of Service. Bot token authentication is the recommended approach.
Related Skills
Agent-Reach
85.0kGive your AI agent eyes to see the entire internet. Read & search Twitter, Reddit, YouTube, GitHub, Bilibili, XiaoHongShu — one CLI, zero API fees.
headroom
73.6kCompress tool outputs, logs, files, and RAG chunks before they reach the LLM. 20% fewer tokens for coding agents, 60-95% fewer tokens for JSON, same answers. Library, proxy, MCP server.
ruflo
73.1k🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated
CowAgent
47.1kOpen-source super AI assistant & Agent Harness. Plans tasks, runs tools and skills, self-evolves with memory and knowledge. Multi-agent, multi-model, multi-channel. Lightweight, extensible, one-line install.
Languages
Trust signals
From repository metadata: license, adoption, age and documentation. Not a code audit — see the Safety scan above for what the skill file itself contains.
