discord-mcp
Lightweight multi-guild Discord MCP server with 60+ tools for messages, channels, roles, permissions, moderation, forums, webhooks, and embeds
README
<div align="center">
Discord MCP Server
A lightweight, multi-guild Discord MCP server with 60+ tools
Manage your entire Discord server from Claude Desktop, Claude Code, Cursor, VS Code Copilot, or any MCP-compatible client. Messages, channels, roles, permissions, moderation, forums, webhooks — all through natural language.
</div>
Why this one?
- 60+ tools — messages, channels, roles, permissions, moderation, forums, webhooks, embeds, and more
- Multi-guild — works across multiple servers, no
GUILD_IDlock-in - Lightweight — TypeScript + Node.js, ~25kB package, ~73MB Docker image (vs 400MB+ for Java alternatives)
- Modular — clean architecture, easy to extend with new tools
- Two install methods — npm or Docker, your choice
Quick Start
Add this to your MCP client config and replace YOUR_TOKEN_HERE with your bot token:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
No install needed — npx handles everything.
Don't have a bot yet? See Creating Your Discord Bot.
Configuration
<details> <summary><strong>Claude Desktop</strong></summary>
Add the config above to your claude_desktop_config.json:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
Restart Claude Desktop after saving.
</details>
<details> <summary><strong>Claude Code</strong></summary>
claude mcp add discord -e DISCORD_TOKEN=YOUR_TOKEN_HERE -- npx -y @pasympa/discord-mcp
</details>
<details> <summary><strong>Cursor</strong></summary>
Add the config above to ~/.cursor/mcp.json. See Cursor MCP docs for details.
</details>
<details> <summary><strong>VS Code / GitHub Copilot</strong></summary>
Add to your .vscode/mcp.json:
{
"inputs": [
{
"type": "promptString",
"id": "discord-token",
"description": "Discord Bot Token",
"password": true
}
],
"servers": {
"discord": {
"command": "npx",
"args": ["-y", "@pasympa/discord-mcp"],
"env": {
"DISCORD_TOKEN": "${input:discord-token}"
}
}
}
}
See VS Code MCP docs for details.
</details>
<details> <summary><strong>Docker</strong></summary>
{
"mcpServers": {
"discord": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"-e", "DISCORD_TOKEN=YOUR_TOKEN_HERE",
"pasympa/discord-mcp:latest"
]
}
}
}
</details>
<details> <summary><strong>From source</strong></summary>
git clone https://github.com/PaSympa/discord-mcp
cd discord-mcp
npm install && npm run build
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_TOKEN": "YOUR_TOKEN_HERE"
}
}
}
}
</details>
<details> <summary><strong>.env file (alternative)</strong></summary>
Instead of passing the token in the MCP config, create a .env file at the project root:
DISCORD_TOKEN=YOUR_TOKEN_HERE
The server loads .env automatically via dotenv.
</details>
Creating Your Discord Bot
- Go to discord.com/developers/applications
- New Application > give it a name
- Bot tab > Reset Token > copy the token
- Enable Privileged Gateway Intents:
- Server Members Intent
- Message Content Intent
- OAuth2 > URL Generator:
- Scopes:
bot - Permissions:
Send Messages,Read Message History,Manage Channels,Manage Roles,Kick Members,Ban Members,Moderate Members,View Audit Log,Manage Messages,Manage Threads,Add Reactions,Manage Guild,Manage Webhooks
- Scopes:
- Copy the generated URL and invite the bot to your server
Available Tools (60)
Discovery & Navigation
| Tool | Description |
|---|---|
discord_list_guilds |
List all servers the bot is connected to |
discord_get_guild_info |
Get detailed guild info (name, members, channels, roles, boosts) |
discord_list_channels |
List all channels in a guild grouped by category |
discord_find_channel_by_name |
Find a channel by name (partial match) |
Messages (13 tools)
| Tool | Description |
|---|---|
discord_read_messages |
Read the last N messages from a text channel |
discord_send_message |
Send a plain text message |
discord_reply_message |
Reply to a specific message |
discord_edit_message |
Edit a message sent by the bot |
discord_delete_message |
Delete a specific message |
discord_add_reaction |
Add a reaction emoji to a message |
discord_create_thread |
Create a thread from a message or standalone |
discord_bulk_delete_messages |
Delete multiple messages at once (2-100) |
discord_send_embed |
Send a rich embed with all options |
discord_edit_embed |
Edit an embed previously sent by the bot |
discord_send_multiple_embeds |
Send up to 10 embeds in a single message |
discord_pin_message |
Pin or unpin a message |
discord_search_messages |
Search messages by keyword (last 100) |
Channels (5 tools)
| Tool | Description |
|---|---|
discord_create_channel |
Create a text, voice channel or category |
discord_delete_channel |
Delete a channel |
discord_edit_channel |
Edit name, topic, slowmode |
discord_move_channel |
Move a channel into/out of a category |
discord_clone_channel |
Clone a channel with its permissions |
Channel Permissions (6 tools)
| Tool | Description |
|---|---|
discord_get_channel_permissions |
List all permission overwrites on a channel |
discord_set_role_permission |
Allow/deny permissions for a role on a channel |
discord_set_member_permission |
Allow/deny permissions for a member on a channel |
discord_reset_channel_permissions |
Remove all overwrites (reset to inherited) |
discord_copy_permissions |
Copy overwrites from one channel to another |
discord_audit_permissions |
Full permission audit for all channels |
Members (6 tools)
| Tool | Description |
|---|---|
discord_list_members |
List guild members with their roles |
discord_get_member_info |
Detailed member info (roles, permissions, join date) |
discord_kick_member |
Kick a member |
discord_ban_member |
Ban a member (optionally delete recent messages) |
discord_unban_member |
Unban a user |
discord_timeout_member |
Timeout a member (0 to remove) |
Roles (7 tools)
| Tool | Description |
|---|---|
discord_list_roles |
List all roles with permissions and member count |
discord_create_role |
Create a new role |
discord_edit_role |
Edit a role (name, color, permissions, hoist, mentionable) |
discord_delete_role |
Delete a role |
discord_add_role |
Assign a role to a member |
discord_remove_role |
Remove a role from a member |
discord_get_role_members |
List all members with a specific role |
Forums (10 tools)
| Tool | Description |
|---|---|
discord_get_forum_channels |
List all forum channels in a guild |
discord_create_forum_channel |
Create a new forum channel |
discord_create_forum_post |
Create a post/thread in a forum |
discord_get_forum_post |
Get a post's details and messages |
discord_list_forum_threads |
List threads (active + archived) |
discord_reply_to_forum |
Reply to a forum post |
discord_delete_forum_post |
Delete a forum thread |
discord_get_forum_tags |
Get available tags |
discord_set_forum_tags |
Set/update tags on a forum |
discord_update_forum_post |
Update title, archived, locked, tags |
Webhooks (5 tools)
| Tool | Description |
|---|---|
discord_create_webhook |
Create a webhook on a channel |
discord_send_webhook_message |
Send via webhook (custom username/avatar, embeds) |
discord_edit_webhook |
Edit a webhook's name, avatar, or channel |
discord_delete_webhook |
Delete a webhook |
discord_list_webhooks |
List webhooks for a channel or guild |
Moderation & Screening
| Tool | Description |
|---|---|
discord_get_audit_log |
Fetch the guild audit log |
discord_get_membership_screening |
Get the membership screening form |
discord_update_membership_screening |
Update screening rules for new members |
Stats
| Tool | Description |
|---|---|
discord_get_server_stats |
Server stats: members, channels, roles, boost level |
Usage Examples
"List all servers the bot is in"
"Read the last 10 messages in #general"
"Send 'Hello everyone!' to the announcements channel"
"Create a forum channel called 'feedback' with tags Bug, Feature, Question"
"Show the full permission audit for the server"
"Create a webhook on #notifications and send a test message"
"Ban user 112233445566 and delete their messages from the last 3 days"
Finding Discord IDs
Enable Developer Mode in Discord:
Settings > Advanced > Developer Mode
Then right-click on a server, channel, or user > Copy ID.
Project Structure
discord-mcp/
├── src/
│ ├── index.ts ← Entry point (MCP server + transport)
│ ├── client.ts ← Discord client + shared helpers
│ └── tools/
│ ├── index.ts ← Tool registry
│ ├── types.ts ← Shared TypeScript interfaces
│ ├── discovery.ts ← Guild/channel discovery
│ ├── messages.ts ← Message CRUD, reactions, threads, embeds
│ ├── channels.ts ← Channel management
│ ├── permissions.ts ← Permission overwrites
│ ├── members.ts ← Member management
│ ├── roles.ts ← Role CRUD and assignment
│ ├── moderation.ts ← Audit log
│ ├── screening.ts ← Membership screening
│ ├── stats.ts ← Server statistics
│ ├── forums.ts ← Forum channels, posts, tags
│ └── webhooks.ts ← Webhook management
├── Dockerfile
├── .dockerignore
├── package.json
├── tsconfig.json
└── README.md
Adding a new tool
- Create a new file in
src/tools/(e.g.events.ts) - Export
definitions(tool schemas) andhandle()(tool logic) - Import and add it to the
modulesarray insrc/tools/index.ts
Security
- Never commit your Discord token to Git
- Use environment variables or a
.envfile (not versioned) - Give the bot only the permissions it needs
Contributing
Contributions are welcome!
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Follow the modular structure — see Adding a new tool
- Commit your changes and open a pull request
License
MIT — see LICENSE for details.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。