M

MCP-Discord 集成工具

@hanweg/mcp-discord
0 Stars 387 次浏览 hanweg 更新于 2026-08-23

为像 Claude Desktop 这样的 MCP 客户端提供 Discord 集成功能。

该服务暂未提供标准配置,请参考 README 手动接入

可用工具 (12 个)

该服务在 MCP 协议中暴露的工具,AI 可按需调用

get_server_info 1 个参数 需填 1 项

Get information about a Discord server

必填参数:server_id

list_members 2 个参数 需填 1 项

Get a list of members in a server

必填参数:server_id

add_role 3 个参数 需填 3 项

Add a role to a user

必填参数:server_id、user_id、role_id

remove_role 3 个参数 需填 3 项

Remove a role from a user

必填参数:server_id、user_id、role_id

create_text_channel 4 个参数 需填 2 项

Create a new text channel

必填参数:server_id、name

delete_channel 2 个参数 需填 1 项

Delete a channel

必填参数:channel_id

add_reaction 3 个参数 需填 3 项

Add a reaction to a message

必填参数:channel_id、message_id、emoji

remove_reaction 3 个参数 需填 3 项

Remove a reaction from a message

必填参数:channel_id、message_id、emoji

send_message 2 个参数 需填 2 项

Send a message to a specific channel

必填参数:channel_id、content

read_messages 2 个参数 需填 1 项

Read recent messages from a channel

必填参数:channel_id

get_user_info 1 个参数 需填 1 项

Get information about a Discord user

必填参数:user_id

moderate_message 4 个参数 需填 3 项

Delete a message and optionally timeout the user

必填参数:channel_id、message_id、reason

服务介绍

Discord MCP 服务器

smithery 徽章
这是一个提供 Discord 集成功能的 Model Context Protocol (MCP) 服务器,适用于像 Claude Desktop 这样的 MCP 客户端。

可用工具

服务器信息

  • get_server_info: 获取详细的服务器信息
  • list_members: 列出服务器成员及其角色

消息管理

  • send_message: 向频道发送消息
  • read_messages: 读取最近的消息历史
  • add_reaction: 给消息添加反应
  • add_multiple_reactions: 给消息添加多个反应
  • remove_reaction: 从消息中移除反应
  • moderate_message: 删除消息并限制用户发言

频道管理

  • create_text_channel: 创建一个新的文本频道
  • delete_channel: 删除现有的频道

角色管理

  • add_role: 为用户添加角色
  • remove_role: 从用户中移除角色

Webhook 管理

  • create_webhook: 创建一个新的 webhook
  • list_webhooks: 列出频道中的 webhooks
  • send_webhook_message: 通过 webhook 发送消息
  • modify_webhook: 更新 webhook 设置
  • delete_webhook: 删除 webhook

安装

通过 Smithery 安装

要通过 Smithery 自动安装 Discord 服务器给 Claude Desktop:

npx -y @smithery/cli install @hanweg/mcp-discord --client claude
  1. 设置您的 Discord 机器人:

    • Discord 开发者门户创建一个新的应用
    • 创建一个机器人并复制令牌
    • 启用所需特权意图:
      • 消息内容意图
      • 存在状态意图
      • 服务器成员意图
    • 使用 OAuth2 URL 生成器邀请机器人到您的服务器
  2. 克隆并安装包:

# Clone the repository
git clone https://github.com/hanweg/mcp-discord.git
cd mcp-discord

# Create and activate virtual environment
uv venv
.venv\Scripts\activate

### If using Python 3.13+ - install audioop library: `uv pip install audioop-lts`

# Install the package
uv pip install -e .
  1. 配置 Claude Desktop (%APPDATA%\Claude\claude_desktop_config.json 在 Windows 上, ~/Library/Application Support/Claude/claude_desktop_config.json 在 macOS 上):
    "discord": {
      "command": "uv",
      "args": [
        "--directory",
        "C:\\PATH\\TO\\mcp-discord",
        "run",
        "mcp-discord"
      ],
      "env": {
        "DISCORD_TOKEN": "your_bot_token"
      }
    }

许可证

MIT 许可证 - 详情请参阅 LICENSE 文件。

相关 MCP 服务