Skip to content

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!

Notifications You must be signed in to change notification settings

zebbern/claude-code-discord

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Tutorial If you dont know or have them follow these first then come back:


Preview:

image

Quick Start

# 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 .

# 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 image

Setup Discord Bot

1. Create a Discord Application

Note

app-create

2. Copy Application ID (Needed For Config)

Note

  • Go to the General Information → Copy Application ID section
APPLICATION_ID

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
image

4. Invite the Bot to Your Server

Note

  • Go to the OAuth2URL 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 oauth2 botallowcommands image

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

About

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!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •