Discord MCP Server

Local setup required. This server has to be cloned and prepared on your machine before you register it in Claude Code.
1

Set the server up locally

Run this once to clone and prepare the server before adding it to Claude Code.

Run in terminal
git clone https://github.com/jackglick/discord-mcp
cd discord-mcp
bun install
2

Register it in Claude Code

After the local setup is done, run this command to point Claude Code at the built server.

Run in terminal
claude mcp add -e "DISCORD_BOT_TOKEN=${DISCORD_BOT_TOKEN}" discord-mcp-16b0 -- bun run "<FULL_PATH_TO_DISCORD_MCP>/dist/index.js"

Replace <FULL_PATH_TO_DISCORD_MCP>/dist/index.js with the actual folder you prepared in step 1.

Required:DISCORD_BOT_TOKEN+ 1 optional
README.md

An MCP server that exposes Discord admin operations as tools.

Discord MCP Server

An MCP server that exposes Discord admin operations as tools. Built with TypeScript + Bun, using direct Discord REST API v10 calls (no discord.js dependency).

Features

  • 33 tools for Discord server administration
  • Channel management, role management, member moderation, server configuration
  • Composite tools for common multi-step workflows (category setup, channel lockdown, bulk role assignment)
  • Built-in rate limiting with per-route bucket tracking and automatic retry
  • Audit log reasons for all write operations via X-Audit-Log-Reason header

Prerequisites

  • Bun v1.0+
  • A Discord bot token with appropriate permissions

Discord Bot Setup

  1. Go to https://discord.com/developers/applications
  2. Create a new application
  3. Go to the Bot tab, create a bot, and copy the token
  4. Enable required intents: Server Members Intent (needed for member listing)
  5. Go to OAuth2 > URL Generator
  6. Select scopes: bot
  7. Select permissions: Administrator (or granular permissions: Manage Channels, Manage Roles, Kick Members, Ban Members, Manage Guild, Moderate Members)
  8. Copy the generated invite URL and add the bot to your server
  9. Copy the Guild ID (right-click the server name in Discord > Copy Server ID -- requires Developer Mode enabled in Discord settings)

Installation

git clone <repo-url>
cd discord-mcp
bun install

Configuration

cp .env.example .env
# Edit .env with your bot token and optional guild ID

Environment variables:

Variable Required Description
DISCORD_BOT_TOKEN Yes Your Discord bot token
DISCORD_GUILD_ID No Default guild ID. If set, tools will use this as the default and the guild_id parameter becomes optional.

Usage with Claude Code

Add the following to .claude/mcp.json:

{
  "mcpServers": {
    "discord": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/discord-mcp/src/index.ts"],
      "env": {
        "DISCORD_BOT_TOKEN": "your-token-here",
        "DISCORD_GUILD_ID": "your-guild-id"
      }
    }
  }
}

Usage with Claude Desktop

Add the following to claude_desktop_config.json:

{
  "mcpServers": {
    "discord": {
      "command": "bun",
      "args": ["run", "/absolute/path/to/discord-mcp/src/index.ts"],
      "env": {
        "DISCORD_BOT_TOKEN": "your-token-here",
        "DISCORD_GUILD_ID": "your-guild-id"
      }
    }
  }
}

Testing with MCP Inspector

bunx @modelcontextprotocol/inspector -- bun run src/index.ts

Tool Reference

Server Info (3 tools)

Tool Description
get_guild Get detailed server information including member counts, features, and boost status
get_guild_preview Get server preview with emojis, stickers, and approximate counts
modify_guild Update server settings (name, description, verification level, icon, banner, system channel)

Channels (7 tools)

Tool Description
list_channels List all channels in a guild, grouped by category
get_channel Get detailed information about a specific channel
create_channel Create a new channel (text, voice, category, announcement, stage, forum, media)
modify_channel Modify a channel's settings (name, topic, position, parent, NSFW)
delete_channel Permanently delete a channel
set_channel_permissions Set permission overwrites for a role or member on a channel
delete_channel_permissions Remove a permission overwrite for a role or member on a channel

Roles (8 tools)

Tool Description
list_roles List all roles in a guild, sorted by position
get_role Get detailed information about a specific role
create_role Create a new role with optional name, color, hoist, mentionable, and permissions
modify_role Modify an existing role's properties
delete_role Permanently delete a role
reorder_roles Reorder roles by specifying new positions
add_role_to_member Add a role to a guild member
remove_role_from_member Remove a role from a guild member

Members and Moderation (10 tools)

Tool Description
list_members List guild members with pagination (up to 1000 per request)
search_members Search for members by username or nickname prefix
get_member Get detailed info about a member (roles, join date, timeout status)
modify_member Modify a member's nickname, roles, or voice mute/deafen status
kick_member Remove a member from the guild (they can rejoin with an invite)
ban_member Ban a user from the guild, optionally deleting recent messages (up to 7 days)
unban_member Remove a ban, allowing the user to rejoin
list_bans List all banned users with reasons
get_ban Get ban information for a specific user
timeout_member Temporarily prevent a member from in

Tools (5)

get_guildGet detailed server information including member counts, features, and boost status
create_channelCreate a new channel (text, voice, category, announcement, stage, forum, media)
add_role_to_memberAdd a role to a guild member
kick_memberRemove a member from the guild
ban_memberBan a user from the guild, optionally deleting recent messages

Environment Variables

DISCORD_BOT_TOKENrequiredYour Discord bot token
DISCORD_GUILD_IDDefault guild ID for tool operations

Configuration

claude_desktop_config.json
{"mcpServers": {"discord": {"command": "bun", "args": ["run", "/absolute/path/to/discord-mcp/src/index.ts"], "env": {"DISCORD_BOT_TOKEN": "your-token-here", "DISCORD_GUILD_ID": "your-guild-id"}}}}

Try it

List all channels in the server and group them by category.
Ban the user with the username 'troublemaker' and delete their messages from the last 7 days.
Create a new text channel named 'announcements' and set the appropriate permissions.
Add the 'Moderator' role to the user with ID 123456789.
Get the current server statistics including member count and boost status.

Frequently Asked Questions

What are the key features of Discord MCP Server?

33 tools for comprehensive Discord server administration. Direct Discord REST API v10 integration without external dependencies. Composite tools for multi-step workflows like channel lockdown. Built-in rate limiting with automatic retry logic. Audit log support for all write operations.

What can I use Discord MCP Server for?

Automating server onboarding by assigning roles to new members. Performing bulk moderation tasks like clearing channels or banning multiple users. Managing complex channel structures and permission overwrites programmatically. Monitoring server health and member activity through automated reports.

How do I install Discord MCP Server?

Install Discord MCP Server by running: git clone https://github.com/jackglick/discord-mcp && cd discord-mcp && bun install

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.

Turn this server into reusable context

Keep Discord MCP Server docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare