MCP Hub
Back to servers

MCP Discord

The most complete open-source MCP server for Discord — 80+ tools, dual-mode: integrated (plugin) or standalone

glama
Stars
4
Updated
Apr 13, 2026
Validated
Apr 14, 2026

mcp-discord

The most complete open-source MCP server for Discord.

License: MIT Node.js TypeScript GitHub stars

Give any MCP client (Claude, Cursor, custom agents) full control over Discord — messages, moderation, channels, roles, and more. Born from production use at delfus.app, open-sourced for the community.

Portugues (BR)


Why mcp-discord?

  • 30+ tools across 8 categories — servers, channels, messages, reactions, members, roles, moderation, and monitoring
  • Dual-mode — run standalone (own process) or integrate as a plugin into your existing discord.js bot
  • REST-only or Gateway — choose between lightweight REST-only mode or full WebSocket gateway for real-time features
  • Two transports — stdio (default, for Claude Desktop / Claude Code) or HTTP with Bearer token auth
  • Production-proven — built and used in production at delfus.app

Quick Start

Prerequisites

Install

# Clone the repository
git clone https://github.com/goul4rt/mcp-discord.git
cd mcp-discord

# Install dependencies
npm install

# Build
npm run build

Configure

cp .env.example .env

Edit .env and add your Discord bot token:

DISCORD_TOKEN=your-bot-token-here

Run

# stdio transport (default — for MCP clients like Claude)
npm start

# HTTP transport (for remote/web clients)
npm run start:http

MCP Client Configuration

Claude Desktop / Claude Code

Add to your MCP config file:

{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": ["dist/standalone.js"],
            "cwd": "/path/to/mcp-discord",
            "env": {
                "DISCORD_TOKEN": "your-bot-token-here"
            }
        }
    }
}

With Gateway (real-time features)

{
    "mcpServers": {
        "discord": {
            "command": "node",
            "args": ["dist/standalone.js"],
            "cwd": "/path/to/mcp-discord",
            "env": {
                "DISCORD_TOKEN": "your-bot-token-here",
                "DISCORD_USE_GATEWAY": "true"
            }
        }
    }
}

Tools

Server / Guild (2 tools)

ToolDescription
list_serversList all Discord servers the bot has access to
get_server_infoGet detailed info about a specific server

Channels (7 tools)

ToolDescription
get_channelsList all channels in a server
get_channelGet detailed info about a channel
create_channelCreate text, voice, category, announcement, forum, or stage channels
edit_channelEdit channel name, topic, NSFW, slowmode, position, category
delete_channelPermanently delete a channel
create_threadCreate a thread in a channel (optionally from a message)
archive_threadArchive a thread

Messages (8 tools)

ToolDescription
send_messageSend messages with text, rich embeds, and replies
read_messagesRead recent messages with pagination (up to 100)
search_messagesSearch messages by content, author, or channel
edit_messageEdit a bot message
delete_messageDelete a single message
delete_messages_bulkBulk delete 2-100 messages (< 14 days old)
pin_messagePin a message
unpin_messageUnpin a message

Reactions (2 tools)

ToolDescription
add_reactionAdd emoji reaction (Unicode or custom)
remove_reactionRemove a reaction

Members / Users (4 tools)

ToolDescription
list_membersList server members with pagination
get_memberGet detailed member info (roles, nickname, join date)
get_userGet info about any Discord user by ID
search_membersSearch members by username or nickname

Roles (4 tools)

ToolDescription
list_rolesList all roles with permissions, colors, and member counts
create_roleCreate a new role
add_roleAdd a role to a member
remove_roleRemove a role from a member

Moderation (4 tools)

ToolDescription
timeout_userTemporarily mute a user (up to 28 days)
kick_userKick a user from the server
ban_userBan a user with optional message deletion
unban_userUnban a user

Monitoring (2 tools)

ToolDescription
get_audit_logView server audit log (bans, kicks, changes)
check_mentionsFind recent @mentions of the bot or a user

Architecture

┌─────────────────────────────────────────────────┐
│                  MCP Client                      │
│          (Claude, Cursor, custom)                │
└──────────────────┬──────────────────────────────┘
                   │ stdio or HTTP
┌──────────────────▼──────────────────────────────┐
│               MCP Server                         │
│         (transport + tool routing)                │
└──────────────────┬──────────────────────────────┘
                   │
┌──────────────────▼──────────────────────────────┐
│            Tool Registry                         │
│         (30 tools, Zod validation)               │
└──────────────────┬──────────────────────────────┘
                   │
┌──────────────────▼──────────────────────────────┐
│          DiscordProvider (interface)              │
├─────────────────────┬───────────────────────────┤
│ StandaloneProvider  │  IntegratedProvider        │
│ (own token + REST/  │  (uses host bot's          │
│  optional gateway)  │   existing connection)      │
└─────────────────────┴───────────────────────────┘
                   │
┌──────────────────▼──────────────────────────────┐
│              Discord API                         │
└─────────────────────────────────────────────────┘

Provider abstraction: MCP tools never touch discord.js directly. They call the DiscordProvider interface, which has two implementations:

  • StandaloneProvider — creates its own connection using a bot token. REST-first with optional gateway. Use when running as a separate process.
  • IntegratedProvider — receives an existing discord.js Client from the host bot. Zero overhead, shared cache and gateway. Use when embedding in an existing bot.

Integration Guide

To use mcp-discord as a plugin inside your existing discord.js bot:

import { IntegratedProvider, createMcpServer } from 'mcp-discord';
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';

// Your existing discord.js client
const provider = new IntegratedProvider({ client: myDiscordClient });
await provider.connect();

const server = createMcpServer({ provider });
const transport = new StdioServerTransport();
await server.connect(transport);

The IntegratedProvider uses your bot's existing gateway connection — no extra WebSocket, no extra authentication, no extra memory.


Configuration Reference

VariableRequiredDefaultDescription
DISCORD_TOKENYesDiscord bot token
DISCORD_USE_GATEWAYNofalseConnect to Discord WebSocket gateway for real-time features
MCP_TRANSPORTNostdioTransport mode: stdio or http
MCP_PORTNo3100HTTP server port (only when MCP_TRANSPORT=http)
MCP_AUTH_TOKENNoBearer token for HTTP transport authentication

Contributing

Contributions are welcome! See CONTRIBUTING.md for development setup, code style, and how to add new tools.


License

MIT


Author

Created by @goul4rt. Born from delfus.app, open-sourced for the community.

Reviews

No reviews yet

Sign in to write a review