Discord MCP server
Provides tools for managing Discord servers through a bot account, including listing guilds, channels, roles, messages, users, and members; creating, editing, moving, and deleting channels; sending messages and creating forum posts; managing roles; kicking and banning members; and backing up guild data.
Click on "Install 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 MCP serverPost a message in #announcements that the deployment is complete."
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 MCP server
A local Model Context Protocol server that lets an MCP client inspect and manage Discord through a bot account. It communicates over stdio, so it does not open an HTTP port.
The server uses a Discord bot token. It does not use, and must not be given, a Discord user token.
What it does
Lists guilds, channels, roles, messages, users, and members.
Creates, edits, moves, and deletes channels.
Sends messages and creates forum posts.
Creates, renames, assigns, removes, and deletes roles.
Kicks and bans members.
Can write local JSON snapshots of guild channels and roles for use before destructive changes.
Related MCP server: Discord MCP Server
Safety checks
Every Discord write requires
confirm: trueand a non-emptyreason.Destructive operations require a backup ID unless
allowWithoutBackup: trueis set.DISCORD_GUILD_IDcan restrict requests to one guild.Backups are snapshots only. This project does not restore deleted Discord data.
Requirements
Node.js 20 or newer.
A Discord application with a bot.
An MCP client that can start local
stdioservers.
Setup
Create an application and bot in the Discord Developer Portal.
Copy the bot token. Keep it private and do not commit it.
Invite the bot to your server with the permissions it needs.
Copy the environment template:
Copy-Item .env.example .env.localSet
DISCORD_BOT_TOKENin.env.local. SetDISCORD_GUILD_IDif the bot can access more than one guild.Install dependencies and build the server:
npm install npm run typecheck npm run build
Environment variables
Variable | Required | Description |
| Yes | Token for the Discord bot. |
| No | Guild ID used when a tool call does not provide one. |
| No | Backup folder. Defaults to |
Bot permissions
Start with the smallest set of permissions your workflow needs:
View ChannelsRead Message HistorySend Messages
Add these only when you use the related tools:
Manage ChannelsManage RolesManage MessagesKick MembersBan MembersCreate Public ThreadsSend Messages in Threads
Discord will not let the bot manage roles above its highest role, even when Manage Roles is enabled.
Run the server
Build first, then start the compiled server:
npm startFor development, run the TypeScript entry point directly:
npm run devAn MCP stdio server usually looks idle in the terminal. The MCP client communicates with it through standard input and output.
MCP client configuration
Use the included mcp-client-config.example.json as a starting point. Replace both /path/to/discord-mcp-server values with the absolute path to your checkout.
The resulting configuration looks like this:
{
"mcpServers": {
"discord": {
"command": "node",
"args": [
"/path/to/discord-mcp-server/dist/index.js"
],
"cwd": "/path/to/discord-mcp-server"
}
}
}The MCP client must be able to read .env.local from the configured working directory.
Available tools
Read tools:
discord_list_guildsdiscord_get_guilddiscord_list_channelsdiscord_list_rolesdiscord_get_user_profilediscord_get_member_profilediscord_get_guild_member_avatardiscord_read_messagesdiscord_backup_guild
Messaging tools:
discord_send_messagediscord_delete_messagediscord_create_forum_post
Channel tools:
discord_create_text_channeldiscord_create_voice_channeldiscord_create_forum_channeldiscord_create_announcement_channeldiscord_create_stage_channeldiscord_create_categorydiscord_rename_channeldiscord_update_channeldiscord_move_channeldiscord_delete_channeldiscord_set_channel_permissions
Role tools:
discord_create_rolediscord_rename_rolediscord_delete_rolediscord_assign_rolediscord_remove_role
Moderation tools:
discord_kick_memberdiscord_ban_member
Input rules and options
Guild-scoped tools accept an optional guildId. The server uses DISCORD_GUILD_ID when it is set. Otherwise, guildId is only optional when the bot can access exactly one guild.
All Discord write tools accept:
confirm: must betrue.reason: at least three characters. Discord receives this as the audit-log reason when the API supports one.
Destructive tools also accept:
backupId: the filename returned bydiscord_backup_guildfor the same guild.allowWithoutBackup: set totrueto bypass backup verification.
Other options worth noting:
discord_create_forum_postacceptsautoArchiveDurationMinuteswith one of60,1440,4320, or10080.discord_update_channelacceptsname,topic,nsfw,rateLimitPerUser,bitrate, anduserLimit.discord_move_channelacceptsparentId,position, andlockPermissions.discord_set_channel_permissionsaccepts atargetIdplusallowanddenypermission-name arrays.discord_create_roleacceptscolor,mentionable,hoist, and a list of Discord permission names. New roles have no permissions unless you provide them.discord_ban_memberacceptsdeleteMessageSecondsfrom0to604800.Channel creation tools accept
parentIdwhere Discord supports categories. Text-like channels also accepttopic; voice channels acceptuserLimit.
Tool call examples
Every write needs an explicit confirmation and reason:
{
"confirm": true,
"reason": "Requested by the server owner"
}Destructive calls also need the ID returned by discord_backup_guild:
{
"confirm": true,
"reason": "Removing an unused channel",
"backupId": "2026-06-07T03-12-00-000Z-123456789012345678.json"
}You can intentionally skip backup verification with allowWithoutBackup: true. Use that only when you have another recovery plan.
Development
npm run dev
npm run typecheck
npm run buildBefore opening a pull request, run the type check and build, review the diff, and confirm that no .env, .env.local, backup, or generated dist files are staged.
Project structure
src/index.ts MCP server implementation
.env.example Environment variable template
mcp-client-config.example.json MCP client configuration templateSecurity
Never commit
.envor.env.local.If a token is exposed, revoke it in the Discord Developer Portal and create a new one.
Use a bot token, never a Discord user token.
Keep bot permissions narrow and review them when adding a new tool.
Treat files in
backups/as private. They can contain guild names and IDs, the owner ID, channel names, and role names.
License
MIT. See LICENSE.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
An MCP server that integrates with Discord to provide AI-powered features.
MCP server for Gainium — manage trading bots, deals, and balances via AI assistants
Create, deploy, and operate MCP servers directly from your GitHub repositories.
MCP server for developer documentation, generated by doc2mcp.
Related MCP Servers
- AlicenseBqualityDmaintenanceEnables comprehensive Discord bot management and server operations through MCP, including channel management, message handling, member moderation, role management, and voice operations. Provides secure Discord API integration with built-in permission controls and audit logging capabilities.1910718MIT
- AlicenseBqualityDmaintenanceEnables Discord bot integration through MCP, allowing users to manage servers, channels, roles, members, and messages including moderation actions like bans, timeouts, and bulk deletions through natural language.33MIT
- AlicenseAqualityDmaintenanceMCP server for interacting with Discord via REST API, enabling guild, channel, and message operations using a bot token.7MIT
- AlicenseNot gradedqualityDmaintenanceLets any MCP-compatible AI client interact with Discord — send messages, manage channels, create webhooks, assign roles, and more.301MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Elmopios/Discord-MCP-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server