/ 目录 / 演练场 / 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