Discord MCP

Runs a Discord bot as an MCP server for administering one Discord server: roles, channels, members, moderation

By HardHeadHackerHead (individual) TypeScript Local · stdio Communication

38 popularity score ★ 42 ↓ 180/wk

Connect your client

Local (npm)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs DISCORD_TOKEN, DISCORD_GUILD_ID. Replace each <NAME> with your value.

Claude CodeTerminal
claude mcp add discord -e DISCORD_TOKEN=<DISCORD_TOKEN> -e DISCORD_GUILD_ID=<DISCORD_GUILD_ID> -- npx -y @quadslab.io/discord-mcp
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": [
        "-y",
        "@quadslab.io/discord-mcp"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": [
        "-y",
        "@quadslab.io/discord-mcp"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "discord": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "@quadslab.io/discord-mcp"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.discord]
command = "npx"
args = ["-y", "@quadslab.io/discord-mcp"]

[mcp_servers.discord.env]
DISCORD_TOKEN = "<DISCORD_TOKEN>"
DISCORD_GUILD_ID = "<DISCORD_GUILD_ID>"
Gemini CLITerminal
gemini mcp add --scope user -e DISCORD_TOKEN=<DISCORD_TOKEN> -e DISCORD_GUILD_ID=<DISCORD_GUILD_ID> discord npx -- -y @quadslab.io/discord-mcp
Local (from source)

Add in one click

Opens the app, which asks before it adds the server. Then replace each <NAME> in its settings with your value.

Or add it by command or config

It needs DISCORD_TOKEN, DISCORD_GUILD_ID. Replace each <NAME> with your value.

FirstTerminal
git clone https://github.com/HardHeadHackerHead/discord-mcp.git
cd discord-mcp
npm install
npm run build
Claude CodeTerminal
claude mcp add discord -e DISCORD_TOKEN=<DISCORD_TOKEN> -e DISCORD_GUILD_ID=<DISCORD_GUILD_ID> -- node '<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js'
Claude Desktopclaude_desktop_config.json
{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
Cursor~/.cursor/mcp.json
{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
VS Code.vscode/mcp.json
{
  "servers": {
    "discord": {
      "type": "stdio",
      "command": "node",
      "args": [
        "<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js"
      ],
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>",
        "DISCORD_GUILD_ID": "<DISCORD_GUILD_ID>"
      }
    }
  }
}
Codex~/.codex/config.toml
[mcp_servers.discord]
command = "node"
args = ["<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js"]

[mcp_servers.discord.env]
DISCORD_TOKEN = "<DISCORD_TOKEN>"
DISCORD_GUILD_ID = "<DISCORD_GUILD_ID>"
Gemini CLITerminal
gemini mcp add --scope user -e DISCORD_TOKEN=<DISCORD_TOKEN> -e DISCORD_GUILD_ID=<DISCORD_GUILD_ID> discord node -- '<ABSOLUTE_PATH_TO_CLONE>/dist/cli.js'

Settings 2

DISCORD_TOKEN Required: Token of your Discord bot; BOT_TOKEN is accepted instead.
DISCORD_GUILD_ID Required: ID of the Discord server to manage.

What it does

Discord MCP, published on npm as @quadslab.io/discord-mcp by QuadsLab.io, connects an assistant to a Discord bot you create yourself and turns that bot's powers into 139 tools for running one Discord server (a guild). The tools cover roles and their permissions, channels and permission overwrites, members (kick, ban, timeout, prune, nicknames, voice moves), messages and threads, forums, emojis and stickers, webhooks, scheduled events, stage instances, auto-moderation rules, polls, DMs to members, server templates, slash commands and onboarding. It also exposes three read-only resources with a summary of the server, its channels and its roles.

Channels, roles and members can be named loosely: the server matches IDs, mentions, exact names, names with hyphens or spaces ignored, and close partial names, and suggests near matches when nothing fits. Changes accept a reason that lands in the Discord audit log. On start it logs the bot in and caches the server's channels, roles and members.

The same package carries a setup CLI: `init` walks through creating the bot, checks the token, builds an invite link with the needed permissions and writes the config for Claude Code, Claude Desktop, Cursor or Windsurf; `check` audits the bot's 24 permissions. Not in the README: the server also accepts the token as BOT_TOKEN when DISCORD_TOKEN is unset, and it reads a .env file from the working directory (dist/mcp-server.js, version 2.1.1).

What it needs

RuntimeNode.js 18+

Node.js 18 or later (for npx). A Discord bot of your own created in the Discord Developer Portal, with its token, invited to the server you want to manage with the permissions the README lists (Manage Server, Manage Roles, Ban Members and others), and with the privileged Server Members and Message Content intents switched on. The ID of that Discord server.

Limits

Works on one Discord server per running instance: it exits at start unless both DISCORD_TOKEN (or BOT_TOKEN) and DISCORD_GUILD_ID are set (dist/mcp-server.js, 2.1.1). There is no read-only mode or tool filter: all 139 tools are offered. The bot can only manage roles below its own highest role. Bulk delete takes 2 to 100 messages younger than 14 days; role icons and server banners need boost level 2. On large servers the member cache at start can hit Discord's gateway rate limit; the README says it retries, and the first call after start may be slow.

Who it suits

Server owners and moderators who want to run a Discord community from Claude Code, Claude Desktop, Cursor or Windsurf in plain language, including destructive admin work such as bans, pruning and bulk deletes. It needs a bot of your own with wide permissions, so it is a poor fit for someone who only wants to read or post in channels: a narrower bot with fewer permissions limits what can go wrong. Pick something else if you need several servers at once from one instance or a read-only setup. It is a community project, not Discord's own.

Tools 60 of 139

list_guilds
Lists the servers the bot belongs to
get_guild_info
Shows server details such as member count, boost tier and features
list_roles
Lists roles in order with colours and member counts
create_role
Makes a new role
delete_role
Removes a role
modify_role
Changes a role's name, colour, position or display options
modify_role_permissions
Grants or revokes permissions on a role
assign_role
Gives a role to a member
remove_role
Takes a role away from a member
list_channels
Lists channels grouped by category
create_text_channel
Makes a text channel, optionally inside a category
create_voice_channel
Makes a voice channel with bitrate and user limit
create_category
Makes a channel category
delete_channel
Removes a channel of any type
modify_channel
Changes a channel's name, topic, category, position or limits
set_channel_permissions
Sets a permission overwrite for a role or user on a channel
lock_channel
Stops @everyone from posting in a channel
unlock_channel
Lifts the @everyone posting block
set_slowmode
Sets a channel's per-user posting delay
get_voice_members
Shows who is in a voice or stage channel
list_members
Lists members, filterable by role or search text
get_member
Shows a member's roles, join date, account age and permissions
kick_member
Removes a member from the server
ban_member
Bans a member, optionally deleting recent messages
unban_member
Lifts a ban
timeout_member
Puts a member in timeout or ends one
prune_members
Removes inactive members, with a dry-run option
bulk_assign_role
Gives a role to many members at once
set_nickname
Changes or resets a member's nickname
search_members
Finds members by name, nickname or role
get_messages
Reads recent messages from a channel or thread
send_message
Posts a message, optionally as a reply
send_embed
Posts a rich embed
edit_message
Edits a message the bot sent
delete_message
Deletes one message
bulk_delete_messages
Deletes 2 to 100 recent messages at once
pin_message
Pins a message
add_reaction
Adds the bot's reaction to a message
search_messages
Searches a channel by text, author or date
get_reactions
Lists reactions on a message with details on who reacted
edit_server
Changes server name, description, verification and notification settings
create_invite
Makes an invite link with age and use limits
get_audit_log
Reads audit log entries, filterable by action or user
list_bans
Lists banned users and reasons
list_threads
Lists active threads
get_thread_messages
Reads a thread's messages with paging
create_thread
Starts a thread from a message or on its own
archive_thread
Archives a thread
create_forum_post
Opens a post in a forum channel
create_emoji
Uploads a custom emoji from a URL
create_webhook
Adds a webhook to a channel
send_webhook_message
Posts through a webhook with a custom name or avatar
create_event
Schedules a voice, stage or external event
start_stage
Opens a stage instance with a topic
create_automod_rule
Adds an auto-moderation rule
create_poll
Posts a poll
send_dm
Sends a direct message to a member
set_bot_presence
Sets the bot's status and activity
create_command
Registers a slash command
edit_onboarding
Changes the server's onboarding prompts and default channels

Similar servers