mcpField
D
Danushkumar-V-mcp-discord

Danushkumar-V-mcp-discord

远程服务
github.com/Danushkumar-V通信协作059 周前更新
代码仓库

关于 Danushkumar-V-mcp-discord

MCP-Discord 通过基于机器人的工具,让 AI 助手与 Discord 交互。它支持消息和频道操作、论坛帖子、表情回应及 Webhook,并提供 stdio 和 streamable HTTP 传输方式。

主要功能

  1. 01发送和读取频道消息
  2. 02管理文本频道
  3. 03创建和管理论坛帖子
  4. 04添加或移除表情回应
  5. 05管理 Webhook

适用场景

  1. 01向 Discord 频道发送消息
  2. 02查看或删除频道消息
  3. 03创建论坛帖子并回复
  4. 04管理频道 Webhook

MCP 相关

此 MCP 服务将 Discord 机器人操作作为工具提供给 MCP 客户端,支持 stdio 和 streamable HTTP 传输方式。

配置

远程服务无需本地安装。选择你使用的客户端,复制配置或使用一键安装。

服务地址https://server.smithery.ai/@Danushkumar-V/mcp-discord/mcp
一键复制安装命令
Claude CodeTerminal
Cursor.cursor/mcp.json
VS Code.vscode/mcp.json
Claude Desktopclaude_desktop_config.json
Windsurf~/.codeium/windsurf/mcp_config.json

命令在终端中运行;JSON 粘贴到对应客户端的 MCP 配置后重启。需要授权的服务会在首次连接时提示登录。

全部服务地址
Streamable HTTPhttps://server.smithery.ai/@Danushkumar-V/mcp-discord/mcp需要授权

工具

详细介绍

MCP-Discord

smithery badge MCP Server Docker Hub

一个 Discord MCP(Model Context Protocol)服务,可让 AI 助手与 Discord 平台交互。

MCP-Discord MCP 服务

概述

MCP-Discord 提供以下 Discord 相关功能:

  • 登录 Discord 机器人
  • 获取服务信息
  • 读取/删除频道消息
  • 向指定频道发送消息(可使用频道 ID 或频道名称)
  • 获取论坛频道列表
  • 创建/删除/回复论坛帖子
  • 创建/删除文本频道
  • 添加/移除消息回应
  • 创建/编辑/删除/使用 Webhook

目录

前置条件

注意:
根据 Discord 的安全模型,机器人只能访问已明确将其添加到的服务中的信息。
如果你想使用此 MCP 服务访问特定的 Discord 服务,必须先将机器人添加到该服务。
使用下面的邀请链接将机器人添加到目标服务。

安装

通过 NPM 安装

你可以使用以下命令:

npx mcp-discord --config ${DISCORD_TOKEN}

如需了解更多详情,请查看 NPM Package。

通过 Smithery 安装

通过 Smithery 自动安装 mcp-discord。

通过 Docker 安装

你可以使用 Docker 运行 mcp-discord。Docker 镜像会自动构建并发布到 Docker Hub。

Docker Hub 仓库:barryy625/mcp-discord

# Pull the latest image
docker pull barryy625/mcp-discord:latest

# Run with environment variable
docker run -e DISCORD_TOKEN=your_discord_bot_token -p 8080:8080 barryy625/mcp-discord:latest

# Or run with command line config
docker run -p 8080:8080 barryy625/mcp-discord:latest --config "your_discord_bot_token"

可用标签:

  • latest - main 分支中的最新稳定版本
  • v1.3.3 等 - 指定版本的发布
手动安装
# Clone the repository
git clone https://github.com/barryyip0625/mcp-discord.git
cd mcp-discord

# Install dependencies
npm install

# Compile TypeScript
npm run build

配置

要正常运行,需要 Discord 机器人令牌。此服务支持两种传输方式:stdio 和 streamable HTTP。

传输方式
  1. stdio(默认)

    • 用于基本场景的传统 stdio 传输
    • 适用于简单集成
  2. streamable HTTP

    • 基于 HTTP 的传输,适用于更高级的场景
    • 支持无状态运行
    • 端口号可配置
配置选项

你可以通过以下两种方式提供配置:

  1. 环境变量:
DISCORD_TOKEN=your_discord_bot_token
  1. 使用命令行参数:
# For stdio transport (default)
node build/index.js --config "your_discord_bot_token"

# For streamable HTTP transport
node build/index.js --transport http --port 3000 --config "your_discord_bot_token"

与 Claude/Cursor 搭配使用

Docker

你可以在 Claude 和 Cursor 中使用 Docker 容器:

{
    "mcpServers": {
        "discord": {
            "command": "docker",
            "args": [
                "run",
                "--rm",
                "-e",
                "DISCORD_TOKEN=your_discord_bot_token",
                "-p",
                "8080:8080",
                "barryy625/mcp-discord:latest",
                "--transport",
                "http",
                "--port",
                "8080"
            ]
        }
    }
}
Claude
  1. 使用 stdio 传输:
{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": [
                "path/to/mcp-discord/build/index.js",
                "--config",
                "your_discord_bot_token"
            ]
        }
    }
}
  1. 使用 streamable HTTP 传输:
{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": [
                "path/to/mcp-discord/build/index.js",
                "--transport",
                "http",
                "--port",
                "3000",
                "--config",
                "your_discord_bot_token"
            ]
        }
    }
}
Cursor
  1. 使用 stdio 传输:
{
    "mcpServers": {
        "discord": {
            "command": "cmd",
            "args": [
                "/c",
                "node",
                "path/to/mcp-discord/build/index.js",
                "--config",
                "your_discord_bot_token"
            ]
        }
    }
}
  1. 使用 streamable HTTP 传输:
{
    "mcpServers": {
        "discord": {
            "command": "cmd",
            "args": [
                "/c",
                "node",
                "path/to/mcp-discord/build/index.js",
                "--transport",
                "http",
                "--port",
                "3000",
                "--config",
                "your_discord_bot_token"
            ]
        }
    }
}

工具文档

基本功能
  • discord_send:向指定频道发送消息(支持频道 ID 和频道名称)
  • discord_get_server_info:获取 Discord 服务器信息
频道管理
  • discord_create_text_channel:创建文本频道
  • discord_delete_channel:删除频道
论坛功能
  • discord_get_forum_channels:获取论坛频道列表
  • discord_create_forum_post:创建论坛帖子
  • discord_get_forum_post:获取论坛帖子
  • discord_reply_to_forum:回复论坛帖子
  • discord_delete_forum_post:删除论坛帖子
消息和表情回应
  • discord_read_messages:读取频道消息
  • discord_add_reaction:为消息添加表情回应
  • discord_add_multiple_reactions:为消息添加多个表情回应
  • discord_remove_reaction:移除消息上的表情回应
  • discord_delete_message:从频道中删除指定消息
Webhook 管理
  • discord_create_webhook:为 Discord 频道创建新的 webhook
  • discord_send_webhook_message:使用 webhook 向 Discord 频道发送消息
  • discord_edit_webhook:编辑 Discord 频道现有的 webhook
  • discord_delete_webhook:删除 Discord 频道现有的 webhook

开发

# Development mode
npm run dev

许可证

MIT 许可证

评论

支持 Markdown

第一次接触 MCP?

从协议是什么,到在客户端里装上第一个服务,这几条回答覆盖了大多数入门问题。

一个开放协议,规定了 AI 应用如何以统一方式连接外部工具与数据源。客户端负责与模型对话,MCP 服务负责提供工具、资源和提示模板,两者通过标准消息通信,同一个服务可以被不同客户端复用。