MCP server for Slack notifications with bidirectional communication
Project description
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=C1234567890 \
-- uvx slack-notifier-mcp
Features
- Notify - Send notifications when tasks complete, errors occur, or when stepping away
- 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=C1234567890 \
-- uvx slack-notifier-mcp
VS Code
code --add-mcp '{"name":"slack-notifier","command":"uvx","args":["slack-notifier-mcp"],"env":{"SLACK_BOT_TOKEN":"xoxb-your-token","SLACK_DEFAULT_CHANNEL":"C1234567890"}}'
Other MCP Clients
Claude Desktop
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"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "C1234567890"
}
}
}
}
Cursor
- Go to Settings → MCP → Add new MCP Server
- Select
commandtype - Enter command:
uvx slack-notifier-mcp - Add environment variables for
SLACK_BOT_TOKENandSLACK_DEFAULT_CHANNEL
Or add to ~/.cursor/mcp.json:
{
"mcpServers": {
"slack-notifier": {
"command": "uvx",
"args": ["slack-notifier-mcp"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "C1234567890"
}
}
}
}
Windsurf / Other MCP Clients
Any MCP-compatible client can use slack-notifier:
{
"mcpServers": {
"slack-notifier": {
"command": "uvx",
"args": ["slack-notifier-mcp"],
"env": {
"SLACK_BOT_TOKEN": "xoxb-your-token",
"SLACK_DEFAULT_CHANNEL": "C1234567890"
}
}
}
}
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
notify
Send a notification to Slack.
notify(
message="GPU instance is ready! SSH: ubuntu@192.168.1.100",
urgency="important" # or "normal", "critical"
)
Parameters:
message(required): Notification text (supports Slack mrkdwn)channel(optional): Channel ID or name (uses default if not set)urgency(optional):normal,important, orcritical
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)
send_message
Lower-level message sending for conversational use.
send_message(
message="Done with the first step, moving on...",
thread_ts="1234567890.123456" # Reply in thread
)
get_thread_replies
Check for new replies in a thread.
get_thread_replies(
channel="C1234567890",
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
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slack_notifier_mcp-0.2.0.tar.gz.
File metadata
- Download URL: slack_notifier_mcp-0.2.0.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cbcb61892acca3bb2f0aca5020cd9fbf349b5d3a24b1c31ba88ee9587a6d96f7
|
|
| MD5 |
14170e26321a81b3e06b62d2a0031d1a
|
|
| BLAKE2b-256 |
ed1e38c937a664fb4a4a423c6b899982abe858bdc30ed136db30a0ad3ce17a39
|
Provenance
The following attestation bundles were made for slack_notifier_mcp-0.2.0.tar.gz:
Publisher:
publish.yml on Strand-AI/slack-notifier-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_notifier_mcp-0.2.0.tar.gz -
Subject digest:
cbcb61892acca3bb2f0aca5020cd9fbf349b5d3a24b1c31ba88ee9587a6d96f7 - Sigstore transparency entry: 833495560
- Sigstore integration time:
-
Permalink:
Strand-AI/slack-notifier-mcp@c00106cc08cdea28f933db880d11770d64fe08fb -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Strand-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c00106cc08cdea28f933db880d11770d64fe08fb -
Trigger Event:
push
-
Statement type:
File details
Details for the file slack_notifier_mcp-0.2.0-py3-none-any.whl.
File metadata
- Download URL: slack_notifier_mcp-0.2.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0582e57cf510d842e583936b35c7ebac6501357530f5549b291dcb33f0dfd3d
|
|
| MD5 |
b4788cbc11fea905707735a66d598a8d
|
|
| BLAKE2b-256 |
5898064e8dc22ad6d0cffa5f651d7aa557b368f68a6757e049a8daa1bafcc9df
|
Provenance
The following attestation bundles were made for slack_notifier_mcp-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on Strand-AI/slack-notifier-mcp
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_notifier_mcp-0.2.0-py3-none-any.whl -
Subject digest:
b0582e57cf510d842e583936b35c7ebac6501357530f5549b291dcb33f0dfd3d - Sigstore transparency entry: 833495564
- Sigstore integration time:
-
Permalink:
Strand-AI/slack-notifier-mcp@c00106cc08cdea28f933db880d11770d64fe08fb -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/Strand-AI
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c00106cc08cdea28f933db880d11770d64fe08fb -
Trigger Event:
push
-
Statement type: