home / mcp / discord mcp server

Discord MCP Server

Provides end-to-end MCP operations for Discord: messages, moderation, channels, events, polls, webhooks, and more.

Installation
Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "glittercowboy-discord-mcp": {
      "command": "uv",
      "args": [
        "--directory",
        "/path/to/discord-mcp",
        "run",
        "python",
        "-m",
        "src.server"
      ],
      "env": {
        "DISCORD_GUILD_ID": "YOUR_SERVER_ID",
        "DISCORD_BOT_TOKEN": "YOUR_BOT_TOKEN"
      }
    }
  }
}

You deploy a single MCP server that gives you full administrative control over Discord communities, enabling an external assistant to perform messages, moderation, channel management, events, polls, and more through a consistent set of operations.

How to use

Use an MCP client to interact with your Discord MCP Server. Browse available operations, inspect parameter schemas, and execute actions such as sending messages, moderating members, creating channels, managing events, and handling webhooks. The system exposes structured operations organized by category, so you can discover the exact actions you want to perform and provide the required parameters.

How to install

Prerequisites you need to prepare before running the MCP server.

1. Ensure you have Python 3.12 or newer installed on your machine.

2. Install the uv package manager.

3. Have a Discord account and a Discord server where you have admin permissions.

4. Clone the MCP server repository and navigate into it.

5. Install dependencies using the provided runtime command.

Configuration and setup

You configure the MCP server with two primary values: your bot token and the server (guild) ID. The following example shows the runtime setup for Claude to run the MCP server locally.

{
  "mcpServers": {
    "discord": {
      "command": "uv",
      "args": ["--directory", "/path/to/discord-mcp", "run", "python", "-m", "src.server"],
      "env": {
        "DISCORD_BOT_TOKEN": "your-bot-token-here",
        "DISCORD_GUILD_ID": "your-server-id-here"
      }
    }
  }
}

Environment variables you’ll use

The following environment variables are used to connect Claude to your Discord server.

- DISCORD_BOT_TOKEN: The bot token you obtain from the Discord Developer Portal.

- DISCORD_GUILD_ID: The numeric ID of your Discord server.

Verifying setup

After configuring, restart Claude and verify that the MCP server is reachable by requesting available Discord operations, listing channels, and performing a simple test message.

Usage examples

You can perform a wide range of actions, such as sending messages, managing roles, creating channels, and handling events. Access the operation discovery tool to see all available endpoints and then execute specific operations with the required parameters.

Security best practices

- Never expose your bot token. Store it securely as an environment variable.

- Grant the minimal permissions your bot needs to function.

- Ensure privileged intents are enabled only if necessary for your use case.

Troubleshooting

- If you see authentication errors, regenerate the bot token and update the environment variable.

- If the bot appears offline, verify the MCP server is running and Claude can reach it.

- If you cannot read message content, enable the Message Content Intent and ensure it has access in your server.

Examples of common operations

Send a message, create a poll, timeout a member, or start a scheduled event using the available operations.

Notes

The MCP server bridges Claude with Discord through a defined set of operations. All commands must respect Discord's permissions hierarchy and channel-specific permission overrides.

Available tools

messages.send

Send a message to a specified channel with content and optional embeds, attachments, or mentions.

messages.read

Read messages from a channel, including content when permitted by intents.

messages.edit

Edit a previously sent message by channel/message ID with new content or embeds.

messages.delete

Delete a message by channel/message ID.

messages.pin

Pin or unpin a message in a channel.

reactions.add

Add a reaction to a specific message.

reactions.remove

Remove a reaction from a message.

reactions.list

List all reactions on a message.

moderation.kick

Kick a member from the server.

moderation.ban

Ban a member from the server.

moderation.timeout

Timeout a member for a specified duration with an audit log.

channels.create

Create a new channel with given type and permissions.

channels.edit

Edit channel properties and permission overwrites.

channels.delete

Delete a channel.

threads.create

Create threads or forum posts within a channel.

roles.create

Create a new role with specified permissions.

roles.edit

Edit an existing role’s name, color, and permissions.

roles.delete

Delete a role.

members.list

List server members with optional filters.

members.edit

Edit member attributes and assign roles.

invites.create

Create an invitation link for a channel or server.

invites.list

List active invites for the server.

events.create

Create a scheduled event with details and location.

polls.create

Create a multi-option poll in a channel.

webhooks.create

Create a webhook and send messages through it.

webhooks.send

Send a message via an existing webhook.

automod.configure

Configure auto-moderation rules for content handling.

voice.move

Move a member between voice channels.

voice.disconnect

Disconnect a member from a voice channel.

emojis.create

Add a custom emoji to the server.

stickers.create

Add a new sticker to the server.

forum.create

Create and manage forum posts and tags.

stage.start

Start a stage channel instance.

onboarding.create

Run onboarding flows for new members.