Discord Approval Server MCP
English | 日本語
An MCP server that sends approval requests and notifications via Discord from Claude Code.
Installation
Option A: Plugin Installation (Recommended)
# 1. Add the marketplace
claude plugin marketplace add malanjp/discord-approval-mcp
# 2. Install the plugin
claude plugin install discord-approval
# 3. Set environment variables (see below)
# 4. Restart Claude Code
The plugin automatically:
- Configures the MCP server
- Provides usage guide skill
Environment Variables Configuration
You need to set DISCORD_BOT_TOKEN and DISCORD_CHANNEL_ID. Choose one of the following methods:
Method 1: Project-local settings (Recommended)
Create .claude/settings.local.json in your project root (add to .gitignore):
{
"env": {
"DISCORD_BOT_TOKEN": "your_bot_token",
"DISCORD_CHANNEL_ID": "your_channel_id"
}
}
Method 2: User-wide settings
Create or edit ~/.claude/settings.json:
{
"env": {
"DISCORD_BOT_TOKEN": "your_bot_token",
"DISCORD_CHANNEL_ID": "your_channel_id"
}
}
Method 3: Shell environment variables
Add to ~/.zshrc or ~/.bashrc:
export DISCORD_BOT_TOKEN="your_bot_token"
export DISCORD_CHANNEL_ID="your_channel_id"
Priority Order (highest to lowest)
.claude/settings.local.json (project-local, gitignored)
.claude/settings.json (project-shared)
~/.claude/settings.json (user-wide)
- OS environment variables (
~/.zshrc, etc.)
Option B: Manual Setup
Setup
1. Create a Discord Bot
- Go to the Discord Developer Portal
- Click New Application → Enter an application name
- Navigate to the Bot tab → Click Reset Token → Copy the token
- In the Bot tab → Enable MESSAGE CONTENT INTENT (optional)
- Go to OAuth2 → URL Generator:
- Scopes:
bot
- Bot Permissions:
Send Messages, Read Message History
- Use the generated URL to invite the bot to your server
2. Get the Channel ID
- Open Discord Settings → Advanced → Enable Developer Mode
- Right-click the channel where you want to receive notifications → Copy ID
3. Build
npm install
npm run build
4. Configure Claude Code
Add to ~/.claude.json:
{
"mcpServers": {
"discord-approval": {
"command": "node",
"args": ["/path/to/discord-approval-mcp/dist/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your_bot_token",
"DISCORD_CHANNEL_ID": "your_channel_id"
}
}
}
}
Available Tools
request_approval
Sends an approval request and waits for the user's response.
| Parameter | Type | Required | Description |
|---|
| message | string | ✅ | The content to be approved |
| timeout | number | - | Timeout in seconds (default: 300) |
Returns: Approved / Denied / Timeout
notify
Sends a notification (no response required).
| Parameter | Type | Required | Description |
|---|
| message | string | ✅ | The notification message |
ask_question
Sends a question with multiple choices and waits for the user's selection.
| Parameter | Type | Required | Description |
|---|
| question | string | ✅ | The question to ask |
| options | string[] | ✅ | Array of choices (2-25 items) |
| timeout | number | - | Timeout in seconds (default: 300) |
Returns: The selected option / Timeout
schedule_reminder
Schedules a reminder to be sent to Discord after a specified delay. Use with AskUserQuestion to notify via Discord when the user doesn't respond in time.
| Parameter | Type | Required | Description |
|---|
| message | string | ✅ | The reminder message |
| delay_seconds | number | ✅ | Delay in seconds (1-3600) |
Returns: { reminder_id: string } for cancellation
cancel_reminder
Cancels a scheduled reminder.
| Parameter | Type | Required | Description |
|---|
| reminder_id | string | ✅ | The reminder ID from schedule_reminder |
Returns: Success / Error message
notify_with_status
Sends a notification with status using Discord Embed (color-coded).
| Parameter | Type | Required | Description |
|---|
| message | string | ✅ | The notification message |
| status | string | ✅ | Status type: success (green), error (red), warning (yellow), info (blue) |
| details | string | - | Additional details (optional) |
Returns: Success / Error message
request_text_input
Requests text input from the user via Discord Modal dialog.