Skip to main content
Glama

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

Related MCP server: discord-mcp

Prerequisites

  • Python 3.12+

  • uv package manager

  • A Discord account

  • A Discord server where you have admin permissions

Installation

This makes the discord-mcp command available system-wide:

git clone https://github.com/glittercowboy/discord-mcp.git
cd discord-mcp
uv tool install -e .

You can also use pipx install -e . if you prefer pipx over uv.

Option B: Run from Directory

Clone and run directly without installing:

git clone https://github.com/glittercowboy/discord-mcp.git
cd discord-mcp
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)

Command Reference

Depending on your installation method:

Method

Command

Editable install (uv tool install -e .)

discord-mcp

Run from directory

uv --directory /path/to/discord-mcp run python -m src.server

Claude Desktop

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

Tip: If you used uv tool install -e ., you can simplify to just "command": "discord-mcp" with no args.

Claude Code

Add to .claude/settings.json or via claude mcp add:

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

Tip: If you used uv tool install -e ., you can simplify to just "command": "discord-mcp" with no args.

OpenCode

Add to ~/.config/opencode/opencode.json:

{
  "mcp": {
    "discord": {
      "type": "local",
      "command": ["discord-mcp"],
      "environment": {
        "DISCORD_BOT_TOKEN": "your-bot-token-here",
        "DISCORD_GUILD_ID": "your-server-id-here"
      },
      "enabled": true
    }
  }
}

Optional: Add a Discord agent for auto-allowed permissions (press Tab to switch):

{
  "agent": {
    "Discord": {
      "mode": "primary",
      "permission": { "discord_*": "allow" }
    }
  }
}

Verifying Setup

After configuration, restart your MCP client (Claude Desktop, Claude Code, or OpenCode) and try:

  1. Ask Claude to discover available Discord operations

  2. Ask Claude to list channels in your server

  3. Ask Claude to send a test message to a channel

If you see errors:

  • Double-check your bot token is correct

  • Verify the bot is in your server

  • Ensure privileged intents are enabled in Developer Portal

Usage

Once configured, Claude can interact with your Discord server using these tools:

discord_discover

Browse all available operations organized by category.

discord_get_schema

Get detailed parameter schema for a specific operation.

discord_get_schema("messages.send")

discord_execute

Execute an operation with parameters.

discord_execute("messages.send", {
  "channel_id": "123456789",
  "content": "Hello from Claude!"
})

Operation Categories

Category

Operations

Description

messages

9

Send, read, edit, delete, pin messages

reactions

5

Add, remove, list reactions

threads

10

Create, manage, archive threads

channels

7

Create, edit, delete channels

members

6

List, search, edit members

moderation

7

Kick, ban, timeout members

roles

5

Create, edit, delete roles

invites

4

Create, list, delete invites

events

6

Scheduled event management

polls

2

Create and end polls

guild

4

Server settings and info

audit_log

1

View audit log

automod

5

Auto-moderation rules

webhooks

7

Webhook management

voice

2

Voice channel controls

emojis

5

Custom emoji management

stickers

3

Sticker management

forum

5

Forum posts and tags

stage

6

Stage channel instances

onboarding

3

New member onboarding

welcome_screen

2

Welcome screen settings

soundboard

5

Soundboard sounds

commands

5

Slash command management

integrations

2

Server integrations

widget

3

Server widget

vanity

2

Vanity URL

templates

6

Server templates

dm

1

Direct messages

bulk_ban

1

Bulk ban users

Examples

Send a message

discord_execute("messages.send", {
  "channel_id": "1234567890",
  "content": "Hello, Discord!"
})

Create a poll

discord_execute("polls.create", {
  "channel_id": "1234567890",
  "question": "What's your favorite color?",
  "answers": ["Red", "Blue", "Green"],
  "duration_hours": 24
})

Timeout a member

discord_execute("moderation.timeout", {
  "user_id": "9876543210",
  "duration_seconds": 3600,
  "reason": "Breaking server rules"
})

Create a scheduled event

