anneschuth/claude-threads
Self-hosted Claude Code bridge for collaborative Slack and Mattermost threads
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Claude Threads is a self-hosted TypeScript bridge between Slack or Mattermost and the Claude Code CLI. A bot mention starts a real Claude Code session in a working directory on the host. The chat thread is the control surface: it receives responses, tool calls, diffs, task lists, and approval prompts, and sends replies and reactions back into the session. Concurrent threads can have distinct working directories, and sessions resume automatically after a bot restart.
The package exposes claude-threads, claude-threads-mcp, and claude-threads-daemon. Its manifest includes cross-spawn, ws, ink, and @modelcontextprotocol/sdk. Each session runs its own MCP server for chat-specific actions, while Claude Code can still use the host’s existing MCP servers and plugins. The result is a chat interface to a working development environment, not a separate coding agent or model runtime.
Key Capabilities & Differentiators
The bot can connect multiple Slack and Mattermost workspaces concurrently. It works with a Claude subscription or API key; an optional account pool assigns new sessions to the account with the most subscription headroom and cools down rate-limited accounts. Session commands support Git worktree switching and collaborator invitations with Co-Authored-By: attribution. Channel-scoped notes, facts distilled at session end, and Claude’s per-repository auto-memory provide continuity beyond a single thread.
Each session exposes nine chat MCP tools. send_file validates paths against the working directory; permalink reads and history are scoped to the bot’s channel and public channels. History is capped at 100 messages, and Mattermost-only search returns up to 25 results. Direct messages require thread approval and are capped at three per recipient per session. For Claude tool use, default asks the thread, auto delegates low-risk approvals to Claude’s classifier, and bypass skips prompts.
Trade-offs & Limitations
The decision turns on where Claude Code needs to run. Claude Code in Slack, Codex in Slack, and Cursor in Slack run sessions in vendor clouds; Claude Threads keeps CLI execution beside your checkout and tools, and adds Mattermost as a chat option. In return, your team owns the bot host, credentials, chat permissions, and connection recovery. Apache-2.0 covers the bot, not the Claude service, and even a self-hosted Mattermost deployment does not make Claude inference offline.
Treat the bot as a remote entry point to a development machine. An empty allowlist lets anyone in the channel start a session, and bypass removes tool prompts. Use an explicit allowlist, a least-privilege host account, and default approvals for shared deployments. A Git worktree separates branch changes; it is not a filesystem sandbox. Chat MCP guardrails constrain the chat tools, not the permissions of the underlying Claude Code process or other locally configured tools.
Hardware & Deployment Guide
Run on Bun 1.2.21+ or Node 22+, with the Claude Code CLI and a Claude subscription or API key. Install globally with bun install -g claude-threads or npm install -g claude-threads, then run claude-threads from the project directory to configure the bot and test its chat credentials. Size the host for concurrent CLI sessions and their builds, tests, and worktrees rather than for local model inference; no GPU or VRAM requirement is specified.
The bot retries dropped platform connections with exponential backoff and, by default, resets the retry cycle after a minute if attempts are exhausted. Under systemd or another supervisor, reconnectPolicy: exit makes it exit nonzero so the supervisor can restart it. v1.41.1 updated security-sensitive dependencies including Hono and @hono/node-server; v1.41.2 consolidated Socket Mode connections for entries on the same Slack app; v1.42.0 fixed event reception after re-enabling a platform in the terminal UI.
Engineering teams that want to collaborate on Claude Code sessions from Slack or Mattermost while retaining their local checkout, toolchain, and MCP setup.
You require offline inference, hard filesystem isolation between sessions, or a managed service with no bot host to operate.
Quick Start & Installation
# Install (pick one) bun install -g claude-threads # with Bun (recommended) npm install -g claude-threads # with npm # Run the setup wizard cd /your/project claude-threads
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| claude-threads ★ | 48 | — | TypeScript | Apache-2.0 | Self-hosted Claude Code bridge for collaborative Slack and Mattermost threads |
| cc-switch | 159.1k | +1.7k | Rust | MIT | Tauri desktop manager for AI coding providers, local routing, and MCP config |
| herdr | 54.1k | +871 | Rust | Apache-2.0 | Rust terminal multiplexer for persistent, multi-machine coding-agent workspaces |
| claude-code-router | 38.5k | +101 | TypeScript | MIT | Local model gateway for routing coding agents across providers |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/anneschuth/claude-threads.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about claude-threads
How do chat messages reach Claude Code, and where do the tools run?
Does the bot need a GPU, and how should I size the host?
Can we self-host it at work, and what compliance checks remain?
When should we choose it over a managed Slack coding integration?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy