-
Notifications
You must be signed in to change notification settings - Fork 26
feat: add Claude Code Channels support for real-time Slack messaging #23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from 19 commits
38f0488
a8a5bf5
67e979d
892e14d
5738952
b67af46
4d58042
0d4cf0c
49f59ff
7c40b29
0eeba18
2797fc4
6b8f779
e0c1c05
7fe6ee1
df990ee
d8925f8
b762219
2229830
45cf8b9
31758f9
a3cf06f
bd6036b
790e1b9
8323955
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| { | ||
| "name": "slack", | ||
| "description": "Slack integration for searching messages, sending communications, managing canvases, and more", | ||
| "description": "Slack integration for searching messages, sending communications, managing canvases, and real-time bidirectional messaging via Channels", | ||
| "version": "1.0.0", | ||
| "author": { | ||
| "name": "Slack", | ||
| "url": "https://slack.com" | ||
| }, | ||
| "homepage": "https://github.com/slackapi/slack-mcp-cursor-plugin", | ||
| "homepage": "https://github.com/slackapi/slack-mcp-plugin", | ||
| "license": "MIT" | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,3 @@ | ||
| .claude/ | ||
| .env | ||
| node_modules/ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,6 +7,14 @@ | |
| "clientId": "1601185624273.8899143856786", | ||
| "callbackPort": 3118 | ||
| } | ||
| }, | ||
| "slack-channel": { | ||
| "command": "bun", | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. question: Why
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. 🤖 Generated with Claude Code |
||
| "args": ["./src/index.ts"], | ||
| "env": { | ||
| "SLACK_BOT_TOKEN": "", | ||
| "SLACK_APP_TOKEN": "" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -84,6 +84,74 @@ Add the following configuration to connect to the remote Slack MCP server: | |
|
|
||
| Save the configuration. You will also see a connect button once added. Click that to authenticate into your Slack Workspace. | ||
|
|
||
| ## Channels (Research Preview) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: This plugin works with Cursor and Claude Code. So we should clarify that this is a Claude Code-specific feature.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good point. Updated the heading to "Channels for Claude Code (Research Preview)" to make it clear this is a Claude Code-specific feature. Fixed in 8323955. 🤖 Generated with Claude Code |
||
|
|
||
| The Channels feature lets Claude Code receive and respond to messages directly in Slack—via DMs or channel mentions—using a locally-run bot server. | ||
|
|
||
| ### Slack App Setup | ||
|
|
||
| 1. Create a new Slack app at [api.slack.com/apps](https://api.slack.com/apps) and select **Socket Mode**. | ||
| 2. Under **OAuth & Permissions**, add the following bot token scopes: | ||
| - `chat:write`, `reactions:write` | ||
| - `channels:join`, `channels:read`, `channels:history` | ||
| - `groups:read`, `im:read`, `im:history` | ||
| - `users:read`, `app_mentions:read` | ||
| 3. Under **Socket Mode**, enable it and generate an **App-Level Token** with the `connections:write` scope. This token begins with `xapp-`. | ||
| 4. Under **Event Subscriptions → Subscribe to bot events**, add: | ||
| - `message.im`, `message.channels`, `app_mention`, `reaction_added` | ||
| 5. Install the app to your workspace and copy the **Bot User OAuth Token** (`xoxb-...`). | ||
|
|
||
| ### Configuration | ||
|
|
||
| Add the `slack-channel` server entry to your `.mcp.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "mcpServers": { | ||
| "slack-channel": { | ||
| "command": "bun", | ||
| "args": ["./src/index.ts"], | ||
| "env": { | ||
| "SLACK_BOT_TOKEN": "xoxb-your-bot-token", | ||
| "SLACK_APP_TOKEN": "xapp-your-app-token" | ||
| } | ||
| } | ||
| } | ||
| } | ||
| ``` | ||
|
marciogranzotto marked this conversation as resolved.
|
||
|
|
||
| Alternatively, set `SLACK_BOT_TOKEN` and `SLACK_APP_TOKEN` as environment variables. | ||
|
|
||
| To pre-configure which Slack users are allowed to interact with the bot, create `~/.slack-channel/settings.json`: | ||
|
|
||
| ```json | ||
| { | ||
| "gating": { | ||
| "mode": "per-user", | ||
| "allowedUsers": ["U012AB3CD", "U098ZY7WX"] | ||
| }, | ||
| "watchedChannels": [] | ||
| } | ||
| ``` | ||
|
|
||
| ### Running | ||
|
|
||
| Start Claude Code with the channel server enabled: | ||
|
|
||
| ``` | ||
| claude --dangerously-load-development-channels server:slack-channel | ||
| ``` | ||
|
|
||
| ### Pairing | ||
|
|
||
| On the first run with an empty allowlist, DM the bot in Slack. It will reply with a pairing code. Send: | ||
|
|
||
| ``` | ||
| pair <CODE> | ||
| ``` | ||
|
|
||
| This completes pairing and adds you to the allowlist. Once paired, you can ask Claude to pair additional users on your behalf. | ||
|
|
||
| ## Usage Examples | ||
|
|
||
| Once configured, you can interact with Slack through your AI assistant using natural language: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
btw, version needs to be bumped after merging