mcp-discord-bridge
Allows AI assistants to manage a Discord server, including channels, messages, forum posts, webhooks, members, roles, moderation actions, threads, and server info.
Discord MCP Server
Control your Discord server using AI — 46 tools, no cloning required. Works with any MCP-compatible app: Claude Desktop, Cursor, Windsurf, Continue.dev, Zed, Claude Code, and more.
What is MCP? Model Context Protocol is an open standard that lets AI apps talk to external tools. This project is one of those tools — it gives any AI assistant the power to manage your Discord server.
Install in one line
npx -y mcp-discord-bridgeThat's it — no clone, no npm install. Just add it to your AI app's MCP config (see Quick Start below).
What Can It Do?
Once connected, your AI assistant can:
Channels — create, delete, rename, move channels and categories
Messages — read, send, edit, delete, search messages, send DMs, add/remove reactions
Forum Channels — list forums, create/read/reply/delete forum posts
Webhooks — create, send via, edit, and delete webhooks
Members — list members, view profiles, check roles
Roles — list, create, edit, delete, assign, and remove roles
Moderation — kick, ban, unban, timeout members, set nicknames
Threads — create, list, archive, unarchive, join, and delete threads
Server — list all servers the bot is in, view channel layouts
It also runs as a standalone Discord bot with /ping, /info, and /serverinfo slash commands.
Quick Start (3 minutes)
Step 1: Create a Discord Bot
Go to the Discord Developer Portal
Click New Application — give it a name
Go to Bot tab — click Reset Token — copy and save the token somewhere safe
Step 2: Invite the Bot to Your Server
In the Developer Portal, go to OAuth2 > URL Generator
Check these scopes:
bot,applications.commandsCheck these permissions:
Send Messages,Read Message History,Manage Channels,Manage Roles,Manage Webhooks,Kick Members,Ban Members,Moderate Members,Manage NicknamesOpen the generated URL — select your server — authorize
Step 3: Add to Your AI App
Add this to your app's MCP config — no cloning or installing needed:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "mcp-discord-bridge"],
"env": {
"DISCORD_TOKEN": "paste_your_bot_token_here"
}
}
}
}Where is the config file?
App | Config Location |
Claude Desktop | Windows: |
Claude Code |
|
Cursor | Settings > search "MCP" > Edit MCP Settings |
Windsurf |
|
Continue.dev |
|
Zed |
|
Step 4: Done!
Restart your AI app. You should now see Discord tools available. Try asking:
"List all channels in my Discord server"
All Available Tools (46)
Tool | What It Does |
Server | |
| List all servers the bot is in |
| List all channels and categories |
Channels | |
| Create a new category |
| Create a text or voice channel |
| Delete a channel or category |
| Move a channel to a different category |
| Rename a channel or category |
Messages | |
| Fetch recent messages (up to 100) |
| Send a message to a channel |
| Delete a message |
| Edit a bot message |
| Search messages by keyword |
| Send a direct message to a user |
| Add an emoji reaction to a message |
| Remove the bot's reaction from a message |
| Add multiple reactions at once |
Forum Channels | |
| List all forum channels in a server |
| Create a new forum post |
| Fetch a forum post and its messages |
| Reply to a forum post |
| Delete a forum post |
Webhooks | |
| Create a webhook for a channel |
| Send a message via webhook |
| Edit a webhook |
| Delete a webhook |
Members | |
| List server members with roles |
| Get detailed info about a member |
Roles | |
| List all roles in a server |
| Give a role to a member |
| Take a role from a member |
| Create a new role with name, color, mentionable |
| Edit a role's name or color |
| Delete a role from the server |
Moderation | |
| Kick a member from the server |
| Ban a user (with optional message cleanup) |
| Unban a previously banned user |
| Timeout (mute) a member for a duration |
| Set or reset a member's nickname |
Threads | |
| Create a thread in a text channel |
| List active and archived threads |
| Archive a thread (optionally lock it) |
| Unarchive a thread |
| Make the bot join a thread |
| Delete a thread |
Install from Source (for contributors)
If you want to modify the code or run the standalone bot:
git clone https://github.com/iprashantraj/mcp-discord-bridge.git
cd mcp-discord-bridge
npm install
cp .env.example .env # fill in DISCORD_TOKEN, CLIENT_ID, GUILD_IDThen use ts-node to run directly:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["ts-node", "/full/path/to/mcp-discord-bridge/mcp-server.ts"],
"env": {
"DISCORD_TOKEN": "paste_your_bot_token_here"
}
}
}
}Running as a Standalone Bot
If you just want the slash commands without MCP:
# Register commands (one time)
npm run deploy-commands
# Start the bot
npm run botCommand | Description |
| Check bot latency |
| Show bot uptime and stats |
| Show server details |
Docker Deployment
The image defaults to the MCP server (stdio). To run the standalone bot 24/7 instead, uncomment the command: npm run bot line in docker-compose.yml, then:
docker-compose up -d # Start in background
docker-compose logs -f # View logsDevelopment
npm run typecheck # Type check
npm run lint # Lint
npm run test # Run tests (53 tests)
npm run format # Format codeCI runs automatically on every push and PR via GitHub Actions.
Project Structure
mcp-discord-bridge/
├── discord-client.ts # Shared Discord client setup
├── mcp-server.ts # MCP server (tool schemas + wiring)
├── mcp-handlers.ts # Tool handler logic (registry pattern)
├── index.ts # Standalone bot (slash commands)
├── deploy-commands.ts # One-time command registration
├── tests/ # Vitest test suite
├── .github/workflows/ # CI pipeline
└── Dockerfile # Multi-stage Docker buildSecurity
Never commit your
.envfile — it's already in.gitignoreTreat your
DISCORD_TOKENlike a password — if leaked, regenerate it immediately in the Developer PortalThe bot can only assign roles below its own role in the hierarchy (Discord enforces this)
License
MIT — use it however you want.
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/iprashantraj/mcp-discord-bridge'
If you have feedback or need assistance with the MCP directory API, please join our Discord server