TC 

MCP服务器允许Claude Code在任务中暂停,并通过Slack向真人提问——回复后再继续。
概览
Claude Code 与 Slack 之间的双向桥梁: - Claude 在任务中途暂停,通过 Slack 提问,等待你的回复后继续。- 在 Slack 频道中标记机器人,Claude 会根据频道上下文完整运行——它知道该做哪个项目。 - — Claude 在任务中途暂停,向 Slack 发布问题,阻塞直到你在线程中回复,然后继续。多个并发会话由 thread_ts 正确路由。- — Slack 频道中的 @claude-bot 在容器内匹配的项目目录中生成 claude -p。通过 [label] 前缀支持 git 工作树。- — 运行没有墙时限限制;它工作直到完成或你停止运行。
概述(AI 翻译)
Claude Code 与 Slack 之间的双向桥梁:
- Claude → Slack: Claude 在任务中途暂停,通过 Slack 提问,等待你的回复,然后继续。
- Slack → Claude: 在 Slack 频道中标记机器人,Claude 会根据频道知道该做哪个项目。
它的作用
ask_on_slackMCP 工具 — Claude 在任务中暂停,向 Slack 发布问题,阻塞直到你在线程中回复,然后继续。多个并发会话由thread_ts正确路由。- 项目感知Slack机器人 — Slack通道中的
@claude-bot在容器内匹配的项目目录中生成claude -p。通过[label]前缀支持git工作树。 - 实时进度,无超时 — 跑动没有墙壁计时限制;它一直有效,直到完成或你停止。
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 README 节选,完整内容请查看原文。
Claude ↔ Slack Bridge
A two-way bridge between Claude Code and Slack:
- Claude → Slack: Claude pauses mid-task, asks a question via Slack, waits for your reply, and resumes.
- Slack → Claude: Tag the bot in a Slack channel and Claude runs with full project context — it knows which project to work on based on the channel.
Claude Code ──ask_on_slack──▶ Slack channel ──your reply──▶ Claude Code resumes
Slack @bot ──────────────────▶ claude -p (in project dir) ──▶ reply in thread
What It Does
ask_on_slackMCP tool — Claude pauses mid-task, posts a question to Slack, blocks until you reply in the thread, then resumes. Multiple concurrent sessions are routed correctly bythread_ts.- Project-aware Slack bot —
@claude-botin a Slack channel spawnsclaude -pin the matching project directory inside the container. Supports git worktrees via a[label]prefix. - Live progress, no timeout — a run has no wall-clock limit; it works until it finishes or you stop it. While it runs, the bot edits one status message in the thread: a todo checklist, recent actions (newest first, up to 99/update), a changed-files section with per-file
+/−churn, and a grey resource line (per-tool breakdown, subagents, skills used, MCP servers, compaction count, errors, tokens in/out/cache + estimated cost, context used/window + %, turns, model, elapsed) — all derived from the CLI’s event stream with no extra model calls. Actions are numbered (newest = highest, on top). A quiet run shows an⏳ idlehint (IDLE_HINT_SECONDS); a genuinely stuck one (no activity forIDLE_TIMEOUT_SECONDS) is killed. When it finishes, the message keeps the full panel with a✅ Doneheadline on top (the whole greyed section stays — nothing is collapsed away). Per-model context windows and prices live inmodel_context.json. Turn the live message off withLIVE_PROGRESS=false(stop then falls back to the 🛑 reaction). Preview the layout locally withtools/preview_status.py. - Stop a running task — react with 🛑 to the live status message (the bot pre-adds the 🛑 there) or to the message that started the run. Either way the bot kills it (and everything it spawned), posts
⏹️ Stopped., and drops the partial reply. No Slack Interactivity setup needed — it’s a plain reaction. - Full-process plugin — a turnkey feature-development workflow driven from Slack (
/process start→ pick a task → worktree → design → plan → run-plan → PR per step).
Quickstart — Claude → Slack
1. Create a Slack app and get tokens
Follow docs/slack-setup.md to create a Slack app, get your xoxb- and xapp- tokens, and invite the bot to a channel.
安装
docker exec -i -e SLACK_CHANNEL claude-slack-bridge python session.py配置
{
"mcpServers": {
"claude-slack-bridge": {
"command": "docker",
"args": [
"exec", "-i",
"-e", "SLACK_CHANNEL",
"claude-slack-bridge",
"python", "session.py"
],
"env": {
"SLACK_CHANNEL": "#your-project-channel"
}
}
}
}