/ 目錄 / 演練場 / discord-mcp
● 社群 SaseQ ⚡ 即開即用

discord-mcp

作者 SaseQ · SaseQ/discord-mcp

Full Discord server management from AI — messages, channels, roles, moderation, events, webhooks, and voice channels.

discord-mcp is a Java-based MCP server built on JDA (Java Discord API) that gives AI assistants full control over Discord servers. It exposes 44+ tools covering messaging, channel management, role administration, moderation (kick/ban/timeout), voice channels, scheduled events, webhooks, and emoji management. Supports Docker deployment with both HTTP and stdio transport.

為什麼要用

核心特性

即時演示

實際使用效果

discord-mcp-2.replay ▶ 就緒
0/0

安裝

選擇你的客戶端

~/Library/Application Support/Claude/claude_desktop_config.json  · Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "discord-mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/SaseQ/discord-mcp"
      ]
    }
  }
}

開啟 Claude Desktop → Settings → Developer → Edit Config。儲存後重啟應用。

~/.cursor/mcp.json · .cursor/mcp.json
{
  "mcpServers": {
    "discord-mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/SaseQ/discord-mcp"
      ]
    }
  }
}

Cursor 使用與 Claude Desktop 相同的 mcpServers 格式。專案級設定優先於全域。

VS Code → Cline → MCP Servers → Edit
{
  "mcpServers": {
    "discord-mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/SaseQ/discord-mcp"
      ]
    }
  }
}

點擊 Cline 側欄中的 MCP Servers 圖示,然後選 "Edit Configuration"。

~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "discord-mcp-2": {
      "command": "TODO",
      "args": [
        "See README: https://github.com/SaseQ/discord-mcp"
      ]
    }
  }
}

格式與 Claude Desktop 相同。重啟 Windsurf 生效。

~/.continue/config.json
{
  "mcpServers": [
    {
      "name": "discord-mcp-2",
      "command": "TODO",
      "args": [
        "See README: https://github.com/SaseQ/discord-mcp"
      ]
    }
  ]
}

Continue 使用伺服器物件陣列,而非映射。

~/.config/zed/settings.json
{
  "context_servers": {
    "discord-mcp-2": {
      "command": {
        "path": "TODO",
        "args": [
          "See README: https://github.com/SaseQ/discord-mcp"
        ]
      }
    }
  }
}

加入 context_servers。Zed 儲存後熱重載。

claude mcp add discord-mcp-2 -- TODO 'See README: https://github.com/SaseQ/discord-mcp'

一行命令搞定。用 claude mcp list 驗證,claude mcp remove 移除。

使用場景

實戰用法: discord-mcp

How to automate Discord server moderation with discord-mcp

👤 Discord server moderators and community managers ⏱ ~10 min beginner

何時使用: You want to perform bulk moderation actions or set up automated responses.

前置條件
  • Discord bot token — Create a bot at discord.com/developers and invite it to your server with appropriate permissions
步驟
  1. Review recent activity
    Show me the last 50 messages in #general. Flag any that contain spam links or rule violations.✓ 已複製
    → Message list with flagged items highlighted
  2. Take moderation action
    Delete the flagged messages and timeout the users who posted them for 24 hours.✓ 已複製
    → Confirmation of deletions and timeouts applied

結果: Spam cleaned up and violators timed out in one operation.

注意事項
  • Bot lacks required permissions — Ensure the bot role has Manage Messages, Moderate Members, and other needed permissions

Set up event channels and scheduled events for your community

👤 Community organizers running Discord-based events ⏱ ~15 min intermediate

何時使用: You need to create channels, roles, and scheduled events for a community meetup or tournament.

前置條件
  • Discord bot with Manage Channels and Manage Events permissions — Set up via discord.com/developers
步驟
  1. Create event infrastructure
    Create a new category called 'Game Night March 2025' with text channels #announcements, #general-chat, and #voice-lobby. Also create a voice channel.✓ 已複製
    → Channels created with confirmations
  2. Schedule the event
    Create a scheduled event for 'Game Night' this Saturday at 8pm EST in the voice-lobby channel. Description: 'Weekly game night! Join us for Among Us and Jackbox.'✓ 已複製
    → Scheduled event created with link
  3. Create a role for participants
    Create a 'Game Night Crew' role with a green color and assign it to @user1, @user2, and @user3.✓ 已複製
    → Role created and assigned

結果: Complete event setup with channels, scheduled event, and participant roles.

注意事項
  • Channel permission overwrites are complex — Set permissions at the category level and let channels inherit them

組合

與其他 MCP 搭配,撬動十倍槓桿

discord-mcp-2 + github

Post GitHub PR notifications to a Discord channel automatically

Check for new merged PRs in our repo since yesterday and post a summary to #dev-updates on Discord.✓ 已複製

工具

此 MCP 暴露的能力

工具輸入參數何時呼叫成本
send_message channel_id: str, content: str Send a message to a Discord channel 1 Discord API call
read_messages channel_id: str, limit?: int Read message history from a channel 1 Discord API call
create_text_channel name: str, category_id?: str Create a new text channel 1 Discord API call
kick_member user_id: str, reason?: str Kick a member from the server 1 Discord API call
create_scheduled_event name, start_time, channel_id, description? Schedule a server event 1 Discord API call
create_role name: str, color?: str, permissions?: int Create a new role on the server 1 Discord API call

成本與限制

運行它的成本

API 配額
Discord bot rate limits apply (varies by endpoint, typically 5-50 req/s)
每次呼叫 Token 數
200–800 tokens per tool call
費用
Free — Discord bot API is free
提示
Batch read operations when possible. Use server_id env var to restrict to one server.

安全

權限、密鑰、影響範圍

最小權限: Bot token with required permissions
憑證儲存: Bot token in environment variable. Never commit bot tokens to repos.
資料出站: All calls go to Discord API (discord.com)
切勿授予: Administrator permission to the bot unless absolutely necessary

故障排查

常見錯誤與修復

403 Missing Permissions

The bot lacks the required permission for this action. Check the bot's role permissions in Server Settings → Roles.

驗證: Review the bot's role permissions in Discord server settings
Unknown Channel / 404

The channel ID is incorrect or the bot doesn't have access to that channel. Verify the channel exists and the bot can see it.

驗證: List channels with channels_list tool first
Docker container can't connect

Ensure the DISCORD_TOKEN environment variable is set correctly in your docker-compose.yml or docker run command.

驗證: docker logs <container-name>

替代方案

discord-mcp 對比其他方案

替代方案何時用它替代權衡
slack-mcp-serverYour team uses Slack instead of DiscordDifferent platform, similar feature coverage

更多

資源

📖 閱讀 GitHub 上的官方 README

🐙 查看未解決的 issue

🔍 瀏覽全部 400+ MCP 伺服器和 Skills