discord_execute("events.create", {
  "name": "Community Meetup",
  "description": "Weekly community call",
  "start_time": "2025-01-25T18:00:00Z",
  "location": "https://meet.example.com"
})

Security Best Practices

  • Never commit your bot token to version control

  • Never share your bot token publicly

  • If your token is exposed, reset it immediately in the Developer Portal

  • Use environment variables for sensitive configuration

  • Grant only the permissions your bot actually needs

  • The bot can only manage resources below its highest role in the hierarchy

  • Review Discord's Bot Best Practices

Rate Limits

Discord enforces rate limits on API requests. This server handles rate limiting automatically, but be aware:

  • Global limit: 50 requests/second

  • Per-route limits vary by endpoint

  • Bulk operations are more efficient than individual calls

Troubleshooting

"401 Unauthorized" errors

  • Your bot token is incorrect or has been reset

  • Get a new token from the Developer Portal

"403 Forbidden" errors

  • The bot lacks required permissions

  • The bot's role is too low in the hierarchy to manage the target

  • Check channel-specific permission overrides

Bot appears offline

  • The MCP server only connects when Claude makes requests (REST API, not Gateway)

  • This is normal - the bot doesn't maintain a persistent connection

Can't read message content

  • Enable "Message Content Intent" in the Developer Portal Bot section

  • This is required to read the text content of messages

Can't list members

  • Enable "Server Members Intent" in the Developer Portal Bot section

  • This is required for member-related operations

Bot can't manage a user/role

  • The bot's highest role must be above the target user's highest role

  • Bots cannot manage the server owner

  • Check if there are channel-specific permission denies

License

MIT License - see LICENSE for details.

Available Tools

3 tools
discord_discoverB

Browse all available Discord operations organized by category.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool 'browses' operations, implying a read-only action, but doesn't clarify if it's safe, requires authentication, has rate limits, or what the browsing entails. For a tool with zero annotation coverage, this is a significant gap in behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence: 'Browse all available Discord operations organized by category.' It is front-loaded with the core purpose, has zero waste, and is appropriately sized for a simple tool. Every word earns its place, making it highly concise and well-structured.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no annotations, but with an output schema), the description is minimally adequate. It states what the tool does but lacks details on behavior, usage context, or output interpretation. The presence of an output schema reduces the need to explain return values, but more context could help the agent understand when and how to use this tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has 0 parameters, and schema description coverage is 100%, so there are no parameters to document. The description doesn't need to add parameter semantics, and it appropriately doesn't mention any. A baseline score of 4 is applied since no parameters exist, and the description doesn't introduce confusion.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Browse all available Discord operations organized by category.' It specifies the verb ('browse') and resource ('Discord operations'), though it doesn't explicitly differentiate from siblings like discord_execute or discord_get_schema. The purpose is clear but lacks sibling distinction.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. It doesn't mention when to choose discord_discover over discord_execute or discord_get_schema, nor does it provide context about prerequisites or typical use cases. This leaves the agent without explicit usage instructions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

discord_executeC

Execute a Discord operation with specified parameters.

Args:
    operation: Operation identifier (e.g., 'messages.send', 'members.list') or 'batch.category.action' for batch operations
    params: Operation parameters (get schema first)
ParametersJSON Schema
NameRequiredDescriptionDefault
operationYes
paramsYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

