1
0
Fork 0
claude-code-complete-agent/messaging/slack-setup.md
Kjell Tore Guttormsen 2491f5c732 feat: initial companion repo for OpenClaw vs Claude Code article
40 files demonstrating every major OpenClaw capability using Claude Code:
- 3 agents (researcher, writer, reviewer)
- 3 skills (daily-briefing, slack-message, web-research)
- 2 security hooks (pre-tool-use blocker, post-tool-use logger)
- 10 self-contained examples with copy-paste prompts
- Complete feature map (20 capabilities, 11 full match, 7 different, 2 gap)
- Security docs including NemoClaw comparison
- Automation, messaging, browser, memory documentation

Zero dependencies. Clone and run.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-26 09:47:29 +01:00

1.4 KiB

Slack Setup via MCP

1. Create a Slack App

Go to https://api.slack.com/apps and click "Create New App". Choose "From scratch". Give it a name and select your workspace.

2. Add Bot Token Scopes

Navigate to "OAuth & Permissions" in the sidebar. Under "Bot Token Scopes", add:

  • chat:write - post messages
  • channels:read - list channels
  • channels:history - read messages (if needed)

3. Install to workspace

Click "Install to Workspace" at the top of the OAuth & Permissions page. Authorize. Copy the "Bot User OAuth Token" (starts with xoxb-).

4. Add to .mcp.json

{
  "mcpServers": {
    "slack": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-slack"],
      "env": {
        "SLACK_BOT_TOKEN": "xoxb-your-token-here",
        "SLACK_TEAM_ID": "T0123456789"
      }
    }
  }
}

Find your Team ID in the Slack URL when logged into the web app: https://app.slack.com/client/T0123456789/...

Store the token in an environment variable rather than hardcoding it.

5. Test

Start Claude Code in your project directory. Try:

Send a message to #general saying "Claude Code Slack integration is working"

Claude will use the slack_post_message tool from the MCP server.

Troubleshooting

  • "not_in_channel": Invite the bot to the channel first (/invite @your-bot-name)
  • Token not found: verify the env var is exported before launching Claude Code