HM

hanweg/mcp-discord

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

169 stars 50 forks 质量 61 趋势 0MIT

hanweg/mcp-discord 是一个从 https://github.com/hanweg/mcp-discord. 导入的 MCP 服务器候选服务器。

概览

hanweg/mcp-discord 是一个从 https://github.com/hanweg/mcp-discord. 导入的 MCP 服务器候选服务器。

概述(AI 翻译)

一款模型上下文协议(MCP)服务器,为 Claude Desktop 等 MCP 客户端提供 Discord 集成功能。

可用工具

服务器信息

  • list_servers:列出可用服务器
  • get_server_info:获取详细服务器信息
  • get_channels:在服务器中列出通道
  • list_members:列出服务器成员及其角色
  • get_user_info:获取用户的详细信息

消息管理

  • send_message:向信道发送消息
  • read_messages:阅读近期消息历史
  • add_reaction:对消息添加反应
  • add_multiple_reactions:向消息添加多个反应
  • remove_reaction:删除消息中的反应
  • moderate_message:删除消息并超时用户

频道管理

  • create_text_channel:创建新的文本通道
  • delete_channel:删除现有通道

角色管理

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

安装

  1. 设置你的Discord机器人:
  • 在Discord开发者门户创建新应用
  • 创建一个机器人并复制令牌
  • 启用所需的特权意图:
  • 消息内容意图
  • 在场意图

本页由 AI 翻译,技术细节请以原文为准。

README

Discord MCP Server

A Model Context Protocol (MCP) server that provides Discord integration capabilities to MCP clients like Claude Desktop.

Available Tools

Server Information

  • list_servers: List available servers
  • get_server_info: Get detailed server information
  • get_channels: List channels in a server
  • list_members: List server members and their roles
  • get_user_info: Get detailed information about a user

Message Management

  • send_message: Send a message to a channel
  • read_messages: Read recent message history
  • add_reaction: Add a reaction to a message
  • add_multiple_reactions: Add multiple reactions to a message
  • remove_reaction: Remove a reaction from a message
  • moderate_message: Delete messages and timeout users

Channel Management

  • create_text_channel: Create a new text channel
  • delete_channel: Delete an existing channel

Role Management

  • add_role: Add a role to a user
  • remove_role: Remove a role from a user

Installation

  1. Set up your Discord bot:

    • Create a new application at Discord Developer Portal
    • Create a bot and copy the token
    • Enable required privileged intents:
      • MESSAGE CONTENT INTENT
      • PRESENCE INTENT
      • SERVER MEMBERS INTENT
    • Invite the bot to your server using OAuth2 URL Generator
  2. Clone and install the package:

# 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 # On macOS/Linux, use: source .venv/bin/activate

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

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

Installing via Smithery

To install Discord Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @hanweg/mcp-discord --client claude

License

MIT License - see LICENSE file for details.

在 GitHub 查看完整 README

安装

npx -y @smithery/cli install @hanweg/mcp-discord --client claude
新手?先看 mcpskill.org 教程 →