这是一个提供 Discord 集成功能的模型上下文协议(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
:为用户移除角色create_webhook
:创建新的 Webhooklist_webhooks
:列出频道中的 Webhooksend_webhook_message
:通过 Webhook 发送消息modify_webhook
:更新 Webhook 设置delete_webhook
:删除 Webhook要通过 Smithery 自动为 Claude Desktop 安装 Discord 服务器:
npx -y @smithery/cli install @hanweg/mcp-discord --client claude
设置你的 Discord 机器人:
克隆并安装包:
# 克隆仓库
git clone https://github.com/hanweg/mcp-discord.git
cd mcp-discord
# 创建并激活虚拟环境
uv venv
.venv\Scripts\activate
### 如果使用 Python 3.13+ - 安装 audioop 库:`uv pip install audioop-lts`
# 安装包
uv pip install -e .

%APPDATA%\Claude\claude_desktop_config.json
,macOS 上为 ~/Library/Application Support/Claude/claude_desktop_config.json
): "discord": {
"command": "uv",
"args": [
"--directory",
"C:\\PATH\\TO\\mcp-discord",
"run",
"mcp-discord"
],
"env": {
"DISCORD_TOKEN": "your_bot_token"
}
}

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