HM

hanweg/mcp-discord-raw

Developer tools

이 페이지는 AI로 자동 번역되었습니다. 기술적인 세부 사항은 원문을 확인하세요. 원문 보기

9 stars 6 forks 품질 59 트렌드 17MIT

MCP server for discord bot - adds one tool with raw API access

개요

This MCP server provides raw Discord API access through a single flexible tool. It supports both REST API calls and slash command syntax. To install Discord Raw API for Claude Desktop automatically via Smithery: 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 Add this to your claude_desktop_config.json Put server, channel and user IDs and some examples in project knowledge to avoid having to remind the model of those, along with something like this to get it started: "Here's how to effectively use the Discord raw API tool: The tool is called discord_api and takes three parameters: 1. method: HTTP method ("GET", "POST", "PUT", "PATCH", "DELETE") 2. endpoint: Discord API endpoint (e.g., "guilds/{guild.id}/roles") 3.

README

원문 README의 일부입니다. 원문 보기.

Discord Raw API MCP Server

This MCP server provides raw Discord API access through a single flexible tool. It supports both REST API calls and slash command syntax.

Installation

Installing via Smithery

To install Discord Raw API for Claude Desktop automatically via Smithery:

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

Manual 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-raw.git
cd mcp-discord-raw

# 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 .

Configuration

Add this to your claude_desktop_config.json

    "discord-raw": {
      "command": "uv",
      "args": [
        "--directory", 
        "PATH/TO/mcp-discord-raw",
        "run",
        "discord-raw-mcp"
      ],
      "env": {
        "DISCORD_TOKEN": "YOUR-BOT-TOKEN"
      }
    }

Usage

REST API Style

{
    "method": "POST",
    "endpoint": "guilds/123456789/roles",
    "payload": {
        "name": "Bot Master",
        "permissions": "8",
        "color": 3447003,
        "mentionable": true
    }
}

Slash Command Style

{
    "method": "POST",
    "endpoint": "/role create name:Bot_Master color:blue permissions:8 mentionable:true guild_id:123456789"
}

Examples

  1. Create a role:
{
    "method": "POST",
    "endpoint": "/role create name:Moderator color:red permissions:moderate_members guild_id:123456789"
}
  1. Send a message:
{
    "method": "POST",
    "endpoint": "channels/123456789/messages",
    "payload": {
        "content": "Hello from the API!"
    }
}
  1. Get server information:
{
    "method": "GET",
    "endpoint": "guilds/123456789"
}

Recommendations:

Put server, channel and user IDs and some examples in project knowledge to avoid having to remind the model of those, along with something like this to get it started:

"Here’s how to effectively use the Discord raw API tool: The tool is called discord_api and takes three parameters:

GitHub에서 전체 README 보기

설치

npx -y @smithery/cli install @hanweg/mcp-discord-raw --client claude
MCP 초보자라면? mcpskill.org 가이드부터 시작하세요 →