discord-mcp
Provides tools for managing Discord servers, including channels, categories, roles, webhooks, messages, moderation, voice channels, scheduled events, forums, emojis, invites, and permissions.
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-mcplist all channels in the server"
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
A Model Context Protocol (MCP) server for managing Discord servers. Connect it to an MCP client (Claude Code, Claude Desktop, etc.) and the assistant can create and manage channels, categories, roles, webhooks, messages, moderation, voice channels, scheduled events, forums, emojis, invites, and permissions — 73 tools in all — by calling a bot.
Built in TypeScript with discord.js v14 and the official MCP SDK. Speaks MCP over stdio.
Setup
1. Create the bot
Go to the Discord Developer Portal → New Application.
Open Bot → Reset Token → copy the token. This is your
DISCORD_TOKEN.Still under Bot, scroll to Privileged Gateway Intents and enable:
Server Members Intent
Message Content Intent
(Both are required — the server requests these intents at startup and Discord will reject the connection if they aren't toggled on.)
2. Invite the bot to your server
OAuth2 → URL Generator.
Scopes:
botandapplications.commands.Bot Permissions: Administrator (simplest), or the granular set you need (Manage Channels, Manage Roles, Manage Webhooks, Kick/Ban Members, Moderate Members, Manage Events, Manage Emojis and Stickers, Send Messages, etc.).
Open the generated URL in a browser and add the bot to your server.
3. (Optional) Get your guild ID
Setting a default guild makes guildId optional on guild-scoped tools:
Discord → User Settings → Advanced → Developer Mode (on).
Right-click your server icon → Copy Server ID.
Use it as
DISCORD_GUILD_ID.
4. Install and build
git clone https://github.com/Arizona-dev/discord-mcp.git
cd discord-mcp
npm install
npm run buildRelated MCP server: discord-mcp
Connecting to an MCP client
Add to your client's MCP config (e.g. .mcp.json for Claude Code):
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["/absolute/path/to/discord-mcp/dist/index.js"],
"env": {
"DISCORD_TOKEN": "your-bot-token",
"DISCORD_GUILD_ID": "your-default-guild-id"
}
}
}
}Environment variables
Variable | Required | Description |
| yes | Bot token from the Developer Portal. |
| no | Default guild; makes |
Tools
Server info
Tool | Description |
| Retrieve server metadata (name, owner, member count, …). |
Users & DMs
Tool | Description |
| Look up a user ID by username for mentions. |
| Send a direct message to a user. |
| Edit a DM the bot sent. |
| Delete a DM the bot sent. |
| Read DM history with attachments. |
Messages
Tool | Description |
| Post a message to a channel. |
| Edit a channel message. |
| Delete a channel message. |
| Read channel history with attachments. |
| Add an emoji reaction to a message. |
| Remove the bot's emoji reaction. |
Channels
Tool | Description |
| Create a text channel. |
| Edit a text channel (name, topic, nsfw, slowmode, category, position). |
| Delete a channel. |
| Find channels by name. |
| List all channels. |
| Get detailed channel info. |
| Move a channel to a category / position. |
Categories
Tool | Description |
| Create a channel category. |
| Rename / reorder a category. |
| Delete a category. |
| Find a category by name. |
| List channels in a category. |
Webhooks
Tool | Description |
| Create a webhook in a channel. |
| Delete a webhook. |
| List a channel's webhooks. |
| Post a message via a webhook. |
Roles
Tool | Description |
| List all roles. |
| Create a role. |
| Edit a role. |
| Delete a role. |
| Assign a role to a member. |
| Remove a role from a member. |
Moderation
Tool | Description |
| Kick a member. |
| Ban a user. |
| Unban a user. |
| Time out (mute) a member. |
| Lift a timeout. |
| Set a member's nickname. |
| List banned users. |
Voice & stage
Tool | Description |
| Create a voice channel. |
| Create a stage channel. |
| Edit voice settings (name, bitrate, user limit, region). |
| Move a member between voice channels. |
| Disconnect a member from voice. |
| Server mute / deafen a member. |
Scheduled events
Tool | Description |
| Schedule a server event. |
| Edit an event or change its status. |
| Cancel an event. |
| List events. |
| List event attendees. |
Channel permissions
Tool | Description |
| List a channel's permission overwrites. |
| Create / update a role's channel permissions. |
| Create / update a member's channel permissions. |
| Remove a permission overwrite. |
Invites
Tool | Description |
| Create an invite link. |
| List active invites. |
| Revoke an invite. |
| Inspect an invite by code. |
Forums
Tool | Description |
| Create a forum channel. |
| Edit a forum channel. |
| List forum channels. |
| Get forum channel info. |
| List a forum's available tags. |
| Start a forum post (thread). |
| List active forum posts. |
| Lock / archive / pin / tag a forum post. |
Emojis
Tool | Description |
| List custom emojis. |
| Inspect a custom emoji. |
| Create a custom emoji (URL or base64, ≤256KB). |
| Rename / restrict an emoji. |
| Delete an emoji. |
Development
npm run typecheck # tsc --noEmit
npm test # vitest unit tests (mocked discord.js client)
npm run build # compile to dist/
npm run dev # run from source via tsxUnit tests cover the pure layer (config, result formatting, error mapping,
guild resolution, the defineTool wrapper) and exercise a representative tool
in every module against a mocked discord.js client. Live end-to-end behavior
requires a real bot token + guild and is not run in CI — use the manual
smoke-test checklist below.
Manual smoke test
With a real DISCORD_TOKEN and a test guild, connect the server to your MCP
client and confirm each reflects in the Discord UI:
get_server_info— returns your server's name and member count.create_category→create_text_channel(with thatcategoryId).list_channels— shows the new channel under the category.send_messageto the new channel.delete_channelthendelete_category— both disappear from the sidebar.
Architecture
src/config.ts— env loading.src/client.ts— discord.js Client (intents + partials) and login.src/lib/—tool.ts(defineToolwrapper that turns thrown errors into clean error results),format.ts(ok/fail),errors.ts(Discord error mapping),guild.ts(guild resolution),context.ts(shared tool context).src/tools/*.ts— one module per domain; each default-exports(ctx) => Tool[].index.tsaggregates them into a flat registry.src/server.ts— builds the MCP server and registers every tool.src/index.ts— entrypoint: load config → log in → serve over stdio.
Adding a tool is one defineTool({...}) object in the relevant domain module.
License
MIT © Farid Naderi
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.
Latest Blog Posts
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/Arizona-dev/discord-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server