@quadslab.io/discord-mcp 1.4.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -0
- package/README.md +106 -26
- package/dist/cli.js +90 -27
- package/dist/cli.js.map +1 -1
- package/dist/index.js +36 -5
- package/dist/index.js.map +1 -1
- package/dist/tools/channels.js +206 -0
- package/dist/tools/channels.js.map +1 -1
- package/dist/tools/commands.d.ts +6 -0
- package/dist/tools/commands.js +305 -0
- package/dist/tools/commands.js.map +1 -0
- package/dist/tools/dms.d.ts +6 -0
- package/dist/tools/dms.js +197 -0
- package/dist/tools/dms.js.map +1 -0
- package/dist/tools/events.js +44 -0
- package/dist/tools/events.js.map +1 -1
- package/dist/tools/index.js +48 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/members.js +161 -0
- package/dist/tools/members.js.map +1 -1
- package/dist/tools/messages.js +55 -1
- package/dist/tools/messages.js.map +1 -1
- package/dist/tools/onboarding.d.ts +6 -0
- package/dist/tools/onboarding.js +171 -0
- package/dist/tools/onboarding.js.map +1 -0
- package/dist/tools/polls.d.ts +6 -0
- package/dist/tools/polls.js +236 -0
- package/dist/tools/polls.js.map +1 -0
- package/dist/tools/presence.d.ts +6 -0
- package/dist/tools/presence.js +133 -0
- package/dist/tools/presence.js.map +1 -0
- package/dist/tools/roles.js +86 -0
- package/dist/tools/roles.js.map +1 -1
- package/dist/tools/server.js +120 -1
- package/dist/tools/server.js.map +1 -1
- package/dist/tools/templates.d.ts +6 -0
- package/dist/tools/templates.js +154 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/threads.js +122 -1
- package/dist/tools/threads.js.map +1 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [2.0.0] - 2026-02-22
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
|
|
12
|
+
- 35 new tools across 6 new categories and 7 existing categories (99 → 134 total)
|
|
13
|
+
- **Polls** (3 tools): send_poll, get_poll_results, end_poll
|
|
14
|
+
- **Direct Messages** (2 tools): send_dm, send_dm_embed
|
|
15
|
+
- **Bot Presence** (2 tools): set_bot_status, get_bot_info
|
|
16
|
+
- **Server Templates** (4 tools): list_templates, create_template, delete_template, sync_template
|
|
17
|
+
- **Application Commands** (4 tools): list_commands, create_command, edit_command, delete_command
|
|
18
|
+
- **Onboarding** (2 tools): get_onboarding, edit_onboarding
|
|
19
|
+
- **Channels** (+4): check_permissions, copy_channel_permissions, set_voice_status, list_voice_members
|
|
20
|
+
- **Members** (+3): search_members, bulk_ban, purge_user_messages
|
|
21
|
+
- **Messages** (+1): send_message_with_file
|
|
22
|
+
- **Roles** (+2): list_role_members, list_member_permissions
|
|
23
|
+
- **Server Admin** (+3): get_invite, get_server_icon, set_server_icon
|
|
24
|
+
- **Threads** (+3): add_thread_member, remove_thread_member, list_thread_members
|
|
25
|
+
- **Events** (+1): get_event_subscribers
|
|
26
|
+
- Administrator permission option in init wizard — avoids role hierarchy issues
|
|
27
|
+
- Bot self-lockout prevention when making channels private (auto-grants bot access before denying @everyone)
|
|
28
|
+
- Enriched error messages for Discord API errors (Missing Access, Missing Permissions) with actionable hints
|
|
29
|
+
|
|
30
|
+
### Improved
|
|
31
|
+
|
|
32
|
+
- Error handler now detects Discord error codes (50013, 50001, 50035) and returns fix instructions
|
|
33
|
+
- set_channel_permissions automatically preserves bot access when denying @everyone ViewChannel
|
|
34
|
+
|
|
8
35
|
## [1.4.0] - 2026-02-22
|
|
9
36
|
|
|
10
37
|
### Added
|
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](LICENSE)
|
|
5
5
|
[](https://nodejs.org/)
|
|
6
6
|
|
|
7
|
-
**Manage your entire Discord server from Claude Code.**
|
|
7
|
+
**Manage your entire Discord server from Claude Code.** 134 admin tools across 20 categories — roles, channels, members, messages, moderation, forums, stages, webhooks, events, polls, DMs, and more. Just talk to Claude in plain English.
|
|
8
8
|
|
|
9
9
|
Built by [QuadsLab.io](https://quadslab.io) with [Discord.js v14](https://discord.js.org/) and the [MCP SDK](https://github.com/modelcontextprotocol/sdk).
|
|
10
10
|
|
|
@@ -30,7 +30,7 @@ The interactive wizard walks you through everything:
|
|
|
30
30
|
|
|
31
31
|
┌────────────────────────────────────────────────────────┐
|
|
32
32
|
│ Discord MCP Server — Interactive Setup │
|
|
33
|
-
│
|
|
33
|
+
│ 134 admin tools for managing Discord from Claude Code │
|
|
34
34
|
└────────────────────────────────────────────────────────┘
|
|
35
35
|
|
|
36
36
|
● ● ● ○ ○ ○ (3/6)
|
|
@@ -122,6 +122,10 @@ Once connected to Claude Code, just ask in natural language:
|
|
|
122
122
|
- *"Schedule a community event for Friday at 8pm in the Stage channel"*
|
|
123
123
|
- *"Bulk delete the last 50 messages in #bot-testing"*
|
|
124
124
|
- *"Give everyone with the Member role access to #private-channel"*
|
|
125
|
+
- *"Create a poll in #general asking which game to play Friday"*
|
|
126
|
+
- *"DM all moderators about the upcoming server event"*
|
|
127
|
+
- *"Set the bot's status to 'Watching over 500 members'"*
|
|
128
|
+
- *"Show me who's in the Gaming voice channel right now"*
|
|
125
129
|
|
|
126
130
|
Claude automatically resolves channel, role, and member names using fuzzy matching — no need to look up IDs.
|
|
127
131
|
|
|
@@ -129,7 +133,7 @@ Claude automatically resolves channel, role, and member names using fuzzy matchi
|
|
|
129
133
|
|
|
130
134
|
## Features
|
|
131
135
|
|
|
132
|
-
- **
|
|
136
|
+
- **134 tools across 20 categories** — comprehensive Discord server administration without leaving the terminal
|
|
133
137
|
- **Interactive setup wizard** — `npx init` walks you through bot creation, token validation, and config in under a minute
|
|
134
138
|
- **Health check & permission audit** — `npx check` verifies your token, server access, and all 24 required permissions with a visual progress bar
|
|
135
139
|
- **Fuzzy name resolution** — type `"bot testing"`, `"bot-testing"`, or `"bottesting"` and it resolves correctly; no need to look up IDs
|
|
@@ -229,20 +233,26 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
229
233
|
| Category | Tools | Description |
|
|
230
234
|
|----------|------:|-------------|
|
|
231
235
|
| Guild | 2 | Server information and metadata |
|
|
232
|
-
| Roles |
|
|
233
|
-
| Channels |
|
|
234
|
-
| Members |
|
|
235
|
-
| Messages |
|
|
236
|
+
| Roles | 11 | Role creation, editing, permissions, and assignment |
|
|
237
|
+
| Channels | 20 | Channel creation, editing, permissions, and organization |
|
|
238
|
+
| Members | 15 | Member management, moderation, and bulk operations |
|
|
239
|
+
| Messages | 14 | Send, edit, delete, pin, and react to messages |
|
|
236
240
|
| Reactions | 1 | Detailed reaction data with reactor info |
|
|
237
|
-
| Server Admin |
|
|
238
|
-
| Threads |
|
|
241
|
+
| Server Admin | 16 | Server settings, invites, bans, audit log, and integrations |
|
|
242
|
+
| Threads | 10 | Thread creation, archiving, locking, and deletion |
|
|
239
243
|
| Forums | 5 | Forum posts and tag management |
|
|
240
244
|
| Emojis & Stickers | 7 | Custom emoji and sticker management |
|
|
241
245
|
| Webhooks | 4 | Webhook creation, deletion, and messaging |
|
|
242
|
-
| Scheduled Events |
|
|
246
|
+
| Scheduled Events | 5 | Event creation, editing, and deletion |
|
|
243
247
|
| Stage Instances | 3 | Stage channel management |
|
|
244
248
|
| Auto-Moderation | 4 | Automod rule creation, editing, and deletion |
|
|
245
|
-
|
|
|
249
|
+
| Polls | 3 | Create polls, get results, end polls early |
|
|
250
|
+
| Direct Messages | 2 | Send DMs and embed DMs to server members |
|
|
251
|
+
| Bot Presence | 2 | Set bot status/activity, get bot info |
|
|
252
|
+
| Server Templates | 4 | List, create, delete, sync server templates |
|
|
253
|
+
| Application Commands | 4 | Manage slash commands (CRUD) |
|
|
254
|
+
| Onboarding | 2 | Get and edit server onboarding configuration |
|
|
255
|
+
| **Total** | **134** | |
|
|
246
256
|
|
|
247
257
|
---
|
|
248
258
|
|
|
@@ -256,7 +266,7 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
256
266
|
| `list_guilds` | List all servers the bot is a member of |
|
|
257
267
|
| `get_guild_info` | Detailed server info — member count, channels, roles, features, boost tier |
|
|
258
268
|
|
|
259
|
-
### Roles (
|
|
269
|
+
### Roles (11 tools)
|
|
260
270
|
|
|
261
271
|
| Tool | Description |
|
|
262
272
|
|------|-------------|
|
|
@@ -269,8 +279,10 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
269
279
|
| `set_role_icon` | Set a Unicode emoji or image as the role icon (requires boost level 2+) |
|
|
270
280
|
| `assign_role` | Add a role to a member |
|
|
271
281
|
| `remove_role` | Remove a role from a member |
|
|
282
|
+
| `get_role_members` | List all members who have a specific role |
|
|
283
|
+
| `clone_role` | Duplicate a role with all its permissions and settings |
|
|
272
284
|
|
|
273
|
-
### Channels (
|
|
285
|
+
### Channels (20 tools)
|
|
274
286
|
|
|
275
287
|
| Tool | Description |
|
|
276
288
|
|------|-------------|
|
|
@@ -290,8 +302,12 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
290
302
|
| `reorder_channels` | Reorder channels by specifying new positions |
|
|
291
303
|
| `set_voice_region` | Set the RTC region for a voice channel |
|
|
292
304
|
| `follow_announcement_channel` | Follow an announcement channel to cross-post into another channel |
|
|
305
|
+
| `create_stage_channel` | Create a new stage channel |
|
|
306
|
+
| `get_channel_invites` | List all invites for a specific channel |
|
|
307
|
+
| `set_channel_topic` | Set or clear a channel's topic/description |
|
|
308
|
+
| `get_voice_members` | List all members currently in a voice or stage channel |
|
|
293
309
|
|
|
294
|
-
### Members (
|
|
310
|
+
### Members (15 tools)
|
|
295
311
|
|
|
296
312
|
| Tool | Description |
|
|
297
313
|
|------|-------------|
|
|
@@ -307,8 +323,11 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
307
323
|
| `set_nickname` | Change a member's nickname or reset it |
|
|
308
324
|
| `move_to_voice` | Move a member to a different voice channel |
|
|
309
325
|
| `disconnect_from_voice` | Disconnect a member from their voice channel |
|
|
326
|
+
| `get_member_permissions` | Get a member's effective permissions in a specific channel |
|
|
327
|
+
| `search_members` | Search members by username, nickname, or role with advanced filters |
|
|
328
|
+
| `bulk_timeout_members` | Apply a timeout to multiple members at once |
|
|
310
329
|
|
|
311
|
-
### Messages (
|
|
330
|
+
### Messages (14 tools)
|
|
312
331
|
|
|
313
332
|
| Tool | Description |
|
|
314
333
|
|------|-------------|
|
|
@@ -325,6 +344,7 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
325
344
|
| `list_pinned_messages` | Get all pinned messages in a channel |
|
|
326
345
|
| `add_reaction` | Add a reaction from the bot to a message |
|
|
327
346
|
| `remove_reaction` | Remove the bot's reaction from a message |
|
|
347
|
+
| `search_messages` | Search messages in a channel by content, author, or date range |
|
|
328
348
|
|
|
329
349
|
### Reactions (1 tool)
|
|
330
350
|
|
|
@@ -332,7 +352,7 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
332
352
|
|------|-------------|
|
|
333
353
|
| `get_reactions` | Get all reactions on a message with full reactor details — account creation date, server join date, roles, avatar, boost status. Optionally filter by emoji. |
|
|
334
354
|
|
|
335
|
-
### Server Admin (
|
|
355
|
+
### Server Admin (16 tools)
|
|
336
356
|
|
|
337
357
|
| Tool | Description |
|
|
338
358
|
|------|-------------|
|
|
@@ -349,8 +369,11 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
349
369
|
| `get_vanity_url` | Get the server vanity URL (requires VANITY_URL feature) |
|
|
350
370
|
| `list_integrations` | List all integrations (bots, apps) connected to the server |
|
|
351
371
|
| `delete_integration` | Remove an integration from the server |
|
|
372
|
+
| `get_server_preview` | Get the server's public preview information |
|
|
373
|
+
| `set_server_icon` | Set or remove the server icon from a URL |
|
|
374
|
+
| `set_server_banner` | Set or remove the server banner image (requires boost level 2+) |
|
|
352
375
|
|
|
353
|
-
### Threads (
|
|
376
|
+
### Threads (10 tools)
|
|
354
377
|
|
|
355
378
|
| Tool | Description |
|
|
356
379
|
|------|-------------|
|
|
@@ -361,6 +384,9 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
361
384
|
| `delete_thread` | Delete a thread |
|
|
362
385
|
| `lock_thread` | Lock a thread (prevent new messages without archiving) |
|
|
363
386
|
| `unlock_thread` | Unlock a thread |
|
|
387
|
+
| `get_thread_members` | List all members of a thread |
|
|
388
|
+
| `add_thread_member` | Add a member to a thread |
|
|
389
|
+
| `remove_thread_member` | Remove a member from a thread |
|
|
364
390
|
|
|
365
391
|
### Forums (5 tools)
|
|
366
392
|
|
|
@@ -393,7 +419,7 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
393
419
|
| `delete_webhook` | Delete a webhook by ID |
|
|
394
420
|
| `send_webhook_message` | Send a message via webhook with optional name/avatar override |
|
|
395
421
|
|
|
396
|
-
### Scheduled Events (
|
|
422
|
+
### Scheduled Events (5 tools)
|
|
397
423
|
|
|
398
424
|
| Tool | Description |
|
|
399
425
|
|------|-------------|
|
|
@@ -401,6 +427,7 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
401
427
|
| `create_event` | Create a voice, stage, or external event with start/end times |
|
|
402
428
|
| `edit_event` | Modify an event's name, description, times, or status |
|
|
403
429
|
| `delete_event` | Delete a scheduled event |
|
|
430
|
+
| `get_event_users` | List users who have expressed interest in an event |
|
|
404
431
|
|
|
405
432
|
### Stage Instances (3 tools)
|
|
406
433
|
|
|
@@ -419,6 +446,53 @@ When launched via `.mcp.json` (stdin is not a TTY), the server starts automatica
|
|
|
419
446
|
| `edit_automod_rule` | Modify a rule's keywords, actions, exemptions, or enabled state |
|
|
420
447
|
| `delete_automod_rule` | Delete an automod rule |
|
|
421
448
|
|
|
449
|
+
### Polls (3 tools)
|
|
450
|
+
|
|
451
|
+
| Tool | Description |
|
|
452
|
+
|------|-------------|
|
|
453
|
+
| `create_poll` | Create a poll in a channel with multiple choice options and duration |
|
|
454
|
+
| `get_poll_results` | Get the current results and vote counts for a poll |
|
|
455
|
+
| `end_poll` | End a poll early and finalize the results |
|
|
456
|
+
|
|
457
|
+
### Direct Messages (2 tools)
|
|
458
|
+
|
|
459
|
+
| Tool | Description |
|
|
460
|
+
|------|-------------|
|
|
461
|
+
| `send_dm` | Send a direct message to a server member |
|
|
462
|
+
| `send_dm_embed` | Send a rich embed as a direct message to a server member |
|
|
463
|
+
|
|
464
|
+
### Bot Presence (2 tools)
|
|
465
|
+
|
|
466
|
+
| Tool | Description |
|
|
467
|
+
|------|-------------|
|
|
468
|
+
| `set_bot_presence` | Set the bot's status and activity (playing, watching, listening, etc.) |
|
|
469
|
+
| `get_bot_info` | Get the bot's current user info, status, and connection details |
|
|
470
|
+
|
|
471
|
+
### Server Templates (4 tools)
|
|
472
|
+
|
|
473
|
+
| Tool | Description |
|
|
474
|
+
|------|-------------|
|
|
475
|
+
| `list_templates` | List all templates for the server |
|
|
476
|
+
| `create_template` | Create a new server template from the current server configuration |
|
|
477
|
+
| `delete_template` | Delete a server template by code |
|
|
478
|
+
| `sync_template` | Sync a server template with the current server state |
|
|
479
|
+
|
|
480
|
+
### Application Commands (4 tools)
|
|
481
|
+
|
|
482
|
+
| Tool | Description |
|
|
483
|
+
|------|-------------|
|
|
484
|
+
| `list_commands` | List all registered application (slash) commands |
|
|
485
|
+
| `create_command` | Register a new slash command with name, description, and options |
|
|
486
|
+
| `edit_command` | Modify an existing slash command |
|
|
487
|
+
| `delete_command` | Remove a registered slash command |
|
|
488
|
+
|
|
489
|
+
### Onboarding (2 tools)
|
|
490
|
+
|
|
491
|
+
| Tool | Description |
|
|
492
|
+
|------|-------------|
|
|
493
|
+
| `get_onboarding` | Get the server's onboarding configuration and prompts |
|
|
494
|
+
| `edit_onboarding` | Edit the server onboarding settings, prompts, and default channels |
|
|
495
|
+
|
|
422
496
|
</details>
|
|
423
497
|
|
|
424
498
|
---
|
|
@@ -558,19 +632,25 @@ If you ran `init` from Desktop or Downloads, update to v1.2.3+ which auto-detect
|
|
|
558
632
|
├── index.ts # Tool registry — routes calls to category handlers
|
|
559
633
|
├── utils.ts # Fuzzy matching for channels, roles, members
|
|
560
634
|
├── guild.ts # Server info (2)
|
|
561
|
-
├── roles.ts # Role management (
|
|
562
|
-
├── channels.ts # Channel management (
|
|
563
|
-
├── members.ts # Member management (
|
|
564
|
-
├── messages.ts # Messaging (
|
|
635
|
+
├── roles.ts # Role management (11)
|
|
636
|
+
├── channels.ts # Channel management (20)
|
|
637
|
+
├── members.ts # Member management (15)
|
|
638
|
+
├── messages.ts # Messaging (14)
|
|
565
639
|
├── reactions.ts # Reactions (1)
|
|
566
|
-
├── server.ts # Server admin (
|
|
567
|
-
├── threads.ts # Thread management (
|
|
640
|
+
├── server.ts # Server admin (16)
|
|
641
|
+
├── threads.ts # Thread management (10)
|
|
568
642
|
├── forums.ts # Forum channels (5)
|
|
569
643
|
├── emojis.ts # Emoji & stickers (7)
|
|
570
644
|
├── webhooks.ts # Webhooks (4)
|
|
571
|
-
├── events.ts # Scheduled events (
|
|
645
|
+
├── events.ts # Scheduled events (5)
|
|
572
646
|
├── stage.ts # Stage instances (3)
|
|
573
|
-
|
|
647
|
+
├── automod.ts # Auto-moderation (4)
|
|
648
|
+
├── polls.ts # Polls (3)
|
|
649
|
+
├── dms.ts # Direct messages (2)
|
|
650
|
+
├── presence.ts # Bot presence (2)
|
|
651
|
+
├── templates.ts # Server templates (4)
|
|
652
|
+
├── commands.ts # Application commands (4)
|
|
653
|
+
└── onboarding.ts # Onboarding (2)
|
|
574
654
|
```
|
|
575
655
|
|
|
576
656
|
---
|
package/dist/cli.js
CHANGED
|
@@ -44,15 +44,28 @@ const out = (...args) => process.stderr.write(args.join(''));
|
|
|
44
44
|
const ln = (...args) => process.stderr.write(args.join('') + '\n');
|
|
45
45
|
// ── Brand Art ────────────────────────────────────────────────────────
|
|
46
46
|
const LOGO = `
|
|
47
|
-
${c.cyanBright}${c.bold}
|
|
48
|
-
${c.cyanBright}${c.bold}
|
|
49
|
-
${c.cyan}
|
|
50
|
-
${c.cyan}
|
|
51
|
-
${c.magenta}
|
|
52
|
-
${c.
|
|
47
|
+
${c.cyanBright}${c.bold} ██████╗ ██╗ ██╗ █████╗ ██████╗ ███████╗${c.reset}
|
|
48
|
+
${c.cyanBright}${c.bold} ██╔═══██╗██║ ██║██╔══██╗██╔══██╗██╔════╝${c.reset}
|
|
49
|
+
${c.cyan} ██║ ██║██║ ██║███████║██║ ██║███████╗${c.reset}
|
|
50
|
+
${c.cyan} ██║▄▄ ██║██║ ██║██╔══██║██║ ██║╚════██║${c.reset}
|
|
51
|
+
${c.magenta} ╚██████╔╝╚██████╔╝██║ ██║██████╔╝███████║${c.reset}
|
|
52
|
+
${c.magenta} ╚══▀▀═╝ ╚═════╝ ╚═╝ ╚═╝╚═════╝ ╚══════╝${c.reset}
|
|
53
|
+
${c.magentaBright}${c.bold} L A B ${c.dim}.io${c.reset}
|
|
53
54
|
`;
|
|
54
55
|
const LOGO_MINI = `${c.cyanBright}${c.bold}QuadsLab${c.magentaBright}.io${c.reset}`;
|
|
55
56
|
const DISCORD_MCP_BADGE = `${c.gray}[${c.reset}${c.blueBright}discord-mcp${c.reset}${c.gray}]${c.reset}`;
|
|
57
|
+
// ── Footer Links ────────────────────────────────────────────────────
|
|
58
|
+
function printFooter() {
|
|
59
|
+
divider();
|
|
60
|
+
ln('');
|
|
61
|
+
ln(` ${c.dim}Web${c.reset} ${c.underline}${c.blueBright}https://QuadsLab.io${c.reset}`);
|
|
62
|
+
ln(` ${c.dim}Discord${c.reset} ${c.underline}${c.blueBright}https://discord.gg/sjnb8wWGCJ${c.reset}`);
|
|
63
|
+
ln(` ${c.dim}GitHub${c.reset} ${c.underline}${c.blueBright}https://github.com/HardHeadHackerHead/discord-mcp${c.reset}`);
|
|
64
|
+
ln(` ${c.dim}npm${c.reset} ${c.underline}${c.blueBright}https://www.npmjs.com/package/@quadslab.io/discord-mcp${c.reset}`);
|
|
65
|
+
ln('');
|
|
66
|
+
ln(` ${c.dim}Made with ♥ by${c.reset} ${LOGO_MINI}`);
|
|
67
|
+
ln('');
|
|
68
|
+
}
|
|
56
69
|
// ── UI Components ────────────────────────────────────────────────────
|
|
57
70
|
function box(lines, borderColor = c.gray) {
|
|
58
71
|
const stripped = lines.map(l => l.replace(/\x1b\[[0-9;]*m/g, ''));
|
|
@@ -68,9 +81,15 @@ function box(lines, borderColor = c.gray) {
|
|
|
68
81
|
function divider() {
|
|
69
82
|
ln(`${c.gray} ${'─'.repeat(52)}${c.reset}`);
|
|
70
83
|
}
|
|
84
|
+
function clearScreen() {
|
|
85
|
+
if (isColorSupported) {
|
|
86
|
+
out('\x1b[2J\x1b[H'); // Clear screen and move cursor to top-left
|
|
87
|
+
}
|
|
88
|
+
}
|
|
71
89
|
function stepHeader(current, total, title) {
|
|
90
|
+
clearScreen();
|
|
91
|
+
// Persistent header: brand + progress bar
|
|
72
92
|
ln('');
|
|
73
|
-
// Progress dots
|
|
74
93
|
const dots = Array.from({ length: total }, (_, i) => {
|
|
75
94
|
if (i < current - 1)
|
|
76
95
|
return `${c.greenBright}●${c.reset}`;
|
|
@@ -78,7 +97,9 @@ function stepHeader(current, total, title) {
|
|
|
78
97
|
return `${c.cyanBright}●${c.reset}`;
|
|
79
98
|
return `${c.gray}○${c.reset}`;
|
|
80
99
|
}).join(' ');
|
|
81
|
-
ln(` ${dots} ${c.gray}(${current}/${total})${c.reset}`);
|
|
100
|
+
ln(` ${LOGO_MINI} ${DISCORD_MCP_BADGE} ${dots} ${c.gray}(${current}/${total})${c.reset}`);
|
|
101
|
+
divider();
|
|
102
|
+
ln('');
|
|
82
103
|
ln(` ${c.bold}${c.whiteBright}${title}${c.reset}`);
|
|
83
104
|
ln('');
|
|
84
105
|
}
|
|
@@ -256,19 +277,29 @@ async function runInit() {
|
|
|
256
277
|
const rl = createRL();
|
|
257
278
|
const TOTAL_STEPS = 6;
|
|
258
279
|
try {
|
|
259
|
-
// ── Welcome ──
|
|
280
|
+
// ── Welcome + Step 1 on the same screen ──
|
|
281
|
+
clearScreen();
|
|
260
282
|
ln(LOGO);
|
|
261
|
-
ln('');
|
|
262
283
|
out(' ');
|
|
263
284
|
await typewrite(`${c.bold}${c.whiteBright}Discord MCP Server${c.reset}`, 30);
|
|
264
285
|
await typewrite(` ${c.gray}—${c.reset} `, 40);
|
|
265
286
|
await typewrite(`${c.dim}Interactive Setup Wizard${c.reset}`, 20);
|
|
266
287
|
ln('');
|
|
267
|
-
ln(` ${c.dim}
|
|
288
|
+
ln(` ${c.dim}134 admin tools across 20 categories${c.reset}`);
|
|
289
|
+
ln(` ${c.dim}Manage your entire Discord server from any MCP client${c.reset}`);
|
|
290
|
+
ln('');
|
|
291
|
+
divider();
|
|
292
|
+
ln('');
|
|
293
|
+
ln(` ${c.dim}Web${c.reset} ${c.underline}${c.blueBright}https://QuadsLab.io${c.reset}`);
|
|
294
|
+
ln(` ${c.dim}Discord${c.reset} ${c.underline}${c.blueBright}https://discord.gg/sjnb8wWGCJ${c.reset}`);
|
|
295
|
+
ln('');
|
|
296
|
+
divider();
|
|
297
|
+
ln('');
|
|
298
|
+
// Step 1 question lives on the welcome screen — no clear
|
|
299
|
+
const step1Dots = Array.from({ length: TOTAL_STEPS }, (_, i) => i === 0 ? `${c.cyanBright}●${c.reset}` : `${c.gray}○${c.reset}`).join(' ');
|
|
300
|
+
ln(` ${step1Dots} ${c.gray}(1/${TOTAL_STEPS})${c.reset}`);
|
|
301
|
+
ln(` ${c.bold}${c.whiteBright}Discord Bot Token${c.reset}`);
|
|
268
302
|
ln('');
|
|
269
|
-
await sleep(300);
|
|
270
|
-
// ── Step 1: Bot token ──
|
|
271
|
-
stepHeader(1, TOTAL_STEPS, 'Discord Bot Token');
|
|
272
303
|
const hasBot = await promptConfirm(rl, 'Do you already have a Discord bot?', false);
|
|
273
304
|
if (!hasBot) {
|
|
274
305
|
ln('');
|
|
@@ -377,7 +408,35 @@ async function runInit() {
|
|
|
377
408
|
// ── Step 4: Invite bot ──
|
|
378
409
|
await sleep(200);
|
|
379
410
|
stepHeader(4, TOTAL_STEPS, 'Invite Bot to Server');
|
|
380
|
-
|
|
411
|
+
// Ask for permission level
|
|
412
|
+
box([
|
|
413
|
+
`${c.bold}Bot Permission Level${c.reset}`,
|
|
414
|
+
``,
|
|
415
|
+
`${c.cyanBright}Administrator${c.reset} gives the bot full access.`,
|
|
416
|
+
`No role hierarchy issues, no missing permissions.`,
|
|
417
|
+
``,
|
|
418
|
+
`${c.cyanBright}Granular${c.reset} gives only the 24 specific permissions`,
|
|
419
|
+
`the tools need. More restrictive but may hit role`,
|
|
420
|
+
`hierarchy issues if the bot's role isn't high enough.`,
|
|
421
|
+
], c.blue);
|
|
422
|
+
ln('');
|
|
423
|
+
const permItems = [
|
|
424
|
+
`${c.bold}Administrator${c.reset} ${c.dim}(Recommended — avoids permission issues)${c.reset}`,
|
|
425
|
+
`${c.bold}Granular${c.reset} ${c.dim}(24 specific permissions only)${c.reset}`,
|
|
426
|
+
];
|
|
427
|
+
const permChoice = await promptSelect(rl, permItems, 'Permission level:');
|
|
428
|
+
const ADMIN_PERMISSION = PermissionFlagsBits.Administrator;
|
|
429
|
+
const useAdmin = permChoice !== 1;
|
|
430
|
+
const permissionInt = useAdmin ? ADMIN_PERMISSION : PERMISSION_INTEGER;
|
|
431
|
+
if (useAdmin) {
|
|
432
|
+
success('Using Administrator permissions');
|
|
433
|
+
}
|
|
434
|
+
else {
|
|
435
|
+
success('Using granular permissions');
|
|
436
|
+
info('Tip: Make sure the bot\'s role is near the top in Server Settings > Roles');
|
|
437
|
+
}
|
|
438
|
+
ln('');
|
|
439
|
+
const inviteUrl = `https://discord.com/oauth2/authorize?client_id=${appId}&scope=bot+applications.commands&permissions=${permissionInt}`;
|
|
381
440
|
if (guilds.length === 0) {
|
|
382
441
|
warn('Bot is not in any servers yet.');
|
|
383
442
|
ln('');
|
|
@@ -401,7 +460,13 @@ async function runInit() {
|
|
|
401
460
|
else {
|
|
402
461
|
success(`Bot is in ${guilds.length} server${guilds.length > 1 ? 's' : ''}`);
|
|
403
462
|
ln('');
|
|
404
|
-
|
|
463
|
+
if (useAdmin) {
|
|
464
|
+
info('If the bot was previously invited without Administrator,');
|
|
465
|
+
info('re-invite with this URL to upgrade permissions:');
|
|
466
|
+
}
|
|
467
|
+
else {
|
|
468
|
+
info('Invite URL (for adding to more servers):');
|
|
469
|
+
}
|
|
405
470
|
link(inviteUrl);
|
|
406
471
|
}
|
|
407
472
|
// ── Step 5: Select guild ──
|
|
@@ -636,9 +701,13 @@ async function runInit() {
|
|
|
636
701
|
], c.blue);
|
|
637
702
|
}
|
|
638
703
|
// ── Done ──
|
|
704
|
+
await sleep(300);
|
|
705
|
+
clearScreen();
|
|
706
|
+
// Persistent header — all dots green
|
|
639
707
|
ln('');
|
|
708
|
+
const doneDots = Array.from({ length: TOTAL_STEPS }, () => `${c.greenBright}●${c.reset}`).join(' ');
|
|
709
|
+
ln(` ${LOGO_MINI} ${DISCORD_MCP_BADGE} ${doneDots} ${c.greenBright}Done${c.reset}`);
|
|
640
710
|
divider();
|
|
641
|
-
await sleep(300);
|
|
642
711
|
ln('');
|
|
643
712
|
// Animated completion banner
|
|
644
713
|
out(' ');
|
|
@@ -685,11 +754,9 @@ async function runInit() {
|
|
|
685
754
|
nextSteps.push(`${c.dim}Try asking:${c.reset} ${c.italic}"List all channels in my Discord server"${c.reset}`);
|
|
686
755
|
box(nextSteps, c.green);
|
|
687
756
|
ln('');
|
|
688
|
-
ln(` ${c.gray}Docs${c.reset} ${c.underline}${c.blueBright}https://github.com/HardHeadHackerHead/discord-mcp${c.reset}`);
|
|
689
757
|
ln(` ${c.gray}Help${c.reset} ${c.bold}npx @quadslab.io/discord-mcp check${c.reset}`);
|
|
690
758
|
ln('');
|
|
691
|
-
|
|
692
|
-
ln('');
|
|
759
|
+
printFooter();
|
|
693
760
|
}
|
|
694
761
|
finally {
|
|
695
762
|
rl.close();
|
|
@@ -820,8 +887,8 @@ function printVersion() {
|
|
|
820
887
|
// ── Help Command ─────────────────────────────────────────────────────
|
|
821
888
|
function printHelp() {
|
|
822
889
|
ln(LOGO);
|
|
823
|
-
ln(` ${c.bold}Discord MCP Server${c.reset} ${c.dim}— Manage Discord from
|
|
824
|
-
ln(` ${c.dim}
|
|
890
|
+
ln(` ${c.bold}Discord MCP Server${c.reset} ${c.dim}— Manage Discord from any MCP client${c.reset}`);
|
|
891
|
+
ln(` ${c.dim}134 tools across 20 categories${c.reset}`);
|
|
825
892
|
ln('');
|
|
826
893
|
divider();
|
|
827
894
|
ln('');
|
|
@@ -851,11 +918,7 @@ function printHelp() {
|
|
|
851
918
|
ln('');
|
|
852
919
|
divider();
|
|
853
920
|
ln('');
|
|
854
|
-
|
|
855
|
-
ln(` ${c.dim}npm${c.reset} ${c.underline}${c.blueBright}https://www.npmjs.com/package/@quadslab.io/discord-mcp${c.reset}`);
|
|
856
|
-
ln('');
|
|
857
|
-
ln(` ${c.dim}Made with ♥ by${c.reset} ${LOGO_MINI}`);
|
|
858
|
-
ln('');
|
|
921
|
+
printFooter();
|
|
859
922
|
}
|
|
860
923
|
// ── Start Command ────────────────────────────────────────────────────
|
|
861
924
|
async function runStart() {
|