接入你的智能体
從發布者安裝。不是 PlugMCP 端點。
遠端 URL 還是本機指令? 兩種安裝方式的差異
Manage your entire Discord server from Claude Code, Claude Co-Work, Claude Desktop, Cursor, or Windsurf. 139 admin tools across 20 categories — roles, channels, members, messages, threads, moderation, forums, stages, webhooks, events, polls, DMs, and more. Just talk to your AI in plain English.
Built by QuadsLab.io | Discord | npm
If you find this useful, consider giving it a star on GitHub — it helps others discover the project!
One command. No manual config files. No copying IDs.
npx @quadslab.io/discord-mcp init
The interactive wizard walks you through everything: It will:
The wizard auto-detects which clients you have installed:
Detected MCP clients:
● Claude Code .mcp.json
● Claude Desktop ~/Library/Application Support/Claude/claude_desktop_config.json
● Cursor ~/.cursor/mcp.json
○ Windsurf (not detected)
? Which client(s) to configure?
1. Claude Code (detected)
2. Claude Desktop (detected)
3. Cursor (detected)
4. Windsurf (not found)
5. All detected (3 clients)
6. Skip (show config to copy manually)
Select one, multiple, or "All detected" to configure everything at once.
npx @quadslab.io/discord-mcp check
QuadsLab.io [discord-mcp] — Health Check
────────────────────────────────────────────────────
Token ............ present
Bot .............. MyBot#1234
Server ........... My Gaming Server (1,024 members)
Permissions
────────────────────────────────────────────────────
✔ Manage Roles .............. yes
✔ Manage Channels ........... yes
✔ Kick Members .............. yes
✔ Ban Members ............... yes
...
██████████████████████████████ 100% (24/24)
✔ All 24 permissions granted
┌──────────────────────────────────────────────────┐
│ MCP server is ready! │
│ Run discord-mcp or use via .mcp.json in Claude │
└──────────────────────────────────────────────────┘
Once connected to Claude Code or Claude Co-Work, just ask in natural language:
Claude automatically resolves channel, role, and member names using fuzzy matching — no need to look up IDs.
npx init walks you through bot creation, token validation, and config in under a minutenpx check verifies your token, server access, and all 24 required permissions with a visual progress bar"bot testing", "bot-testing", or "bottesting" and it resolves correctly; no need to look up IDsreason parameter that appears in the Discord audit logIf you prefer to configure things manually instead of using the wizard:
Follow the Bot Setup Guide to create a bot in the Discord Developer Portal and get your token.
Add the following discord entry to your client's config file:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@quadslab.io/discord-mcp"],
"env": {
"DISCORD_TOKEN": "your-bot-token",
"DISCORD_GUILD_ID": "your-server-id"
}
}
}
}
/mcp to connectgit clone https://github.com/HardHeadHackerHead/discord-mcp.git
cd discord-mcp
npm install
cp .env.example .env
# Edit .env with your DISCORD_TOKEN and DISCORD_GUILD_ID
npm run build
npm start
$ npx @quadslab.io/discord-mcp [command]
When launched via .mcp.json (stdin is not a TTY), the server starts automatically — no subcommand needed.
Your MCP client config doesn't pin a version, so updating is simple:
npx @quadslab.io/discord-mcp update
This checks npm for the latest version, clears the npx cache, and your next MCP client launch will use the new version automatically. Your bot token, server, and client configuration are all preserved — nothing needs to be reconfigured.
To verify after updating:
npx @quadslab.io/discord-mcp version
npx @quadslab.io/discord-mcp check
All message tools work in both regular channels and threads — just pass the thread name or ID as the channel.
All tools that accept channel, role, or member names use smart fuzzy matching. You never need to look up IDs manually. The resolution order is:
"bot testing" matches "bot-testing")Mention formats are also handled automatically:
#name or <#id>@name or <@&id>@name or <@id> or <@!id>If no match is found, the error message includes suggestions of similar names to help you correct the input.
Three read-only resources are exposed for quick server overview data:
The Discord bot needs the following permissions for full functionality:
The init wizard auto-generates an invite URL with all of these. If you set up manually, see the Bot Setup Guide for which checkboxes to select.
The bot can only act within its role hierarchy — it cannot manage roles positioned higher than its own highest role.
These privileged intents must be enabled in the Discord Developer Portal:
Run the health check to diagnose issues:
npx @quadslab.io/discord-mcp check
The MCP server can't find your bot token. Either:
npx @quadslab.io/discord-mcp init to set up automatically.mcp.json / MCP client config has the DISCORD_TOKEN in the env blockDiscord rate-limited the gateway connection (usually from member caching on large servers). The server retries automatically — if you're still seeing this, wait 30 seconds and try again. This is a Discord-side limit, not a bug.
Fixed in v1.2.2+. Update to the latest version:
npx @quadslab.io/discord-mcp@latest init
The bot's role doesn't have the required permissions. Either:
npx @quadslab.io/discord-mcp init (it includes all permissions)npx @quadslab.io/discord-mcp check to see exactly which permissions are missingDiscord enforces role hierarchy — the bot can only manage roles below its own highest role. Move the bot's role higher in Server Settings > Roles.
Enable Message Content Intent in the Discord Developer Portal > Bot tab.
Enable Server Members Intent and Message Content Intent in the Discord Developer Portal > Bot tab. Both are required.
The first tool call after startup may be slow due to caching. Subsequent calls use the cached data and should be instant. If all calls are slow, check your network connection to Discord.
.mcp.json was created in the wrong directoryIf you ran init from Desktop or Downloads, update to v1.2.3+ which auto-detects this and writes to ~/.claude.json (global config) instead. Or move the .mcp.json file to your project root.
@quadslab.io/discord-mcp/
├── package.json
├── tsconfig.json
├── README.md
├── LICENSE
├── .env.example
├── docs/
│ ├── discord-mcp-server.md # Full tool reference documentation
│ └── bot-setup-guide.md # Step-by-step bot creation guide
└── src/
├── cli.ts # CLI — init wizard, health check, server start
├── mcp-server.ts # MCP server entry — validates env, exports main()
├── index.ts # Tool/resource registration and MCP request routing
├── discord-client.ts # Discord.js client — intents, caching, rate limit retry
└── tools/
├── index.ts # Tool registry — routes calls to category handlers
├── utils.ts # Fuzzy matching for channels, roles, members
├── guild.ts # Server info (2)
├── roles.ts # Role management (11)
├── channels.ts # Channel management (20)
├── members.ts # Member management (15)
├── messages.ts # Messaging (14)
├── reactions.ts # Reactions (1)
├── server.ts # Server admin (16)
├── threads.ts # Thread management (15)
├── forums.ts # Forum channels (5)
├── emojis.ts # Emoji & stickers (7)
├── webhooks.ts # Webhooks (4)
├── events.ts # Scheduled events (5)
├── stage.ts # Stage instances (3)
├── automod.ts # Auto-moderation (4)
├── polls.ts # Polls (3)
├── dms.ts # Direct messages (2)
├── presence.ts # Bot presence (2)
├── templates.ts # Server templates (4)
├── commands.ts # Application commands (4)
└── onboarding.ts # Onboarding (2)
Contributions are welcome! See CONTRIBUTING.md for development setup, code style, and guidelines.
MIT License. Copyright (c) 2026 QuadsLab.io.
See LICENSE for the full text.
Manage your entire Discord server from Claude Code, Claude Desktop, Cursor, or Windsurf via MCP. 134 admin tools across 20 categories. Interactive setup wizard included.
工具
尚無工具清單。遠端伺服器會在首次健康檢查後取得工具清單。
常見問題
在本頁複製適用於 Cursor、Claude Desktop、Claude Code 或 VS Code 的 stdio 設定。它使用發布者的安裝方式,而不是 PlugMCP 代理伺服器。
這筆記錄未列出必要的環境變數。
Discord 透過 stdio 在本機執行。
上次檢查時間:2026-10-28。 Manage your entire Discord server from Claude Code, Claude Desktop, Cursor, or Windsurf via MCP. 134 admin tools across 20 categories. Interactive setup wizard included.