Discord MCP Server

$git clone https://github.com/glittercowboy/discord-mcp.git && cd discord-mcp && uv sync
README.md

Comprehensive administrative control over Discord communities via MCP

Discord MCP Server

A Model Context Protocol (MCP) server that provides full administrative control over Discord communities. Enables AI assistants like Claude to manage Discord servers through 128 operations covering messages, moderation, channels, roles, events, and more.

Features

  • Messages: Send, read, edit, delete, pin messages and manage reactions
  • Moderation: Kick, ban, timeout members with audit log support
  • Channels: Create, edit, delete channels with permission management
  • Threads: Create and manage threads and forum posts
  • Roles: Full role CRUD with permission configuration
  • Members: List, search, edit members and manage their roles
  • Events: Create and manage scheduled events
  • Polls: Create polls with multiple choice options
  • Webhooks: Create and send messages via webhooks
  • AutoMod: Configure auto-moderation rules
  • Voice: Move and disconnect members from voice channels
  • And more: Emojis, stickers, invites, templates, onboarding, stage channels...

Prerequisites

  • Python 3.12+
  • uv package manager
  • A Discord account
  • A Discord server where you have admin permissions

Installation

  1. Clone the repository:
git clone https://github.com/glittercowboy/discord-mcp.git
cd discord-mcp
  1. Install dependencies:
uv sync

Discord Bot Setup

Follow these steps carefully to create and configure your Discord bot.

Step 1: Create a Discord Application

  1. Go to the Discord Developer Portal
  2. Log in with your Discord account
  3. Click the "New Application" button (top right)
  4. Enter a name for your application (e.g., "My MCP Bot")
  5. Accept the Terms of Service and click "Create"

Step 2: Create the Bot User

  1. In your application's settings, click "Bot" in the left sidebar
  2. Click "Add Bot" and confirm by clicking "Yes, do it!"
  3. Your bot is now created!

Step 3: Get Your Bot Token

IMPORTANT: Your bot token is like a password. Never share it or commit it to version control.

  1. In the Bot section, find the "Token" area
  2. Click "Reset Token" (or "Copy" if available)
  3. You may need to enter your Discord password or 2FA code
  4. Copy the token immediately - you can only see it once!
  5. Store it somewhere safe (you'll need it for configuration)

If you lose your token, you'll need to reset it, which invalidates the old one.

Step 4: Enable Privileged Intents

Still in the Bot section, scroll down to "Privileged Gateway Intents" and enable:

Intent Why It's Needed
Server Members Intent Required for listing members, managing roles, and member-related operations
Message Content Intent Required for reading message content (not just metadata)

Click "Save Changes" at the bottom.

Step 5: Generate the Bot Invite URL

  1. Click "OAuth2" in the left sidebar
  2. Click "URL Generator" under OAuth2

Select these scopes:

  • bot
  • applications.commands

Select bot permissions:

For full functionality, select "Administrator".

Or for minimal permissions, select these individually:

  • Manage Channels
  • Manage Roles
  • Kick Members
  • Ban Members
  • Manage Messages
  • Read Message History
  • Send Messages
  • Create Public Threads
  • Create Private Threads
  • Manage Threads
  • Embed Links
  • Attach Files
  • Add Reactions
  • Use External Emojis
  • Manage Webhooks
  • View Audit Log
  • Moderate Members (for timeouts)
  • Manage Events
  • Create Events
  • Send Polls
  1. Copy the generated URL at the bottom of the page

Step 6: Invite the Bot to Your Server

  1. Open the URL you copied in your browser
  2. Select the server you want to add the bot to (you need "Manage Server" permission)
  3. Review the permissions and click "Authorize"
  4. Complete any CAPTCHA if prompted
  5. The bot should now appear in your server's member list (it will show as offline until the MCP server runs)

Step 7: Get Your Server (Guild) ID

  1. Open Discord (desktop app or web)
  2. Go to User Settings (gear icon near your username)
  3. Navigate to App Settings > Advanced
  4. Enable "Developer Mode"
  5. Close settings
  6. Right-click on your server name in the server list
  7. Click "Copy Server ID"
  8. Save this ID - you'll need it for configuration

Configuration

You need two values:

  • Bot Token (from Step 3)
  • Server ID (from Step 7)

Claude Desktop

Add to your Claude Desktop configuration file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "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"
      }
    }
  }
}
`

Tools (5)

messagesSend, read, edit, delete, pin messages and manage reactions
moderationKick, ban, timeout members with audit log support
channelsCreate, edit, delete channels with permission management
rolesFull role CRUD with permission configuration
eventsCreate and manage scheduled events

Environment Variables

DISCORD_BOT_TOKENrequiredThe secret token for your Discord bot application
DISCORD_GUILD_IDrequiredThe unique ID of the Discord server (guild) to manage

Configuration

claude_desktop_config.json
{"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"}}}}

Try it

Create a new text channel called #announcements and set it to read-only for everyone except moderators.
Kick the user @spammer and log the reason as 'repeated policy violations' in the audit log.
Create a scheduled event for a community town hall meeting this Friday at 6 PM.
Create a poll in the #general channel asking users which feature they want to see next.
List all members who have the 'VIP' role and send them a message about the upcoming giveaway.

Frequently Asked Questions

What are the key features of Discord MCP Server?

128 operations covering messages, moderation, channels, roles, and events.. Full role CRUD (Create, Read, Update, Delete) with permission configuration.. Advanced moderation tools including kick, ban, and timeout with audit log support.. Support for threads, forum posts, and auto-moderation rule configuration.. Voice channel management including moving and disconnecting members..

What can I use Discord MCP Server for?

Automated community moderation by allowing AI to identify and act on policy violations.. Streamlined server setup by using AI to generate complex channel structures and role permissions.. Event management automation for scheduling and announcing community gatherings.. Member engagement through AI-generated polls and automated welcome messaging.. Technical server administration such as managing webhooks and audit log reviews..

How do I install Discord MCP Server?

Install Discord MCP Server by running: git clone https://github.com/glittercowboy/discord-mcp.git && cd discord-mcp && uv sync

What MCP clients work with Discord MCP Server?

Discord MCP Server works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Use Discord MCP Server with Conare

Manage MCP servers visually, upload persistent context, and never start from zero with Claude Code & Codex.

Try Free