Discord AI助手交互服务器添加福利群:解决AI开发者的「MCP实战痛点」一个 Discord MCP(模型上下文协议)服务器,使 AI 助手能够与 Discord 平台进行交互。
MCP-Discord 提供以下与 Discord 相关的功能:
Node.js(v16.0.0 或更高版本)
npm(v7.0.0 或更高版本)
一个具有适当权限的 Discord 机器人
您的 Discord 服务器中所需的权限:
将您的 Discord 机器人添加到您的服务器
INSERT_CLIENT_ID_HERE 替换为您的机器人客户端 ID):
注意:
根据 Discord 的安全模型,机器人只能访问已明确添加到其中的服务器的信息。
如果您想使用此 MCP 服务器访问特定的 Discord 服务器,您必须先将机器人添加到该服务器。
使用下面的邀请链接将机器人添加到您的目标服务器。
要通过 Smithery 自动安装 mcp-discord
# 克隆仓库
git clone https://github.com/barryyip0625/mcp-discord.git
cd mcp-discord
# 安装依赖
npm install
# 编译 TypeScript
npm run build

正常运行需要 Discord 机器人令牌。服务器支持两种传输方法:stdio 和可流式 HTTP。
stdio(默认)
可流式 HTTP
您可以通过两种方式提供配置:
DISCORD_TOKEN=您的_discord_机器人令牌
# 对于 stdio 传输(默认)
node build/index.js --config "您的_discord_机器人令牌"
# 对于可流式 HTTP 传输
node build/index.js --transport http --port 3000 --config "您的_discord_机器人令牌"

{
"mcpServers": {
"discord": {
"command": "node",
"args": [
"path/to/mcp-discord/build/index.js",
"--config",
"您的_discord_机器人令牌"
]
}
}
}

{
"mcpServers": {
"discord": {
"command": "node",
"args": [
"path/to/mcp-discord/build/index.js",
"--transport",
"http",
"--port",
"3000",
"--config",
"您的_discord_机器人令牌"
]
}
}
}

{
"mcpServers": {
"discord": {
"command": "cmd",
"args": [
"/c",
"node",
"path/to/mcp-discord/build/index.js",
"--config",
"您的_discord_机器人令牌"
]
}
}
}

{
"mcpServers": {
"discord": {
"command": "cmd",
"args": [
"/c",
"node",
"path/to/mcp-discord/build/index.js",
"--transport",
"http",
"--port",
"3000",
"--config",
"您的_discord_机器人令牌"
]
}
}
}

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:从频道中删除特定消息discord_create_webhook:为 Discord 频道创建新的 Webhookdiscord_send_webhook_message:使用 Webhook 向 Discord 频道发送消息discord_edit_webhook:编辑 Discord 频道的现有 Webhookdiscord_delete_webhook:删除 Discord 频道的现有 Webhook# 开发模式
npm run dev
