MCP Discord
Provides comprehensive Discord bot capabilities through 30+ tools across 8 categories including server management, channel operations, message handling, member management, role administration, moderation actions, and monitoring features.
mcp-discord
The most complete open-source MCP server for Discord.
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.
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
Node.js 18 or higher
Install
# Clone the repository
git clone https://github.com/goul4rt/mcp-discord.git
cd mcp-discord
# Install dependencies
npm install
# Build
npm run buildConfigure
cp .env.example .envEdit .env and add your Discord bot token:
DISCORD_TOKEN=your-bot-token-hereRun
# stdio transport (default — for MCP clients like Claude)
npm start
# HTTP transport (for remote/web clients)
npm run start:httpMCP 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)
Tool | Description |
| List all Discord servers the bot has access to |
| Get detailed info about a specific server |
Channels (7 tools)
Tool | Description |
| List all channels in a server |
| Get detailed info about a channel |
| Create text, voice, category, announcement, forum, or stage channels |
| Edit channel name, topic, NSFW, slowmode, position, category |
| Permanently delete a channel |
| Create a thread in a channel (optionally from a message) |
| Archive a thread |
Messages (8 tools)
Tool | Description |
| Send messages with text, rich embeds, and replies |
| Read recent messages with pagination (up to 100) |
| Search messages by content, author, or channel |
| Edit a bot message |
| Delete a single message |
| Bulk delete 2-100 messages (< 14 days old) |
| Pin a message |
| Unpin a message |
Reactions (2 tools)
Tool | Description |
| Add emoji reaction (Unicode or custom) |
| Remove a reaction |
Members / Users (4 tools)
Tool | Description |
| List server members with pagination |
| Get detailed member info (roles, nickname, join date) |
| Get info about any Discord user by ID |
| Search members by username or nickname |
Roles (4 tools)
Tool | Description |
| List all roles with permissions, colors, and member counts |
| Create a new role |
| Add a role to a member |
| Remove a role from a member |
Moderation (4 tools)
Tool | Description |
| Temporarily mute a user (up to 28 days) |
| Kick a user from the server |
| Ban a user with optional message deletion |
| Unban a user |
Monitoring (2 tools)
Tool | Description |
| View server audit log (bans, kicks, changes) |
| Find 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
Clientfrom 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
Variable | Required | Default | Description |
| Yes | — | Discord bot token |
| No |
| Connect to Discord WebSocket gateway for real-time features |
| No |
| Transport mode: |
| No |
| HTTP server port (only when |
| No | — | Bearer token for HTTP transport authentication |
Contributing
Contributions are welcome! See CONTRIBUTING.md for development setup, code style, and how to add new tools.
License
Author
Created by @goul4rt. Born from delfus.app, open-sourced for the community.
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/goul4rt/mcp-discord'
If you have feedback or need assistance with the MCP directory API, please join our Discord server