This guide walks you through connecting cc-connect to Slack, so you can chat with your local Claude Code via a Slack bot.
- A Slack workspace account (with permission to create apps)
- A machine that can run cc-connect (no public IP needed)
- Claude Code installed and configured
💡 Advantage: Uses Socket Mode (WebSocket) — no public IP, no domain, no reverse proxy needed.
Go to Slack API and sign in with your Slack account.
- Click "Create New App"
- Select "From scratch"
- Fill in the app details:
| Field | Suggested Value |
|---|---|
| App Name | cc-connect |
| Development Slack Workspace | Select your workspace |
- Click "Create App"
In the left sidebar, click "App Home".
- Click "Edit" to configure the bot display name
- Fill in:
| Field | Suggested Value |
|---|---|
| Display Name (Bot Name) | cc-connect |
| Default Username | cc_connect |
Toggle on "Always Show My Bot as Online".
In the left sidebar, click "OAuth & Permissions".
Under "Scopes" → "Bot Token Scopes", add:
| Scope | Purpose |
|---|---|
app_mentions:read |
Read @mention messages |
chat:write |
Send messages |
im:history |
Read DM history |
im:read |
Read DM list |
im:write |
Send DMs |
channels:history |
Read channel messages (optional) |
groups:history |
Read private channel messages (optional) |
users:read |
Get user info |
In the left sidebar, click "Socket Mode".
- Toggle on "Enable Socket Mode"
- Click "Generate Token and Enter Socket Mode"
- Enter a token name (e.g.
cc-connect-socket-token) - Add the following scope:
connections:write— establish WebSocket connections
- Click "Generate"
The system will generate an App-Level Token (format: xapp-xxxxxxx...). Save it immediately.
⚠️ The token is only shown once — copy it now!
In the left sidebar, click "Event Subscriptions".
- Toggle on "Enable Events"
- Since we're using Socket Mode, no Request URL is needed
Under "Subscribe to bot events", add:
| Event | Purpose |
|---|---|
app_mention |
Triggered when the bot is @mentioned |
message.im |
Triggered when a DM is received |
Click "Save Changes".
In the left sidebar, click "Install App" → "Install to Workspace".
Review the permissions and click "Allow".
After installation, you'll see:
Bot User OAuth Token: xoxb-xxxxxxx...
⚠️ Save this token — you'll need it for configuration.
Add both tokens to your config.toml:
[[projects]]
name = "my-project"
[projects.agent]
type = "claudecode"
[projects.agent.options]
work_dir = "/path/to/your/project"
mode = "default"
[[projects.platforms]]
type = "slack"
[projects.platforms.options]
bot_token = "xoxb-xxxxxxx..."
app_token = "xapp-xxxxxxx..."| Token | Prefix | Purpose |
|---|---|---|
| Bot Token | xoxb- |
Bot API authentication |
| App Token | xapp- |
Socket Mode connection |
cc-connect
# Or specify a config file
cc-connect -config /path/to/config.tomlYou should see logs like:
level=INFO msg="slack: connected"
level=INFO msg="platform started" project=my-project platform=slack
level=INFO msg="cc-connect is running" projects=1
- Search for your bot name in Slack
- Open a DM conversation
- Send a message
- Add the bot to a channel (
/invite @cc_connect) - @mention the bot:
@cc_connect help me analyze the code - The bot will respond
User: @cc_connect Help me analyze the current project structure
cc-connect: 🤔 Thinking...
cc-connect: 🔧 Tool: Bash(ls -la)
cc-connect: Here's the project structure...
┌─────────────────────────────────────────────────────────────┐
│ Slack Cloud │
│ │
│ User Message ──→ Slack API ──→ Socket Mode Gateway │
│ │ │
└───────────────────────────────────────┼──────────────────────┘
│
│ WebSocket (no public IP needed)
▼
┌─────────────────────────────────────────────────────────────┐
│ Your Local Machine │
│ │
│ cc-connect ◄──► Claude Code CLI ◄──► Your Project Code │
│ │
└─────────────────────────────────────────────────────────────┘
| Feature | Socket Mode | Webhook |
|---|---|---|
| Public IP | ❌ Not needed | ✅ Required |
| Domain | ❌ Not needed | ✅ Required |
| HTTPS cert | ❌ Not needed | ✅ Required |
| Reverse proxy | ❌ Not needed | ✅ Required |
| Connection | WebSocket | HTTP callback |
| Complexity | Simple | More complex |
| Best for | Local dev, private network | Production |
Check the following:
- Is the App Token correct? (starts with
xapp-) - Does the App Token have
connections:writescope? - Is Socket Mode enabled in the app settings?
Check the following:
- Is the Bot Token correct? (starts with
xoxb-) - Are event subscriptions configured correctly?
- Are the required scopes added?
- Go to "Install App"
- Click "Reinstall to Workspace"
Make sure you've subscribed to the message.im event.
Make sure:
- You've subscribed to the
app_mentionevent - The bot has been added to the channel
- You @mentioned the bot in your message
- Slack API Documentation
- Slack App Building Guide
- Socket Mode Documentation
- Bot Token Scopes
- Event Types