home / mcp / discord mcp server

Discord MCP Server

MCP server for discord bot

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "hanweg-mcp-discord": {
      "command": "npx",
      "args": [
        "-y",
        "@smithery/cli",
        "install",
        "@hanweg/mcp-discord",
        "--client",
        "claude"
      ],
      "env": {
        "DISCORD_TOKEN": "YOUR_BOT_TOKEN"
      }
    }
  }
}

You can run a Discord MCP Server that bridges your Discord workspace with MCP clients, enabling you to manage channels, messages, members, and roles directly from MCP-enabled clients. This server lets you list servers, view channel and member details, send messages, react to content, and perform moderation actions within your Discord environment.

How to use

Use this MCP server to connect your Discord workspace to MCP clients. Once configured, you can list available servers, inspect channel details, read message history, send messages to channels, add reactions, and manage member roles. You can also create or delete text channels and moderate messages as needed. Your MCP client can request server information, channel lists, and member roles, and then perform actions such as sending messages or assigning roles based on user interactions.

How to install

Prerequisites you need before installation:

- Python 3.8+ or compatible environment with pip available

How to install

# Clone the Discord MCP server repository
git clone https://github.com/hanweg/mcp-discord.git
cd mcp-discord

# Create and activate a Python virtual environment
uv venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate

# If you are on Python 3.13+ and need audio support, install audioop as shown
# (optional, only if you encounter issues related to audio processing)
# uv pip install audioop-lts

# Install the package in editable mode
uv pip install -e .

Configuration and runtime

Configure Claude Desktop to run the MCP server via the runtime command. This starts the server from your local path and passes the required bot token for Discord authentication.

Configuration and runtime

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

Installing via Smithery

If you want to install the Discord MCP Server automatically for Claude Desktop using Smithery, run the following command.

Installing via Smithery

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

Available tools

list_servers

List available MCP servers connected to the Discord bridge, showing basic server metadata.

get_server_info

Fetch detailed information about a specific MCP server instance.

get_channels

Retrieve the list of text channels within a server.

list_members

List server members and their assigned roles.

get_user_info

Get detailed information about a specific user.

send_message

Send a message to a specified channel in Discord.

read_messages

Read the most recent messages from a channel.

add_reaction

Add a single reaction to a message.

add_multiple_reactions

Add multiple reactions to a message in one operation.

remove_reaction

Remove a reaction from a message.

moderate_message

Moderate content by deleting messages or timing out users.

create_text_channel

Create a new text channel in a Discord server.

delete_channel

Delete an existing text channel.

add_role

Assign a role to a user.

remove_role

Remove a role from a user.