jorgeuriarte/claude-mcp-slack-feedback
If you are the rightful owner of claude-mcp-slack-feedback and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
A Model Context Protocol (MCP) server that integrates with Slack to facilitate real-time human feedback for Claude Code during task execution.
Claude MCP Slack Feedback
A Model Context Protocol (MCP) server that enables Claude Code to request human feedback through Slack during task execution.
Features
- 🔄 Real-time feedback: Ask questions and get responses from your team via Slack
- 🌐 Webhook support: Optional cloudflared tunnels for instant responses
- 📊 Polling mode: Default mode that works without any additional dependencies
- 👥 Multi-user support: Multiple developers can use simultaneously
- 🔀 Multi-session support: Handle multiple Claude sessions per user
- 🚀 Zero-configuration: Auto-detects users and creates channels
Installation
Quick Install
git clone https://github.com/yourusername/claude-mcp-slack-feedback.git
cd claude-mcp-slack-feedback
./scripts/install.sh
The installer will:
- Check Node.js version (18+ required)
- Build the project
- Configure Claude Desktop automatically
- Optionally suggest installing cloudflared for webhook support
Manual Installation
-
Clone and build:
git clone https://github.com/yourusername/claude-mcp-slack-feedback.git cd claude-mcp-slack-feedback npm install npm run build
-
Configure Claude Desktop:
Add to
~/.config/claude/mcp-servers.json
:{ "claude-mcp-slack-feedback": { "command": "node", "args": ["/path/to/claude-mcp-slack-feedback/dist/index.js"] } }
-
Restart Claude Desktop
Slack App Setup
Option 1: Using App Manifest (Recommended)
-
Create app from manifest:
- Go to https://api.slack.com/apps
- Click "Create New App" → "From an app manifest"
- Select your workspace
- Choose "YAML" format
- Copy and paste the contents of
slack-app-manifest.yml
- Review and create
-
Install to workspace:
- Click "Install to Workspace"
- Copy the Bot User OAuth Token (starts with
xoxb-
)
Option 2: Manual Setup
-
Create a Slack App:
- Go to https://api.slack.com/apps
- Click "Create New App" → "From scratch"
- Name it "Claude MCP Feedback"
- Select your workspace
-
Configure OAuth Scopes:
Under "OAuth & Permissions", add these Bot Token Scopes:
channels:manage
- Create and manage channelschat:write
- Send messageschannels:read
- List channelsusers:read
- Get user infousers:read.email
- Match by emailchannels:history
- Read channel messagesgroups:read
- Access private channelsgroups:history
- Read private channel messagesim:read
- Access direct messagesim:history
- Read direct messagesmpim:read
- Access group direct messagesmpim:history
- Read group direct messages
-
Optional: Configure Event Subscriptions (for webhooks):
- Enable Events
- The tunnel URL will be provided when you start a session
- Subscribe to bot events:
message.channels
message.groups
message.im
message.mpim
-
Install to Workspace:
- Click "Install to Workspace"
- Copy the Bot User OAuth Token (starts with
xoxb-
)
Usage
Initial Setup
In Claude, use the setup tool:
setup_slack_config with bot token "xoxb-your-token-here"
Webhook Mode Setup (Optional - Advanced Users)
By default, the bot uses polling mode which works great for most users. Webhooks are optional.
If you want real-time responses via webhooks:
-
First time using
ask_feedback
:- The system will show:
🔗 Webhook URL: https://abc123.trycloudflare.com/slack/events
- Copy this URL
- The system will show:
-
Configure Slack for webhooks:
- Go to your app at https://api.slack.com/apps
- Select your app → "Event Subscriptions"
- Toggle "Enable Events" to On
- Paste the webhook URL in "Request URL"
- Wait for "Verified" ✓
- Under "Subscribe to bot events", add:
message.channels
message.groups
message.im
message.mpim
- Click "Save Changes"
Important notes about webhooks:
- The URL changes every session (it's a temporary tunnel)
- You need to update Slack settings each time
- For this reason, polling mode is recommended for regular use
- Webhooks are mainly useful for testing real-time features
Asking for Feedback
ask_feedback with question "Should I use TypeScript or JavaScript for this project?" and context "Building a web scraper"
Getting Responses
get_responses
Updating Progress
update_progress with message "Analyzed the requirements, proceeding with implementation" and thread "1234567890.123456"
Managing Sessions
list_sessions
How It Works
-
Session Creation: When you first use
ask_feedback
, the system:- Detects your user (via email or username)
- Creates a unique session
- Creates a Slack channel for the session
-
Communication Modes:
- Webhook Mode: If cloudflared is installed, creates a tunnel for real-time responses
- Polling Mode: Falls back to checking Slack periodically
-
Channel Structure:
- Main channel:
#claude-username-main
- Session channels:
#claude-username-sessionid
- Main channel:
Environment Variables
CLAUDE_USER_EMAIL
: Set this to match your Slack email for automatic user detectionUSER
/USERNAME
: Used as fallback for user detection
Development
# Run in development mode
npm run dev
# Run tests
npm test
# Lint code
npm run lint
# Type check
npm run typecheck
Architecture
- MCP Server: Handles Claude tool requests
- Session Manager: Manages multi-user/multi-session state
- Slack Client: Handles Slack API communication with rate limiting
- Webhook Server: Express server for receiving Slack events
- Tunnel Manager: Manages cloudflared tunnels
- Config Manager: Persists configuration and sessions
Troubleshooting
"User not detected"
- Set
CLAUDE_USER_EMAIL
environment variable to your Slack email - Ensure the bot has
users:read.email
permission
"cloudflared not installed"
- Run the installer again and choose to install cloudflared
- Or install manually:
brew install cloudflare/cloudflare/cloudflared
"No responses received"
- Check the Slack channel for your messages
- Ensure the bot is in the channel
- Try using
get_responses
again
License
MIT