mcp-discord-bridge
MCP server that lets AI assistants control Discord servers 46 tools for channels, messages, forums, webhooks, roles, threads, and moderation. Install via npx -y mcp-discord-bridge with no clone required.
README
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.
<p align="center"> <img src="./assets/demo.svg" alt="Demo showing Discord MCP tools in action" width="820"> </p>
Install in one line
npx -y mcp-discord-bridge
That'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.commands - Check these permissions:
Send Messages,Read Message History,Manage Channels,Manage Roles,Manage Webhooks,Kick Members,Ban Members,Moderate Members,Manage Nicknames - Open 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: %APPDATA%\Claude\claude_desktop_config.json · macOS: ~/Library/Application Support/Claude/claude_desktop_config.json |
| Claude Code | ~/.claude.json (or run /mcp in Claude Code) |
| Cursor | Settings > search "MCP" > Edit MCP Settings |
| Windsurf | ~/.codeium/windsurf/mcp_settings.json |
| Continue.dev | ~/.continue/config.json |
| Zed | ~/.config/zed/settings.json |
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_guilds |
List all servers the bot is in |
list_channels |
List all channels and categories |
| Channels | |
create_category |
Create a new category |
create_channel |
Create a text or voice channel |
delete_channel |
Delete a channel or category |
move_channel |
Move a channel to a different category |
rename_channel |
Rename a channel or category |
| Messages | |
get_channel_messages |
Fetch recent messages (up to 100) |
send_message |
Send a message to a channel |
delete_message |
Delete a message |
edit_message |
Edit a bot message |
search_messages |
Search messages by keyword |
send_dm |
Send a direct message to a user |
add_reaction |
Add an emoji reaction to a message |
remove_reaction |
Remove the bot's reaction from a message |
add_multiple_reactions |
Add multiple reactions at once |
| Forum Channels | |
list_forum_channels |
List all forum channels in a server |
create_forum_post |
Create a new forum post |
get_forum_post |
Fetch a forum post and its messages |
reply_to_forum_post |
Reply to a forum post |
delete_forum_post |
Delete a forum post |
| Webhooks | |
create_webhook |
Create a webhook for a channel |
send_webhook_message |
Send a message via webhook |
edit_webhook |
Edit a webhook |
delete_webhook |
Delete a webhook |
| Members | |
list_members |
List server members with roles |
get_member |
Get detailed info about a member |
| Roles | |
list_roles |
List all roles in a server |
assign_role |
Give a role to a member |
remove_role |
Take a role from a member |
create_role |
Create a new role with name, color, mentionable |
edit_role |
Edit a role's name or color |
delete_role |
Delete a role from the server |
| Moderation | |
kick_member |
Kick a member from the server |
ban_member |
Ban a user (with optional message cleanup) |
unban_member |
Unban a previously banned user |
timeout_member |
Timeout (mute) a member for a duration |
set_nickname |
Set or reset a member's nickname |
| Threads | |
create_thread |
Create a thread in a text channel |
list_threads |
List active and archived threads |
archive_thread |
Archive a thread (optionally lock it) |
unarchive_thread |
Unarchive a thread |
join_thread |
Make the bot join a thread |
delete_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_ID
Then 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 bot
| Command | Description |
|---|---|
/ping |
Check bot latency |
/info |
Show bot uptime and stats |
/serverinfo |
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 logs
Development
npm run typecheck # Type check
npm run lint # Lint
npm run test # Run tests (53 tests)
npm run format # Format code
CI 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 build
Security
- Never commit your
.envfile — it's already in.gitignore - Treat your
DISCORD_TOKENlike a password — if leaked, regenerate it immediately in the Developer Portal - The bot can only assign roles below its own role in the hierarchy (Discord enforces this)
License
MIT — use it however you want.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。