Discord Server Setup MCP
Provides tools for automating Discord server setup and management, including the creation and configuration of servers, channels, categories, and roles, as well as applying pre-built templates for gaming, community, business, and study groups.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Discord Server Setup MCP Create a new server for me using the Gaming template"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Discord Server Setup MCP
An MCP (Model Context Protocol) server for automating Discord server setup using the Discord Bot API. This server enables AI assistants like Claude to manage servers, channels, roles, permissions, and apply templates through a Discord bot.
Features
Cross-Platform: Works on Windows, Linux, and macOS
No Discord App Required: Operates via Discord Bot API (headless)
Guild Management: Discover, select, and manage multiple Discord servers
Channel Management: Create, edit, and delete channels and categories with permission overwrites (edits merge overwrites by target so you don't accidentally expose a private channel)
Role Management: Create, edit, delete, list, and reorder roles with semantic hierarchy placement (
top/above/below, or a top-first ordered list) so important roles land where you meanPermission Overwrites: Make channels/categories private, grant specific role access
Server Settings: Configure verification levels, content filters, and notification settings
Pre-built Templates: Apply ready-to-use server templates for common use cases
Fast & Reliable: Direct API calls with proper error handling
Related MCP server: Discord Agent MCP
Pre-built Templates
Template | Description | Roles | Categories | Channels |
Gaming | Comprehensive gaming community with competitive, streaming, and events sections | 10 | 11 | 40+ |
Community | General community server for discussions and social interaction | 6 | 6 | 20+ |
Business | Professional workspace for teams and organizations | 6 | 6 | 18+ |
Study Group | Academic collaboration space for study groups and classes | 5 | 5 | 15+ |
Prerequisites
System Requirements
Node.js 18.0.0 or higher
Discord Bot with appropriate permissions
Discord Bot Setup
Create an application at https://discord.com/developers/applications
Add a bot user and copy the bot token
Privileged Gateway Intents are NOT required. The server only uses the default (non-privileged) Guilds intent, so you can leave all Privileged Gateway Intents off. (Requesting privileged intents that aren't enabled would actually make login fail.)
Generate an OAuth2 invite URL:
Go to OAuth2 → URL Generator
Select scopes:
botandapplications.commandsSelect the permissions the bot needs — Manage Roles, Manage Channels, and Manage Server cover the current tools; Administrator is the simplest catch-all for full server management.
Invite the bot to your Discord server(s) using the generated URL
Important: The bot can only create/move/assign roles below its own highest role in the hierarchy. Make sure the bot's role sits high enough in Server Settings → Roles for the roles you want it to manage.
Installation
Quick Install (One-Liner)
curl -fsSL https://raw.githubusercontent.com/cj-vana/discord-setup-mcp/main/install.sh | bashThis installs to ~/.discord-setup-mcp by default. Set DISCORD_MCP_DIR to customize:
DISCORD_MCP_DIR=/custom/path curl -fsSL https://raw.githubusercontent.com/cj-vana/discord-setup-mcp/main/install.sh | bashManual Install
# Clone the repository
git clone https://github.com/cj-vana/discord-setup-mcp.git
cd discord-setup-mcp
# Install dependencies
npm install
# Build the project
npm run buildConfiguration
Set Bot Token
Option A: Environment Variable
macOS/Linux (temporary - current session only):
export DISCORD_BOT_TOKEN="your-bot-token-here"macOS/Linux (permanent - add to shell profile):
# For zsh (default on macOS)
echo 'export DISCORD_BOT_TOKEN="your-bot-token-here"' >> ~/.zshrc
source ~/.zshrc
# For bash
echo 'export DISCORD_BOT_TOKEN="your-bot-token-here"' >> ~/.bashrc
source ~/.bashrcWindows Command Prompt (temporary):
set DISCORD_BOT_TOKEN=your-bot-token-hereWindows PowerShell (temporary):
$env:DISCORD_BOT_TOKEN = "your-bot-token-here"Windows (permanent - System Environment Variables):
Press
Win + R, typesysdm.cpl, press EnterGo to Advanced tab → Environment Variables
Under "User variables", click New
Variable name:
DISCORD_BOT_TOKENVariable value:
your-bot-token-hereClick OK and restart your terminal
Option B: Configuration File
Create ~/.discord-mcp/config.json:
# Create the directory
mkdir -p ~/.discord-mcp
# Create the config file (replace with your actual token)
cat > ~/.discord-mcp/config.json << 'EOF'
{
"discordToken": "your-bot-token-here",
"defaultGuildId": "optional-default-server-id"
}
EOF
# Secure the file (recommended)
chmod 600 ~/.discord-mcp/config.jsonOn Windows, create %USERPROFILE%\.discord-mcp\config.json with the same JSON content.
Claude Desktop Configuration (Recommended)
The easiest method is to set the token directly in your Claude Desktop config:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"discord-setup": {
"command": "node",
"args": ["/path/to/discord-setup-mcp/dist/index.js"],
"env": {
"DISCORD_BOT_TOKEN": "your-bot-token-here"
}
}
}
}Replace /path/to/discord-setup-mcp with the actual path where you cloned the repository.
Claude Code Configuration
# Add the MCP server
claude mcp add discord-setup-mcp node /path/to/discord-setup-mcp/dist/index.js
# Set the token (if not using config file or system env var)
claude mcp add discord-setup-mcp node /path/to/discord-setup-mcp/dist/index.js -e DISCORD_BOT_TOKEN=your-bot-token-hereSet the token in your environment or use the config file method.
Usage
Basic Workflow
List servers the bot has access to
Select a server to work with
Create channels, roles, or apply templates
Example Commands
List Discord servers
Select the server named "My Server"
Create a text channel called "general-chat"
Create a role called "Moderator" with MANAGE_MESSAGES permission
Make the "admin-chat" category private, only visible to the Admin role
Apply the gaming template to this serverTool Reference
Guild Management
list_guilds
List all servers the bot can access.
select_guild
Set the active server for subsequent operations.
Parameter | Type | Required | Description |
| string | Yes | Guild ID or name to select |
get_guild_info
Get detailed server information including channels, roles, and settings.
Parameter | Type | Required | Description |
| string | No | Guild ID or name (uses current if not specified) |
Channel Management
create_category
Create a channel category with optional permission overwrites.
Parameter | Type | Required | Description |
| string | Yes | Category name (1-100 characters) |
| string | No | Guild ID or name |
| number | No | Position in channel list |
| array | No | Permission overwrites for roles/users |
create_channel
Create a channel (text, voice, announcement, stage, forum).
Parameter | Type | Required | Description |
| string | Yes | Channel name (1-100 characters) |
| string | No | Channel type: |
| string | No | Guild ID or name |
| string | No | Parent category ID |
| string | No | Channel topic (text channels, max 1024 chars) |
| boolean | No | Age-restricted channel (default: false) |
| number | No | Slowmode in seconds (0-21600) |
| number | No | Voice channel bitrate (8000-384000) |
| number | No | Voice channel user limit (0-99, 0=unlimited) |
| number | No | Position in channel list |
| array | No | Permission overwrites for roles/users |
edit_channel
Modify an existing channel's settings and permissions.
Parameter | Type | Required | Description |
| string | Yes | Channel ID to edit |
| string | No | Guild ID or name |
| string | No | New channel name |
| string | No | New channel topic |
| boolean | No | Age-restricted setting |
| number | No | Slowmode in seconds |
| number | No | Voice channel bitrate |
| number | No | Voice channel user limit |
| number | No | New position |
| string | No | Move to category (null to remove) |
| array | No | Replace permission overwrites |
delete_channel
Delete a channel (cannot be undone).
Parameter | Type | Required | Description |
| string | Yes | Channel ID to delete |
| string | No | Guild ID or name |
Role Management
Discord role positions are inverted. A higher position number is higher in the hierarchy and more powerful;
@everyoneis position0at the bottom; and a brand-new role defaults to the bottom. Useplacement/orderedRoleIdsbelow and let the server compute the raw numbers — you rarely need to reason about positions directly. The bot can only place roles below its own highest role.
create_role
Create a role with permissions and optional placement in the hierarchy.
Parameter | Type | Required | Description |
| string | Yes | Role name (1-100 characters) |
| string | No | Guild ID or name |
| string/number | No | Hex color ( |
| boolean | No | Display separately in member list |
| boolean | No | Allow anyone to mention this role |
| array | No | Permission names (SCREAMING_SNAKE_CASE); unknown names are rejected, not silently dropped |
| string | No |
|
| string | No | Role to place above/below (required when |
| number | No | Raw Discord position (advanced; overrides |
edit_role
Modify an existing role.
Parameter | Type | Required | Description |
| string | Yes | Role ID to edit |
| string | No | Guild ID or name |
| string | No | New role name |
| string/number | No | New color |
| boolean | No | Display separately setting |
| boolean | No | Mentionable setting |
| array | No | Replace all permissions |
| number | No | New position in hierarchy |
delete_role
Delete a role (cannot be undone).
Parameter | Type | Required | Description |
| string | Yes | Role ID to delete |
| string | No | Guild ID or name |
list_roles
List roles sorted highest-to-lowest (as they appear in Discord's UI), with each
role's position and whether the bot can manage it, plus botHighestRolePosition.
Call this before reordering or placing roles.
Parameter | Type | Required | Description |
| string | No | Guild ID or name |
reorder_roles
Reorder roles in the hierarchy. Provide exactly one of the inputs below.
Parameter | Type | Required | Description |
| array | No | Role IDs from most important (index 0 = top) to least. Positions computed for you. Preferred. |
| array | No | Advanced: explicit |
| string | No | Guild ID or name |
Server Settings
update_server_settings
Update multiple server settings at once.
set_verification_level
Set member verification level (0-4).
set_content_filter
Set explicit content filter level.
set_default_notifications
Set default notification setting for new members.
Templates
list_templates
List available pre-built templates.
preview_template
View template details before applying.
Parameter | Type | Required | Description |
| string | Yes | Template ID to preview |
apply_template
Apply a template to a server.
Parameter | Type | Required | Description |
| string | Yes | Template ID to apply |
| string | No | Guild ID or name |
Permission Overwrites
Permission overwrites allow you to customize access to channels and categories. Use them to:
Make channels private (deny
@everyoneVIEW_CHANNEL)Grant specific roles access
Restrict certain actions for specific users/roles
Permission Overwrite Format
{
"id": "role-or-user-id",
"type": "role",
"allow": ["VIEW_CHANNEL", "SEND_MESSAGES"],
"deny": ["MANAGE_MESSAGES"]
}Field | Type | Description |
| string | Role ID or User ID |
| string |
|
| array | Permissions to explicitly allow |
| array | Permissions to explicitly deny |
Example: Make a Category Private
{
"channelId": "category-id",
"permissionOverwrites": [
{
"id": "everyone-role-id",
"type": "role",
"deny": ["VIEW_CHANNEL"]
},
{
"id": "admin-role-id",
"type": "role",
"allow": ["VIEW_CHANNEL", "SEND_MESSAGES", "MANAGE_MESSAGES"]
}
]
}Available Permissions
Use these permission names in role permissions and permission overwrites:
General Permissions
Permission | Description |
| Full server access (bypasses all permissions) |
| View channels and read messages |
| Create, edit, delete channels |
| Create, edit, delete roles below bot's role |
| Change server settings |
| View server audit log |
| View server insights |
| Create, edit, delete webhooks |
| Manage emojis and stickers |
| Create invite links |
| Change own nickname |
| Change other members' nicknames |
| Kick members from server |
| Ban members from server |
| Timeout members |
| Create and manage events |
Text Channel Permissions
Permission | Description |
| Send messages in text channels |
| Send text-to-speech messages |
| Delete messages, pin messages |
| Embed links in messages |
| Upload files |
| Read past messages |
| Use @everyone and @here |
| Use emojis from other servers |
| Use stickers from other servers |
| Add reactions to messages |
| Manage and delete threads |
| Create public threads |
| Create private threads |
| Send messages in threads |
| Use slash commands |
Voice Channel Permissions
Permission | Description |
| Connect to voice channels |
| Speak in voice channels |
| Screen share and video |
| Use voice activity detection |
| Be heard over others |
| Mute other members |
| Deafen other members |
| Move members between channels |
| Request to speak in stage channels |
| Use activities |
| Use soundboard |
| Use external sounds |
| Send voice messages |
Examples
Create a Complete Team Server Structure
1. Select my Discord server
2. Create these roles with permissions:
- "Admin" with ADMINISTRATOR
- "Moderator" with MANAGE_MESSAGES, KICK_MEMBERS, MUTE_MEMBERS
- "Member" with VIEW_CHANNEL, SEND_MESSAGES, CONNECT, SPEAK
3. Create these categories, all private to @everyone but visible to Member role:
- "General" with channels: welcome, rules, announcements
- "Discussion" with channels: general-chat, off-topic, help
- "Voice" with voice channels: General Voice, Gaming, AFK
4. Make the "Admin" category only visible to Admin roleSet Up Private Channels
Make the "staff-chat" channel private:
- Deny VIEW_CHANNEL to @everyone
- Allow VIEW_CHANNEL, SEND_MESSAGES, MANAGE_MESSAGES to Moderator role
- Allow VIEW_CHANNEL, SEND_MESSAGES, ADMINISTRATOR to Admin roleConfigure Role Hierarchy
Reorder roles so Admin is highest, then Moderator, then Member, then @everyoneTroubleshooting
Bot Not Connecting
Verify bot token is correct
Check that ALL Privileged Gateway Intents are enabled in Discord Developer Portal
Ensure the bot user is created (not just the application)
Can't Manage Roles/Channels
Ensure bot has Administrator permission
Bot's role must be higher than roles it manages (drag bot role up in server settings)
Verify the bot was invited with correct OAuth2 scopes (
botandapplications.commands)
Permission Errors
Grant the bot Administrator permission for unrestricted access
Bot can only manage roles below its highest role in the hierarchy
Drag the bot's role higher in Server Settings → Roles
Guild Not Found
Confirm bot is in the server
Try using guild ID instead of name
Enable Discord Developer Mode to copy IDs (User Settings → Advanced)
Debug Logging
Verbose per-call tracing is off by default. Set DISCORD_MCP_DEBUG=1 (or true)
in the server's environment to emit debug output to stderr for troubleshooting
permission and API issues.
Security
Never share your bot token - treat it like a password
Use environment variables - don't commit tokens to version control
Regenerate tokens if compromised - reset in Discord Developer Portal
Limit server access - only add the bot to servers you trust
Restrict file permissions -
chmod 600 ~/.discord-mcp/config.json
Architecture
Runtime: Node.js 18+
Language: TypeScript
Discord API: discord.js v14
MCP SDK: @modelcontextprotocol/sdk
Validation: Zod
See CLAUDE.md for development documentation.
Contributing
Contributions are welcome! Please read CONTRIBUTING.md for guidelines.
License
MIT License - see LICENSE file for details.
Acknowledgments
Built with discord.js
Powered by Model Context Protocol
Created for use with Claude
Available Tools
19 toolsapply_templateA
Applies a template to a Discord server, creating all roles, categories, and channels defined in the template. Reports per-item failures and skipped (already-existing) roles; success is false if any element failed to create.
Inputs: templateId (required), guildId, validate, skipRoles, +1 more.
create_categoryB
Creates a new category in a Discord server. Categories organize channels into groups.
Inputs: name (required), guildId, position, permissionOverwrites.
create_channelC
Creates a new channel in a Discord server. Supports text, voice, announcement, stage, and forum channels.
Inputs: name (required), nsfw, type, topic, +7 more.
create_roleA
Creates a role. IMPORTANT: Discord positions are inverted — higher number = higher/more powerful, @everyone = 0 at the bottom, and a new role defaults to the BOTTOM. To make an important role rank high, pass placement:"top" (or "above"/"below" a reference role). Do not rely on raw position numbers unless you know Discord's inverted scheme.
Inputs: name (required), color, hoist, guildId, +5 more.
delete_channelA
Deletes a channel from a Discord server. This action cannot be undone.
Inputs: channelId (required), guildId.
delete_roleA
Deletes a role from a Discord server. This action cannot be undone.
Inputs: roleId (required), guildId.
edit_channelA
Edits an existing channel. permissionOverwrites are MERGED by target by default (overwrites for the given roles/users are added or replaced; overwrites for other targets are left untouched) so you can grant one role access without exposing the channel. Set replaceAllOverwrites:true to replace the entire overwrite set instead.
Inputs: channelId (required), name, nsfw, topic, +8 more.
edit_roleA
Edits a role's name, color, permissions, hoist, mentionable, or position. Note: permissions REPLACE the role's existing permission set. Position uses Discord's inverted scale (higher = more powerful); to reorder relative to other roles, reorder_roles is usually clearer.
Inputs: roleId (required), name, color, hoist, +4 more.
get_guild_infoA
Gets detailed information about a Discord server (guild), including channels, roles (sorted highest-to-lowest with the bot's hierarchy ceiling), and settings. If no guildId is specified, uses the currently selected guild.
Inputs: guildId.
list_guildsA
Lists all Discord servers (guilds) that the bot has access to. Use this to discover available servers before performing operations.
Inputs: no named parameters.
list_rolesA
Lists roles sorted highest-to-lowest in the hierarchy (as they appear in Discord's UI), with each role's position and whether the bot can manage it. Call this before reordering or placing roles so you can reason about the current hierarchy.
Inputs: guildId.
list_templatesB
Lists all available Discord server templates with their basic information.
Inputs: no named parameters.
preview_templateA
Shows detailed information about a specific template including all roles, categories, and channels.
Inputs: templateId (required).
reorder_rolesA
Reorders roles in the hierarchy. Preferred: pass orderedRoleIds as an array of role IDs from MOST important (top) to least important (bottom) — the server computes the raw Discord positions for you. Advanced: pass rolePositions with explicit numeric positions (higher = more powerful). Provide exactly one of the two.
Inputs: guildId, rolePositions, orderedRoleIds.
select_guildA
Sets the active Discord server (guild) for subsequent operations. All tools will use this server unless a different guildId is explicitly specified.
Inputs: guildId (required).
set_content_filterB
Sets the explicit content filter level for the server.
Inputs: level (required), guildId.
set_default_notificationsB
Sets the default notification setting for new members joining the server.
Inputs: setting (required), guildId.
set_verification_levelC
Sets the verification level required for new members to interact with the server.
Inputs: level (required), guildId.
update_server_settingsC
Updates multiple server settings at once. Can modify name, description, verification level, content filter, and default notifications.
Inputs: name, guildId, description, verificationLevel, +2 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 19 tools
Most tools have distinct purposes, but there is some overlap between update_server_settings and individual setters (e.g., set_verification_level), and apply_template might be confused with creating individual items. Overall, an agent can distinguish them with careful reading.
All tool names follow a consistent verb_noun pattern (e.g., create_role, edit_channel, list_guilds) using snake_case. No mixing of styles or vague verbs.
19 tools is well-scoped for a Discord server setup server. Each tool addresses a distinct aspect of server configuration without being excessive.
The set covers core operations like CRUD for channels and roles, guild info, templates, and settings. However, it lacks delete_category and edit_category, leaving category management incomplete. Permission management is embedded in channel and role editing but not exposed as a separate tool.
Maintenance
Related MCP Connectors
Build Discord communities with AI: roles, channels, modules, automations and reviewed announcements.
The AI admin for Discord: manage channels, roles, members, moderation and automations.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
The Canva MCP server connects AI assistants (like Claude, ChatGPT, and Cursor) to Canva's API, enabling them to create and manage designs directly within chat conversations. Key capabilities include generating new designs from prompts, autofilling templates, searching and resizing existing designs, importing files from URLs, exporting designs as PDFs or images, and managing folders and comments without switching between tools.
Related MCP Servers
- AlicenseBqualityDmaintenanceMCP server for macOS Automator that enables AI to control Mac computers by executing AppleScript/JXA, running automation workflows, and performing system-level tasks like sending emails and organizing files.67 npm4MIT
- AlicenseNot gradedqualityBmaintenanceProvides comprehensive Discord bot automation with 71 tools for messaging, channel management, moderation, roles, members, emojis, stickers, scheduled events, auto-moderation, and application commands through AI assistants.19 npm8MIT
- FlicenseBqualityDmaintenanceEnables macOS automation through 45 AppleScript-powered tools for system control, app management, calendar, reminders, notifications, clipboard, and task scheduling.45-
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to manage a Discord server, including creating channels, categories, roles, setting permissions, and assigning roles through natural language commands.-