mcp-discord-bridge
This server lets AI assistants fully control a Discord server via 44 tools, covering channels, messages, forums, webhooks, members, roles, moderation, threads, and server management.
Server Management: List all servers (
list_guilds) and view channel layouts (list_channels).Channels: Create, delete, rename, and move text/voice channels and categories.
Messages: Fetch, send, edit, delete, and search messages; send DMs; add/remove reactions (including multiple at once).
Forum Channels: List, create, read, reply to, and delete forum posts.
Webhooks: Create, send via (with optional username override), edit, and delete webhooks.
Members: List members (up to 1,000) and view detailed member info.
Roles: List, create, edit, delete, assign, and remove roles (with name, color, and mentionable options).
Moderation: Kick, ban, unban, timeout members, and set/reset nicknames.
Threads: Create, list, archive, unarchive, join, and delete threads.
Security: A read-only mode is available to prevent destructive actions.
Standalone Features: Offers
/ping,/info, and/serverinfoslash commands when run as a standalone bot.
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 — 44 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).
Related MCP server: limitless-reign-mcp
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 (44)
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: ["node", "dist/index.js"] line in docker-compose.yml, then:
docker-compose up -d # Start in background
docker-compose logs -f # View logsArchitecture
An MCP client talks to mcp-server.ts over stdio (JSON-RPC). The server advertises tools (with read-only/destructive annotations), then dispatches each call through mcp-handlers.ts — a 44-tool registry that validates args, checks bot permissions, and enforces read-only mode. Handlers act through the shared client from discord-client.ts, which owns login and connection state. The standalone bot (index.ts) is a separate entrypoint that reuses the same client factory.
Editable source:
assets/architecture.excalidraw— open it at excalidraw.com.
Development
npm run typecheck # Type check
npm run lint # Lint
npm run test # Run tests (59 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 buildRead-Only Mode
This server can delete channels, ban members, and remove roles. If you only want
the AI to read your server, set DISCORD_READONLY in the env block:
"env": {
"DISCORD_TOKEN": "your_token",
"DISCORD_READONLY": "true"
}In read-only mode only the 10 read tools (list_*, get_*, search_messages)
are advertised and callable; every write/destructive tool is refused.
All tools also carry MCP annotations (readOnlyHint / destructiveHint), so
compatible clients can flag or confirm destructive actions before running them.
Security
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)
Grant the bot only the permissions you need — if you won't use moderation, don't grant Ban/Kick
Because the AI can read channel messages and act on the server, treat untrusted message content as a prompt-injection risk; use read-only mode for safer deployments
See SECURITY.md for the full threat model and reporting policy
License
MIT — use it however you want.
Available Tools
44 toolsadd_multiple_reactionsB
Add multiple emoji reactions to a message at once
Inputs: channel_id (required), message_id (required), emojis (required).
add_reactionC
Add an emoji reaction to a message
Inputs: channel_id (required), message_id (required), emoji (required).
archive_threadB
Archive a thread, optionally locking it
Inputs: thread_id (required), locked.
assign_roleC
Assign a role to a guild member
Inputs: guild_id (required), user_id (required), role_id (required), reason.
ban_memberC
Ban a user from the server
Inputs: guild_id (required), user_id (required), reason, delete_message_days.
create_categoryA
Create a new category in a Discord server
Inputs: guild_id (required), name (required), position.
create_channelA
Create a text or voice channel, optionally inside a category
Inputs: guild_id (required), name (required), type, category_id, +1 more.
create_forum_postB
Create a new forum post with title and content
Inputs: channel_id (required), title (required), content (required).
create_roleB
Create a new role in the server
Inputs: guild_id (required), name (required), color, mentionable, +1 more.
create_threadB
Create a new thread in a text channel
Inputs: channel_id (required), name (required), message_id.
create_webhookC
Create a webhook for a channel
Inputs: channel_id (required), name (required).
delete_channelC
Delete a channel or category by ID
Inputs: channel_id (required), reason.
delete_forum_postC
Delete a forum post
Inputs: thread_id (required).
delete_messageC
Delete a message by channel and message ID
Inputs: channel_id (required), message_id (required).
delete_roleC
Delete a role from the server
Inputs: guild_id (required), role_id (required), reason.
delete_threadC
Delete a thread
Inputs: thread_id (required).
delete_webhookC
Delete a webhook
Inputs: channel_id (required), webhook_id (required).
edit_messageB
Edit a bot message by channel and message ID
Inputs: channel_id (required), message_id (required), content (required).
edit_roleC
Edit an existing role's name or color
Inputs: guild_id (required), role_id (required), name, color, +1 more.
edit_webhookC
Edit an existing webhook
Inputs: channel_id (required), webhook_id (required), name.
get_channel_messagesB
Fetch recent messages from a text channel
Inputs: channel_id (required), limit, before, after.
get_forum_postB
Fetch a forum post and its messages
Inputs: thread_id (required), limit.
get_memberB
Get detailed information about a specific guild member
Inputs: guild_id (required), user_id (required).
join_threadC
Make the bot join a thread
Inputs: thread_id (required).
kick_memberC
Kick a member from the server
Inputs: guild_id (required), user_id (required), reason.
list_channelsC
List all channels and categories in a Discord server
Inputs: guild_id (required).
list_forum_channelsC
List all forum channels in a server
Inputs: guild_id (required).
list_guildsA
List all Discord servers the bot is in
Inputs: no named parameters.
list_membersB
List members in a Discord server (up to 1000)
Inputs: guild_id (required), limit.
list_rolesB
List all roles in a Discord server
Inputs: guild_id (required).
list_threadsC
List active and archived threads in a channel
Inputs: channel_id (required).
move_channelB
Move a channel into a different category
Inputs: channel_id (required), category_id.
remove_reactionB
Remove the bot's emoji reaction from a message
Inputs: channel_id (required), message_id (required), emoji (required).
remove_roleC
Remove a role from a guild member
Inputs: guild_id (required), user_id (required), role_id (required), reason.
rename_channelC
Rename a channel or category
Inputs: channel_id (required), name (required), reason.
reply_to_forum_postA
Reply to an existing forum post
Inputs: thread_id (required), content (required).
search_messagesB
Search messages in a channel by keyword
Inputs: channel_id (required), query (required), limit.
send_dmC
Send a direct message to a user
Inputs: user_id (required), content (required).
send_messageC
Send a message to a Discord text channel
Inputs: channel_id (required), content (required).
send_webhook_messageC
Send a message via a webhook
Inputs: channel_id (required), webhook_id (required), content (required), username.
set_nicknameC
Set or reset a member's nickname
Inputs: guild_id (required), user_id (required), nickname, reason.
timeout_memberB
Timeout (mute) a member for a specified duration
Inputs: guild_id (required), user_id (required), duration_minutes, reason.
unarchive_threadC
Unarchive a thread
Inputs: thread_id (required).
unban_memberC
Unban a user from the server
Inputs: guild_id (required), user_id (required), reason.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 44 tools
Most tools have clearly distinct purposes due to descriptive names like create_channel vs create_category. Potential confusion exists between create_forum_post and reply_to_forum_post, and between add_reaction and add_multiple_reactions, but descriptions mitigate this.
All tool names follow a consistent verb_noun pattern with snake_case (e.g., assign_role, ban_member, create_category). No mixing of styles, and the use of get vs list and singular vs plural is uniform.
At 44 tools, the server is overloaded. While a Discord bridge can justify many actions, this number exceeds the recommended 3-15 range, making the set feel bloated and potentially confusing for agents.
The tool set covers common Discord operations (channels, roles, members, messages, threads) but lacks voice operations, invite management, emoji management (beyond reactions), and advanced message features like pinning or editing other users' messages.
Maintenance
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
MCP server connecting AI agents to 100+ apps (Gmail, Slack, Notion, GitHub) via one-click OAuth.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceAn MCP server that gives AI agents full admin control over Discord servers with 59 tools for messaging, moderation, roles, channels, forums, reactions, files, and more, deployed on Cloudflare Workers.8MIT
- AlicenseNot gradedqualityDmaintenanceA Discord MCP server SDK that connects AI assistants like Claude and ChatGPT to Discord, providing over 100 tools for natural language control of Discord servers, including channel, message, member, and role management.76 npmMIT
- AlicenseNot gradedqualityFmaintenanceMCP server that gives AI agents first-class access to Discord, enabling discovery, messaging, channel management, moderation, and arbitrary REST calls through typed, consent-aware tools.14 npm3MIT
- AlicenseNot gradedqualityDmaintenanceA comprehensive Discord MCP server enabling AI assistants to run a Discord community through 111 tools for messaging, moderation, roles, channels, forums, webhooks, and more, plus a raw REST API passthrough for full Discord API access.MIT