home / mcp / discord mcp server
Provides end-to-end MCP operations for Discord: messages, moderation, channels, events, polls, webhooks, and more.
Configuration
View docs{
"mcpServers": {
"glittercowboy-discord-mcp": {
"command": "uv",
"args": [
"--directory",
"/path/to/discord-mcp",
"run",
"python",
"-m",
"src.server"
],
"env": {
"DISCORD_GUILD_ID": "YOUR_SERVER_ID",
"DISCORD_BOT_TOKEN": "YOUR_BOT_TOKEN"
}
}
}
}You deploy a single MCP server that gives you full administrative control over Discord communities, enabling an external assistant to perform messages, moderation, channel management, events, polls, and more through a consistent set of operations.
Use an MCP client to interact with your Discord MCP Server. Browse available operations, inspect parameter schemas, and execute actions such as sending messages, moderating members, creating channels, managing events, and handling webhooks. The system exposes structured operations organized by category, so you can discover the exact actions you want to perform and provide the required parameters.
Prerequisites you need to prepare before running the MCP server.
1. Ensure you have Python 3.12 or newer installed on your machine.
2. Install the uv package manager.
3. Have a Discord account and a Discord server where you have admin permissions.
4. Clone the MCP server repository and navigate into it.
5. Install dependencies using the provided runtime command.
You configure the MCP server with two primary values: your bot token and the server (guild) ID. The following example shows the runtime setup for Claude to run the MCP server locally.
{
"mcpServers": {
"discord": {
"command": "uv",
"args": ["--directory", "/path/to/discord-mcp", "run", "python", "-m", "src.server"],
"env": {
"DISCORD_BOT_TOKEN": "your-bot-token-here",
"DISCORD_GUILD_ID": "your-server-id-here"
}
}
}
}The following environment variables are used to connect Claude to your Discord server.
- DISCORD_BOT_TOKEN: The bot token you obtain from the Discord Developer Portal.
- DISCORD_GUILD_ID: The numeric ID of your Discord server.
After configuring, restart Claude and verify that the MCP server is reachable by requesting available Discord operations, listing channels, and performing a simple test message.
You can perform a wide range of actions, such as sending messages, managing roles, creating channels, and handling events. Access the operation discovery tool to see all available endpoints and then execute specific operations with the required parameters.
- Never expose your bot token. Store it securely as an environment variable.
- Grant the minimal permissions your bot needs to function.
- Ensure privileged intents are enabled only if necessary for your use case.
- If you see authentication errors, regenerate the bot token and update the environment variable.
- If the bot appears offline, verify the MCP server is running and Claude can reach it.
- If you cannot read message content, enable the Message Content Intent and ensure it has access in your server.
Send a message, create a poll, timeout a member, or start a scheduled event using the available operations.
The MCP server bridges Claude with Discord through a defined set of operations. All commands must respect Discord's permissions hierarchy and channel-specific permission overrides.
Send a message to a specified channel with content and optional embeds, attachments, or mentions.
Read messages from a channel, including content when permitted by intents.
Edit a previously sent message by channel/message ID with new content or embeds.
Delete a message by channel/message ID.
Pin or unpin a message in a channel.
Add a reaction to a specific message.
Remove a reaction from a message.
List all reactions on a message.
Kick a member from the server.
Ban a member from the server.
Timeout a member for a specified duration with an audit log.
Create a new channel with given type and permissions.
Edit channel properties and permission overwrites.
Delete a channel.
Create threads or forum posts within a channel.
Create a new role with specified permissions.
Edit an existing role’s name, color, and permissions.
Delete a role.
List server members with optional filters.
Edit member attributes and assign roles.
Create an invitation link for a channel or server.
List active invites for the server.
Create a scheduled event with details and location.
Create a multi-option poll in a channel.
Create a webhook and send messages through it.
Send a message via an existing webhook.
Configure auto-moderation rules for content handling.
Move a member between voice channels.
Disconnect a member from a voice channel.
Add a custom emoji to the server.
Add a new sticker to the server.
Create and manage forum posts and tags.
Start a stage channel instance.
Run onboarding flows for new members.