Slack MCP
Read and respond to Slack from Claude.
README
Slack MCP
Read and respond to Slack from Claude. Works as an MCP server (for Claude Desktop/Claude Code) and as a standalone CLI (for GitHub Actions).
Features
- Multi-workspace support - Configure multiple Slack workspaces
- Read tools - Summarize activity, list channels, read messages, search
- Write tools - Send messages, reply to threads, add reactions
- Standalone CLI - Generate markdown summaries for GitHub Actions
Installation
1. Create Slack App(s)
For each workspace you want to connect:
- Go to https://api.slack.com/apps → Create New App → From manifest
- Select your workspace
- Paste this manifest:
display_information:
name: Claude Slack Reader
description: Read and respond to Slack from Claude
oauth_config:
scopes:
user:
- channels:history
- channels:read
- chat:write
- groups:history
- groups:read
- im:history
- im:read
- mpim:history
- mpim:read
- users:read
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
- Click Install to Workspace → Allow
- Copy the User OAuth Token (starts with
xoxp-)
Note: Slack requires a separate app per workspace (public distribution requires Slack approval).
2. Configure Tokens
Create ~/.mcp-auth/slack/config.json:
{
"workspaces": {
"work": {
"name": "Work Slack",
"token": "xoxp-your-token-here",
"priority": 1
},
"research": {
"name": "Research Group",
"token": "xoxp-your-token-here",
"priority": 2
}
},
"default_workspace": "work"
}
Or use environment variables:
export SLACK_USER_TOKEN=xoxp-... # Single workspace
export SLACK_TOKEN_WORK=xoxp-... # Multiple workspaces
export SLACK_TOKEN_RESEARCH=xoxp-...
3. Install Dependencies
cd ~/src/slack-mcp
pip install -r requirements.txt
4. Add to Claude Desktop
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"slack": {
"command": "python3",
"args": ["/path/to/slack-mcp/server.py"]
}
}
}
Restart Claude Desktop.
Project Structure
slack-mcp/
├── src/
│ ├── config.py # Multi-workspace configuration
│ ├── slack_client.py # Slack API wrapper (read + write)
│ ├── summarizer.py # Message categorization
│ └── mcp_server.py # MCP server with tools
├── server.py # Entry point for MCP server
├── slack_summary.py # Standalone CLI
├── requirements.txt
├── pyproject.toml
└── .github/
└── workflows/
└── daily-summary.yml
MCP Tools
Read Tools
| Tool | Description |
|---|---|
slack_summary |
Overview of DMs, mentions, channel activity. Use mode: "quick" (default) or mode: "full" |
slack_channels |
List all channels (filter by type: all, channels, dms, groups) |
slack_channel |
Read messages from a specific channel |
slack_thread |
Read messages in a thread |
slack_search |
Search messages |
slack_unread |
Get unread message counts |
slack_workspaces |
List configured workspaces |
Write Tools
| Tool | Description |
|---|---|
slack_send |
Send message to channel or DM |
slack_reply |
Reply in a thread |
slack_react |
Add emoji reaction |
Example Usage in Claude
"What's happening in my Slack?"
→ Uses slack_summary with quick mode
"Show me the #engineering channel"
→ Uses slack_channel
"Reply to that thread saying I'll review it tomorrow"
→ Uses slack_reply
"Add a thumbsup to that message"
→ Uses slack_react
Standalone CLI
Generate markdown summaries without Claude:
# Print summary to stdout
python slack_summary.py
# Save to file
python slack_summary.py --output slack-summary.md
# Look back 48 hours
python slack_summary.py --hours 48
# Specific workspace
python slack_summary.py --workspace work
# Action items only
python slack_summary.py --action-items-only
GitHub Actions Workflow
The included workflow runs daily and commits a summary:
# .github/workflows/daily-summary.yml
name: Daily Slack Summary
on:
schedule:
- cron: '0 12 * * *' # 7 AM EST
workflow_dispatch:
jobs:
summarize:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.11'
- run: pip install -r requirements.txt
- env:
SLACK_USER_TOKEN: ${{ secrets.SLACK_USER_TOKEN }}
run: python slack_summary.py --output slack-summary.md
- run: |
git config user.email "github-actions[bot]@users.noreply.github.com"
git config user.name "github-actions[bot]"
git add slack-summary.md
git diff --quiet --staged || git commit -m "Daily Slack summary [skip ci]"
git push
Add your token as a repository secret: Settings → Secrets → Actions → New repository secret → SLACK_USER_TOKEN
Configuration Sync
To sync config across machines, symlink to a cloud folder:
mkdir -p ~/.mcp-auth/slack
ln -sf ~/Dropbox/mcp-auth/slack/config.json ~/.mcp-auth/slack/config.json
# or Box, iCloud, etc.
Performance
- Quick mode (default): ~4 seconds - scans recent DMs and channels
- Full mode: ~20 seconds - detailed scan of all activity
- Cached calls: ~1.5 seconds - conversation list cached for 5 minutes
Requirements
- Python 3.10+
slack-sdk- Slack API clientmcp- Model Context Protocol server
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。