C2.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions executing operations and referencing a schema, but fails to describe critical traits such as required permissions, rate limits, side effects (e.g., whether it's read-only or mutative), or error handling. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with a clear opening sentence followed by brief parameter explanations. It avoids unnecessary verbosity, though the 'get schema first' note could be more integrated. Overall, it is efficient with minimal waste.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (2 parameters with nested objects, no annotations, but an output schema exists), the description is moderately complete. It covers basic purpose and parameter hints, and the presence of an output schema reduces the need to explain return values. However, it lacks sufficient detail on behavior and usage, making it adequate but with clear gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds some meaning by explaining 'operation' as an identifier with examples and 'params' as operation parameters with a note to 'get schema first,' but this is insufficient for two parameters with nested objects and no schema details. The description does not fully clarify parameter usage or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose2/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool 'Execute[s] a Discord operation with specified parameters,' which is a tautology of the tool name 'discord_execute' and provides minimal specificity. It mentions operation identifiers like 'messages.send' or 'members.list' but does not clearly distinguish what this tool does versus its siblings (e.g., discord_discover, discord_get_schema), leaving the purpose vague.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no explicit guidance on when to use this tool versus alternatives. The mention to 'get schema first' for params implies a prerequisite but does not specify when to choose discord_execute over discord_discover or discord_get_schema, nor does it provide context for its application, resulting in minimal usage direction.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

discord_get_schemaA

Get detailed parameter schema for a specific operation.

Args:
    operation: Operation identifier (e.g., 'messages.send', 'members.list') or 'batch.category.action' for batch operations (e.g., 'batch.members.add_role')
ParametersJSON Schema
NameRequiredDescriptionDefault
operationYes

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It describes what the tool does but doesn't cover key aspects like whether it's a read-only operation, potential rate limits, error handling, or the format of the output (though output schema exists). This leaves gaps in understanding how the tool behaves beyond its basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded: the first sentence clearly states the purpose, followed by a structured 'Args' section with bullet points. Every sentence earns its place by providing essential information without redundancy, making it efficient and easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's low complexity (1 parameter) and the presence of an output schema (which handles return values), the description is largely complete. It covers the purpose and parameter semantics adequately. However, it could improve by addressing behavioral aspects like read-only nature or error cases, which are not fully covered by the output schema alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description adds significant meaning beyond the input schema, which has 0% description coverage. It explains that the 'operation' parameter is an identifier and provides concrete examples (e.g., 'messages.send', 'batch.category.action'), clarifying its semantics. This compensates well for the schema's lack of details, though it doesn't cover all possible edge cases or formats.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'Get detailed parameter schema for a specific operation.' It specifies the verb ('Get') and resource ('parameter schema'), making it understandable. However, it doesn't explicitly differentiate from sibling tools like 'discord_discover' or 'discord_execute', which might also involve schema-related operations, preventing a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage by mentioning 'specific operation' and providing examples of operation identifiers, suggesting it should be used when schema details are needed. However, it lacks explicit guidance on when to choose this tool over alternatives like 'discord_discover' (which might list operations) or 'discord_execute' (which might use the schema), leaving the context somewhat vague.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updatesv0.1.0
    • First observeddiscord_discover
    • First observeddiscord_execute
    • First observeddiscord_get_schema

TDQS

C2.9/5.0

Scored across 3 tools

Disambiguation5/5

The three tools have clearly distinct purposes: discover for browsing operations, execute for performing actions, and get_schema for retrieving parameter details. There is no overlap or ambiguity between them, as each serves a unique function in the workflow.

Naming Consistency5/5

All tool names follow a consistent 'discord_verb' pattern (discord_discover, discord_execute, discord_get_schema), using snake_case and clear action verbs. This predictability makes the set easy to understand and navigate.

Tool Count2/5

With only three tools, the server feels thin for a Discord integration, which typically involves many operations like sending messages, managing channels, handling members, etc. The tools act as meta-operations rather than direct actions, which might limit usability and require agents to understand a complex internal schema.

Completeness2/5

The tool surface is severely incomplete for a Discord server, as it lacks direct operations for core functionalities (e.g., send_message, create_channel, list_members). Instead, it relies on a generic execute tool with external schemas, creating gaps that could lead to agent confusion or failures in common workflows.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables managing a Discord server using natural language through AI clients like Claude, with 139 admin tools across 20 categories for roles, channels, members, messages, threads, moderation, and more.
    201
    31
    MIT
  • A
    license
    B
    quality
    A
    maintenance
    Gives your AI assistant full control of a Discord server: 148 tools for chat, moderation, automod, events, and administration, up to building a complete community server from one paragraph. Every destructive action previews first and waits for your confirmation.
    100
    96
    7
    Elastic 2.0
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables AI assistants to manage a Discord server, including creating channels, categories, roles, setting permissions, and assigning roles through natural language commands.
    -