16.3 Slack Integration
Course: Claude Code - Enterprise Development
Section: Advanced MCP Integrations
Video Length: 3-4 minutes
Presenter: Daniel Treasure
Opening Hook
"Slack is where your team lives—decisions, discussions, incident updates. Today, we're connecting Claude to Slack via MCP to read channel context and draft smart messages. Claude understands what's been discussed and helps communicate clearly."
Key Talking Points
What to say:
- "The challenge: developers need to stay informed and communicate fast, but manually scrolling Slack history is slow."
- "MCP gives Claude read access to channel messages, threads, and decision context."
- "Claude can then draft replies, summaries, announcements based on actual conversation—not guessing."
- "We'll show three real use cases: incident updates, meeting summaries, status coordination."
What to show on screen:
- Slack channel with active conversation
- MCP Slack adapter configuration
- Claude reading channel history and thread context
- Claude drafting message suggestions
- Before/after: manual vs. AI-assisted communication
Demo Plan
[00:00 - 00:45] Slack MCP Setup
1. Show Slack app creation in admin panel
2. Explain scopes: channels:history, groups:history, users:read
3. Run claude mcp add command for Slack
4. Verify bot is invited to test channel
[00:45 - 01:45] Read Channel Context 1. Open Claude Code with Slack MCP connected 2. Ask: "Summarize the conversation in #product-roadmap from the past week" 3. Claude reads messages and generates structured summary: key decisions, open questions, agreed actions 4. Ask: "What's the status of the 'checkout redesign' discussion?" 5. Claude finds relevant thread, reads full context, synthesizes answer
[01:45 - 02:45] Draft Messages 1. Scenario: incident just resolved, need to update #incidents 2. Ask Claude: "Draft a message summarizing what happened, the fix, and next steps for #incidents" 3. Claude writes: clear, professional, links to root cause 4. Show how Claude includes context: duration of outage, affected users, timeline 5. Show you copy-pasting (not auto-posting) into Slack
[02:45 - 03:30] Use Cases & Variations 1. Meeting summary: "Summarize today's engineering standup in #eng-team and highlight blockers" 2. Status update: "Draft a status message for our on-call rotation about the database optimization" 3. Action items: "Extract the action items from the #planning thread and format for our sprint board"
Code Examples & Commands
# Note: As of 2024, Slack MCP is custom-built (not in official repo)
# Show manual configuration example:
# Create Slack app → OAuth token → add to .env
export SLACK_BOT_TOKEN="xoxb-..."
export SLACK_SIGNING_SECRET="..."
# Custom MCP server using Slack SDK
Python MCP Slack example:
from mcp.server import Server
from slack_sdk import WebClient
server = Server("slack-integration")
slack_client = WebClient(token=SLACK_BOT_TOKEN)
@server.tool("read_channel")
async def read_channel(channel_id: str, limit: int = 100) -> dict:
response = slack_client.conversations_history(channel=channel_id, limit=limit)
return {
"channel": channel_id,
"messages": response['messages'],
"context": extract_key_info(response['messages'])
}
@server.tool("read_thread")
async def read_thread(channel_id: str, thread_ts: str) -> dict:
response = slack_client.conversations_replies(
channel=channel_id, ts=thread_ts
)
return {"thread": response['messages']}
Example prompts:
1. Summarize:
"Read #incidents from the past 24 hours and summarize what happened, the fix, and impact"
2. Draft incident update:
"We just fixed the payment API timeout. Read the #incidents thread and draft a message for #general"
3. Extract decisions:
"What decisions were made in today's #planning meeting? List them with context"
4. Action items:
"Find all action items mentioned in #eng-team this week and format as a checklist"
5. Consensus check:
"Read the #architecture discussion about database migration. What's the team consensus?"
Gotchas & Tips
Gotcha 1: Slack Rate Limits - Slack API rate limits can hit if reading large channels - Solution: Limit time range ("past 7 days") or message count (100 messages max) - Pre-calculate summaries during off-peak hours
Gotcha 2: Thread Context Lost - If you ask Claude about a thread, always pass the full thread_ts - Message timestamps are unique in Slack; use them to build context
Gotcha 3: Sensitive Data in Channels - Some channels may contain credentials, customer data, PII - Solution: Configure MCP scope to exclude private/sensitive channels - Review Slack permissions carefully
Gotcha 4: Message Formatting - Slack markdown is slightly different from standard markdown - Claude will draft using standard markdown; you'll need to adjust for Slack (bold vs bold, code blocks)
Tip 1: Thread Conversations - Ask Claude to read specific threads for context - Threads are where real decisions happen—summaries of channel messages alone miss nuance
Tip 2: User Context - Include Slack user info in prompt: "Draft a message thanking @sarah for her help on the deployment" - Claude can reference team members by name
Tip 3: Reaction Summaries - Ask: "What's the team's reaction to the new API pricing proposal?" (read emoji reactions) - Useful for gauging consensus without explicit voting
Tip 4: Draft, Don't Auto-Post - Always review Claude's message before posting - Tone can vary—sometimes Claude needs a reminder about your team's voice/culture
Lead-out
"You've seen how Claude reads Slack conversations and drafts smart messages tailored to your team's context. Next, we're moving to project management—connecting Claude to Jira to understand sprints, issues, and enterprise workflows."
Reference URLs
- Slack SDK for Python: https://slack.dev/python-slack-sdk/
- Slack API Scopes: https://api.slack.com/scopes
- Slack Rate Limits: https://api.slack.com/docs/rate-limits
- Slack Message Formatting: https://api.slack.com/reference/surfaces/formatting
Prep Reading
- Create a Slack test workspace or use a channel in existing workspace (2 min)
- Generate Slack bot token with appropriate scopes (5 min)
- Review past conversations in your team Slack (understand tone/style) (5 min)
Notes for Daniel
- Privacy reminder: If recording, use a test workspace—never show real company Slack with sensitive discussions.
- Tone: Emphasize that Claude drafts; you always review. This is not automation, it's augmentation.
- Team culture: Mention that you might need to adjust Claude's tone—it writes professionally, but every team has its own voice.
- Common use case: This is gold for distributed teams where async communication is critical (e.g., incident updates, status reports).
- Integration point: Mention that drafted messages can be created via Slack API too—making this fully automated if desired (with proper approval workflows).