https://github.com/zebbern/claude-code-discord
A Discord bot that brings Claude Code to your channels so you can chat, run shell/git, and manage branches. Access from any local, VM, or Docker instance with full capebilty of claude code!
https://github.com/zebbern/claude-code-discord
List: claude-code-discord
anthropic anthropic-claude automation-framework awesome awesome-list awesome-lists claude claude-ai claude-ai-bot claude-code claude-code-commands claude-code-discord developer discord-api discord-bot opus sonnet-4 tools-and-automation
Last synced: 6 months ago
JSON representation
A Discord bot that brings Claude Code to your channels so you can chat, run shell/git, and manage branches. Access from any local, VM, or Docker instance with full capebilty of claude code!
- Host: GitHub
- URL: https://github.com/zebbern/claude-code-discord
- Owner: zebbern
- License: mit
- Created: 2025-08-27T16:26:27.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2025-08-28T00:07:54.000Z (6 months ago)
- Last Synced: 2025-08-28T02:24:24.350Z (6 months ago)
- Topics: anthropic, anthropic-claude, automation-framework, awesome, awesome-list, awesome-lists, claude, claude-ai, claude-ai-bot, claude-code, claude-code-commands, claude-code-discord, developer, discord-api, discord-bot, opus, sonnet-4, tools-and-automation
- Language: TypeScript
- Homepage:
- Size: 48.8 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# claude-code-discord
| Advantage | Details | Status |
|---------------------------------------------|---------------------------------------------------------------------------------------------|:------:|
| Use Claude Code Anywhere | Host locally (VM / Docker / cloud) and send commands via the Discord API | ✅ |
| Centralized collaboration | Run commands and discuss results where your team already communicates | ✅ |
| Branch-aware organization | Maps Git branches to channels/categories so feature work stays separated | ✅ |
| Immediate, shareable feedback | Execute `/git`, `/shell`, or `/claude` and get outputs directly in-channel | ✅ |
| Reduced context switching | Keep actions, logs, and discussion together — less switching between terminal and chat | ✅ |
| Role-based access control | Restrict destructive commands (`/shell`, `/git`, worktree ops) to specific Discord roles | ✅ |
| Non-developer friendly | PMs, QA, and stakeholders can trigger checks and view results without repo access | ✅ |
| Automatable touchpoint | Integrate with CI/webhooks to triage issues and run fixes from chat | ✅ |
| Local hosting & security | Keep keys and code on your infra while exposing a controlled interface through Discord | ✅ |
| Audit trail & accountability | Channel history provides an easy-to-search record of who ran what and when | ✅ |
**Start Here If You Have These:**
DISCORD_TOKEN
APPLICATION_ID
- **[Quick Start](#pre)**
- **[Command List 48 Commands](#Command-list)**
**Tutorial If you dont know or have them follow these first then come back:**
- **[How To Setup Discord Bot?](#setup)**
---
### Preview:

Quick Start
- **Install Deno Can Be Done Via [Denos Website](https://deno.com/) Or Commands Under:**
```C
# Linux/MacOS
curl -fsSL https://deno.land/install.sh | sh
# Windows|Powershell
irm https://deno.land/install.ps1 | iex
```
**Clone the project:**
```
git clone https://github.com/zebbern/claude-code-discord.git
cd claude-code-discord
```
**Install claude `If you dont have it` and login:**
```
npm install -g @anthropic-ai/claude-code
claude /login
```
**Required environment variables**
```
# Linux
export DISCORD_TOKEN="your-discord-bot-token"
export APPLICATION_ID="your-discord-app-id"
# Windows Terminal
set DISCORD_TOKEN=your-discord-bot-token
set APPLICATION_ID=your-discord-app-id
# Windows Powershell
$env:DISCORD_TOKEN = "your-discord-bot-token"
$env:APPLICATION_ID = "your-discord-app-id"
```
**Now Run the discord Bot**
> If you get `not a git directory` just run
> git add .
```bash
# Option 1: Just run the bot
deno run --allow-all index.ts
# Option 2: Run the bot with extra terminal output (For Dev)
deno run --allow-all index.ts --watch
# Option 3: Run the bot and get pings when claude is done
./index.ts --category myproject --user-id Your_Discord_User_ID_Here
# Can also be ran like this:
deno run --allow-all index.ts --category yourproject --user-id Your_Discord_User_ID_Here
```
**You can run without `--user-id Your_Discord_User_ID_Here` if you dont want to be notified when claude finishes**

Setup Discord Bot
1. Create a Discord Application
> [!Note]
> - Go to the [Discord Developer Portal](https://discord.com/developers/applications)
> - Click New Application
> - Give your application a name (e.g., ClaudeCode)
> - Click Create
> 
2. Copy Application ID (Needed For Config)
> [!Note]
> - Go to the General Information → Copy Application ID section
> 
3. Create a Bot User
> [!Note]
> - In your application, go to the Bot section in the left sidebar
> - Click Add Bot
> - Under Token click Copy to copy your bot token (keep this secure!)
> - Click Save Changes
> 
4. Invite the Bot to Your Server
> [!Note]
> - Go to the OAuth2 → URL Generator section
> - Under Scopes select:
> ```
> + | bot
> + | applications.commands
> ```
> - Under Bot Permissions select:
> ```
> + | Send Messages
> + | Use Slash Commands
> + | Read Message History
> + | Embed Links
> ```
> Copy the generated URL and open it in your browser
> Select your Discord server and authorize the bot
>
>
> 
## Command List
> (48 Commands)
### Core Claude (3)
- `/claude`, `/continue`, `/claude-cancel`
### Enhanced Claude (4)
- `/claude-enhanced`, `/claude-models`, `/claude-sessions`, `/claude-context`
### Development Tools (7)
- `/claude-explain`, `/claude-debug`, `/claude-optimize`, `/claude-review`
- `/claude-generate`, `/claude-refactor`, `/claude-learn`
### New Features (3)
- `/todos` - Task management with API rate limits
- `/mcp` - Model Context Protocol servers
- `/agent` - 7 specialized AI agents
### Settings (4)
- `/settings` - Unified settings (NEW)
- `/claude-settings`, `/output-settings`, `/quick-model`
### Git Operations (6)
- `/git`, `/worktree`, `/worktree-list`, `/worktree-remove`
- `/worktree-bots`, `/worktree-kill`
### Shell Management (4)
- `/shell`, `/shell-input`, `/shell-list`, `/shell-kill`
### System Monitoring (10)
- `/system-info`, `/processes`, `/system-resources`, `/network-info`
- `/disk-usage`, `/env-vars`, `/system-logs`, `/port-scan`
- `/service-status`, `/uptime`
### Utilities (4)
- `/status`, `/pwd`, `/shutdown`, `/help`
### Agent System (3)
- `/agent` with 7 specialized agents:
- Code Reviewer, Software Architect, Debug Specialist
- Security Analyst, Performance Engineer, DevOps Engineer, General Assistant
#### Thinking Mode Options ✨
- `none` - Standard Claude responses
- `think` - Step-by-step reasoning mode
- `think-hard` - Deep analysis and reasoning
- `ultrathink` - Maximum depth thinking for complex problems
#### Operation Mode Options ✨
- `normal` - Standard operation with user confirmation
- `plan` - Planning mode without execution
- `auto-accept` - Automatically apply suggested changes
- `danger` - Unrestricted mode (high risk)
#### `/todos` Command ✨
- **Action types**: list, add, complete, generate, prioritize, rate-status
- **Priority levels**: low, medium, high, critical
- **Rate limit awareness** - Supports Anthropic API tiers including `exceeds_200k_tokens`
- **Token estimation** - Calculates estimated token usage
- **Auto-generation** - Generate todos from code files
#### `/mcp` Command ✨
- **MCP server management** - Model Context Protocol integration
- **Server types**: local, http, websocket, ssh
- **Actions**: list, add, remove, test, status
- **Connection testing** - Verify MCP server connectivity
#### `/agent` Command ✨
- **Specialized AI agents** for different development tasks:
- Code Reviewer - Quality analysis and security
- Software Architect - System design and architecture
- Debug Specialist - Bug analysis and troubleshooting
- Security Analyst - Vulnerability assessment
- Performance Engineer - Optimization and profiling
- DevOps Engineer - Deployment and infrastructure
- General Assistant - Multi-purpose development help
- **Risk levels** - Low/Medium/High risk classification
- **Session management** - Persistent agent conversations
- **Context awareness** - Include system info and files