discord-mcp-server
Allows AI assistants to interact with Discord, including sending messages, managing channels, creating webhooks, assigning roles, and handling threads.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@discord-mcp-serversend a welcome message to #general"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
What is this?
discord-mcp-server lets any MCP-compatible AI client (Claude Desktop, Cursor, Windsurf, etc.) interact with Discord — send messages, manage channels, create webhooks, assign roles, and more.
Built with Bun, FastMCP, and discord.js.
Related MCP server: discord-mcp
Features
Category | Tools |
🏠 Server Info |
|
📢 Channels |
|
💬 Messages |
|
🔗 Webhooks |
|
🎭 Roles |
|
🧵 Threads |
|
31 tools covering the most common Discord operations. Forum posts are supported via create_thread.
Prerequisites
Bun (v1.0.0+) — Install Bun
Discord Bot Token — Create one here
Creating a Discord Bot
Go to the Discord Developer Portal
Click New Application → give it a name
Go to Bot → click Reset Token → copy the token
Under Privileged Gateway Intents, enable:
✅ Message Content Intent
✅ Server Members Intent
Go to OAuth2 → URL Generator
Scopes:
botBot Permissions:
Administrator(or cherry-pick permissions)
Copy the generated URL and open it to invite the bot to your server
Quick Start
Option 1: npx (recommended)
npx @ncodelife/discord-mcp-server --token YOUR_BOT_TOKENOption 2: Install globally
npm install -g @ncodelife/discord-mcp-server
discord-mcp-server --token YOUR_BOT_TOKENOption 3: Docker
docker build -t discord-mcp-server .
docker run -e DISCORD_TOKEN=YOUR_BOT_TOKEN discord-mcp-serverMCP Client Configuration
Claude Desktop
Add to your claude_desktop_config.json:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["@ncodelife/discord-mcp-server", "--token", "YOUR_BOT_TOKEN"]
}
}
}Cursor / Windsurf
Add to your MCP settings:
{
"discord": {
"command": "npx",
"args": ["@ncodelife/discord-mcp-server", "--token", "YOUR_BOT_TOKEN"]
}
}Smithery
Install via Smithery for automatic configuration.
Configuration
Option | CLI Flag | Env Variable | Default |
Bot Token |
|
| required |
Default Guild ID |
|
| — |
Transport |
|
|
|
HTTP Port |
|
|
|
Using a .env file
DISCORD_TOKEN=your-bot-token-here
DISCORD_GUILD_ID=your-server-idTransport Modes
stdio (default)
Standard I/O transport — used by Claude Desktop, Cursor, and most MCP clients.
discord-mcp-server --token YOUR_TOKENHTTP Stream
For web-based integrations and remote access:
discord-mcp-server --token YOUR_TOKEN --transport http --port 8080Note on build targets: The npm package is built with
--target nodesonpxworks everywhere. The Docker image uses--target bunfor native Bun performance. Both are fully functional.
Development
# Clone the repo
git clone https://github.com/ngoctranfire/discord-mcp-server.git
cd discord-mcp-server
# Install dependencies
bun install
# Run in development
bun run dev
# Type-check
bun run typecheck
# Lint
bun run lint
# Test with MCP Inspector
bun run inspectArchitecture
src/
├── index.ts # Entry point — FastMCP server setup
├── config.ts # CLI args + env var merging
├── discord.ts # Discord.js client factory
├── utils.ts # Shared utilities (error handling, formatting)
└── tools/
├── server-info.ts # Server listing & details
├── channels.ts # Channel CRUD operations
├── messages.ts # Message send/read/edit/delete + reactions
├── webhooks.ts # Webhook management
├── roles.ts # Role CRUD + assignment
└── threads.ts # Thread & forum operationsContributing
See CONTRIBUTING.md for guidelines on setup, development, and submitting pull requests.
License
This server cannot be deployed
Maintenance
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
One connector for 15,000+ MCP servers plus your team's private MCPs, from any AI client.
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
MCP server for AI dialogue using various LLM models via AceDataCloud
Related MCP Servers
- AlicenseBqualityDmaintenanceA Discord MCP server that enables AI assistants to interact with Discord platforms, providing functionalities like sending messages, managing channels, creating forum posts, and handling webhooks.21431 npm1MIT
- AlicenseBqualityDmaintenanceEnables MCP clients to interact with Discord servers, allowing operations such as sending messages and reading message history through the Discord API.23116 npmMIT
- AlicenseAqualityDmaintenanceAn MCP server for Discord that enables AI assistants to interact with Discord servers, channels, and messages via the Discord API.63 npmMIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI agents to communicate with humans through Discord. Agents can send messages, create threads, wait for replies, and manage conversations across any MCP client.7 npmISC