Slack Notifier MCP
Enables bidirectional communication between MCP clients and Slack, allowing users to receive task notifications and respond to AI inquiries directly within Slack threads. It supports various urgency levels, message threading, and interactive question-and-answer workflows.
README
Slack Notifier MCP
MCP server for bidirectional Slack communication with Claude Code. Get notified when tasks complete, and respond to Claude's questions directly from Slack.
Quick Start
# Add to Claude Code (one command)
claude mcp add slack-notifier -s user \
-e SLACK_BOT_TOKEN=xoxb-your-token \
-e SLACK_DEFAULT_CHANNEL=YOUR-CHANNEL-ID \
-- uvx slack-notifier-mcp@latest
Features
- Send Messages - Send messages with optional urgency levels and thread support
- Ask & Wait - Ask questions and wait for replies via Slack threads
- Bidirectional - Reply to Claude from Slack, get responses back in your terminal
- Urgency Levels - Normal, important, and critical notifications with appropriate formatting
Slack App Setup
Before using this server, you need to create a Slack app:
- Go to api.slack.com/apps and click Create New App
- Choose From scratch, name it (e.g., "Claude Code"), and select your workspace
- Go to OAuth & Permissions in the sidebar
- Under Scopes > Bot Token Scopes, add:
chat:write- Send messageschannels:history- Read public channel messagesgroups:history- Read private channel messagesim:history- Read DM messagesusers:read- Get user display names
- Click Install to Workspace at the top
- Copy the Bot User OAuth Token (starts with
xoxb-)
To get your default channel ID:
- Open Slack, right-click the channel, and select View channel details
- At the bottom, copy the Channel ID (starts with
C)
Installation
Claude Code (Recommended)
claude mcp add slack-notifier -s user \
-e SLACK_BOT_TOKEN=xoxb-your-token \
-e SLACK_DEFAULT_CHANNEL=YOUR-CHANNEL-ID \
-- uvx slack-notifier-mcp@latest
VS Code
code --add-mcp '{"name":"slack-notifier","command":"uvx","args":["slack-notifier-mcp@latest"],"env":{"SLACK_BOT_TOKEN":"xoxb-your-token","SLACK_DEFAULT_CHANNEL":"YOUR-CHANNEL-ID"}}'
Other MCP Clients
<details> <summary><strong>Claude Desktop</strong></summary>
Add to your Claude Desktop config:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"slack-notifier": {
"command": "uvx",
"args": ["slack-notifier-mcp@latest"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "YOUR-CHANNEL-ID"
}
}
}
}
</details>
<details> <summary><strong>Cursor</strong></summary>
- Go to Settings → MCP → Add new MCP Server
- Select
commandtype - Enter command:
uvx slack-notifier-mcp@latest - Add environment variables for
SLACK_BOT_TOKENandSLACK_DEFAULT_CHANNEL
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"slack-notifier": {
"command": "uvx",
"args": ["slack-notifier-mcp@latest"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "YOUR-CHANNEL-ID"
}
}
}
}
</details>
<details> <summary><strong>Windsurf / Other MCP Clients</strong></summary>
Any MCP-compatible client can use slack-notifier:
{
"mcpServers": {
"slack-notifier": {
"command": "uvx",
"args": ["slack-notifier-mcp@latest"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "YOUR-CHANNEL-ID"
}
}
}
}
</details>
Local Development
git clone https://github.com/strand-ai/slack-notifier-mcp.git
cd slack-notifier-mcp
uv sync
uv run slack-notifier-mcp
MCP Tools
send
Send a message to Slack with optional urgency and thread support.
# Simple message
send(message="Build completed successfully")
# With urgency (adds formatting and @here for critical)
send(
message="Server is down!",
urgency="critical" # or "normal", "important"
)
# Reply in a thread
send(
message="Done with the first step, moving on...",
thread_ts="1234567890.123456"
)
# Mention user
send(
message="Need your attention",
mention_user=True
)
Parameters:
message(required): Message text (supports Slack mrkdwn)channel(optional): Channel ID or name (uses default if not set)thread_ts(optional): Thread timestamp to reply in a threadurgency(optional):normal,important, orcriticalmention_user(optional): If true, @mentions the configured user
ask_user
Send a question and wait for the user's reply.
ask_user(
question="Should I use PostgreSQL or SQLite for the database?",
context="Setting up the backend for the new API",
timeout_minutes=10
)
# Returns: {"success": True, "reply": "Use PostgreSQL", ...}
Parameters:
question(required): The question to askchannel(optional): Channel ID or namecontext(optional): Additional context about what you're working ontimeout_minutes(optional): How long to wait (default 5, max 30)
get_thread_replies
Check for new replies in a thread.
get_thread_replies(
channel="YOUR-CHANNEL-ID",
thread_ts="1234567890.123456",
since_ts="1234567891.000000" # Only newer messages
)
Environment Variables
| Variable | Required | Description |
|---|---|---|
SLACK_BOT_TOKEN |
Yes | Bot token from Slack app (xoxb-...) |
SLACK_DEFAULT_CHANNEL |
No | Default channel for notifications |
Example Usage
Tell Claude Code:
"Notify me on Slack when the tests finish running"
"Ask me on Slack whether to proceed with the database migration"
"Send a Slack notification if any errors occur while I'm away"
Debugging
Run the MCP inspector to test tools:
npx @anthropics/mcp-inspector uvx slack-notifier-mcp@latest
Check if your token works:
curl -H "Authorization: Bearer xoxb-your-token" \
https://slack.com/api/auth.test
Development
# Install with dev dependencies
uv sync --extra dev
# Run tests
uv run pytest
# Format code
uv run black slack_mcp
uv run ruff check slack_mcp --fix
License
MIT
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。