TC

tomeraitz/claude-slack-bridge

Developer tools

Эта страница переведена автоматически. Технические детали смотрите в оригинале. Открыть оригинал

35 stars 16 forks Качество 75 Тренд 26MIT

MCP server that lets Claude Code pause mid-task and ask a human a question via Slack — then resume once you reply.

Обзор

A two-way bridge between Claude Code and Slack: - Claude pauses mid-task, asks a question via Slack, waits for your reply, and resumes. - 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 pauses mid-task, posts a question to Slack, blocks until you reply in the thread, then resumes. Multiple concurrent sessions are routed correctly by thread_ts. - — @claude-bot in a Slack channel spawns claude -p in the matching project directory inside the container. Supports git worktrees via a [label] prefix. - — a run has no wall-clock limit; it works until it finishes or you stop it.

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_slack MCP 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 by thread_ts.
  • Project-aware Slack bot — @claude-bot in a Slack channel spawns claude -p in 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 ⏳ idle hint (IDLE_HINT_SECONDS); a genuinely stuck one (no activity for IDLE_TIMEOUT_SECONDS) is killed. When it finishes, the message keeps the full panel with a ✅ Done headline on top (the whole greyed section stays — nothing is collapsed away). Per-model context windows and prices live in model_context.json. Turn the live message off with LIVE_PROGRESS=false (stop then falls back to the 🛑 reaction). Preview the layout locally with tools/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.

Открыть полный README на GitHub

Установка

docker exec -i -e SLACK_CHANNEL claude-slack-bridge python session.py
Новичок в MCP? Начните с руководства на mcpskill.org →

Конфигурация

{ "mcpServers": { "claude-slack-bridge": { "command": "docker", "args": [ "exec", "-i", "-e", "SLACK_CHANNEL", "claude-slack-bridge", "python", "session.py" ], "env": { "SLACK_CHANNEL": "#your-project-channel" } } } }