mcp discord

Local 2025-08-31 23:42:50 0
Communication @hanweg/mcp-discord

Provides Discord integration capabilities to MCP clients like Claude Desktop.


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

mcp-discord MCP server

Available Tools

Server Information

  • get_server_info: Get detailed server information
  • list_members: List server members and their roles

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

Webhook Management

  • create_webhook: Create a new webhook
  • list_webhooks: List webhooks in a channel
  • send_webhook_message: Send messages via webhook
  • modify_webhook: Update webhook settings
  • delete_webhook: Delete a webhook

Installation

Installing via Smithery

To install Discord Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @hanweg/mcp-discord --client claude
  1. Set up your Discord bot:
  2. Create a new application at Discord Developer Portal
  3. Create a bot and copy the token
  4. Enable required privileged intents:
    • MESSAGE CONTENT INTENT
    • PRESENCE INTENT
    • SERVER MEMBERS INTENT
  5. Invite the bot to your server using OAuth2 URL Generator

  6. 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
    .venvScriptsactivate
    
    ### If using Python 3.13+ - install audioop library: `uv pip install audioop-lts`
    
    # Install the package
    uv pip install -e .

  7. Configure Claude Desktop (%APPDATA%Claudeclaude_desktop_config.json on Windows, ~/Library/Application Support/Claude/claude_desktop_config.json on macOS):

        "discord": {
          "command": "uv",
          "args": [
            "--directory",
            "C:PATHTOmcp-discord",
            "run",
            "mcp-discord"
          ],
          "env": {
            "DISCORD_TOKEN": "your_bot_token"
          }
        }

License

MIT License - see LICENSE file for details.

[
  {
    "description": "Get information about a Discord server",
    "inputSchema": {
      "properties": {
        "server_id": {
          "description": "Discord server (guild) ID",
          "type": "string"
        }
      },
      "required": [
        "server_id"
      ],
      "type": "object"
    },
    "name": "get_server_info"
  },
  {
    "description": "Get a list of members in a server",
    "inputSchema": {
      "properties": {
        "limit": {
          "description": "Maximum number of members to fetch",
          "maximum": 1000,
          "minimum": 1,
          "type": "number"
        },
        "server_id": {
          "description": "Discord server (guild) ID",
          "type": "string"
        }
      },
      "required": [
        "server_id"
      ],
      "type": "object"
    },
    "name": "list_members"
  },
  {
    "description": "Add a role to a user",
    "inputSchema": {
      "properties": {
        "role_id": {
          "description": "Role ID to add",
          "type": "string"
        },
        "server_id": {
          "description": "Discord server ID",
          "type": "string"
        },
        "user_id": {
          "description": "User to add role to",
          "type": "string"
        }
      },
      "required": [
        "server_id",
        "user_id",
        "role_id"
      ],
      "type": "object"
    },
    "name": "add_role"
  },
  {
    "description": "Remove a role from a user",
    "inputSchema": {
      "properties": {
        "role_id": {
          "description": "Role ID to remove",
          "type": "string"
        },
        "server_id": {
          "description": "Discord server ID",
          "type": "string"
        },
        "user_id": {
          "description": "User to remove role from",
          "type": "string"
        }
      },
      "required": [
        "server_id",
        "user_id",
        "role_id"
      ],
      "type": "object"
    },
    "name": "remove_role"
  },
  {
    "description": "Create a new text channel",
    "inputSchema": {
      "properties": {
        "category_id": {
          "description": "Optional category ID to place channel in",
          "type": "string"
        },
        "name": {
          "description": "Channel name",
          "type": "string"
        },
        "server_id": {
          "description": "Discord server ID",
          "type": "string"
        },
        "topic": {
          "description": "Optional channel topic",
          "type": "string"
        }
      },
      "required": [
        "server_id",
        "name"
      ],
      "type": "object"
    },
    "name": "create_text_channel"
  },
  {
    "description": "Delete a channel",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "ID of channel to delete",
          "type": "string"
        },
        "reason": {
          "description": "Reason for deletion",
          "type": "string"
        }
      },
      "required": [
        "channel_id"
      ],
      "type": "object"
    },
    "name": "delete_channel"
  },
  {
    "description": "Add a reaction to a message",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "Channel containing the message",
          "type": "string"
        },
        "emoji": {
          "description": "Emoji to react with (Unicode or custom emoji ID)",
          "type": "string"
        },
        "message_id": {
          "description": "Message to react to",
          "type": "string"
        }
      },
      "required": [
        "channel_id",
        "message_id",
        "emoji"
      ],
      "type": "object"
    },
    "name": "add_reaction"
  },
  {
    "description": "Remove a reaction from a message",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "Channel containing the message",
          "type": "string"
        },
        "emoji": {
          "description": "Emoji to remove (Unicode or custom emoji ID)",
          "type": "string"
        },
        "message_id": {
          "description": "Message to remove reaction from",
          "type": "string"
        }
      },
      "required": [
        "channel_id",
        "message_id",
        "emoji"
      ],
      "type": "object"
    },
    "name": "remove_reaction"
  },
  {
    "description": "Send a message to a specific channel",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "Discord channel ID",
          "type": "string"
        },
        "content": {
          "description": "Message content",
          "type": "string"
        }
      },
      "required": [
        "channel_id",
        "content"
      ],
      "type": "object"
    },
    "name": "send_message"
  },
  {
    "description": "Read recent messages from a channel",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "Discord channel ID",
          "type": "string"
        },
        "limit": {
          "description": "Number of messages to fetch (max 100)",
          "maximum": 100,
          "minimum": 1,
          "type": "number"
        }
      },
      "required": [
        "channel_id"
      ],
      "type": "object"
    },
    "name": "read_messages"
  },
  {
    "description": "Get information about a Discord user",
    "inputSchema": {
      "properties": {
        "user_id": {
          "description": "Discord user ID",
          "type": "string"
        }
      },
      "required": [
        "user_id"
      ],
      "type": "object"
    },
    "name": "get_user_info"
  },
  {
    "description": "Delete a message and optionally timeout the user",
    "inputSchema": {
      "properties": {
        "channel_id": {
          "description": "Channel ID containing the message",
          "type": "string"
        },
        "message_id": {
          "description": "ID of message to moderate",
          "type": "string"
        },
        "reason": {
          "description": "Reason for moderation",
          "type": "string"
        },
        "timeout_minutes": {
          "description": "Optional timeout duration in minutes",
          "maximum": 40320,
          "minimum": 0,
          "type": "number"
        }
      },
      "required": [
        "channel_id",
        "message_id",
        "reason"
      ],
      "type": "object"
    },
    "name": "moderate_message"
  }
]