home / mcp / discord mcp server
MCP server for discord bot
Configuration
View docs{
"mcpServers": {
"hanweg-mcp-discord": {
"command": "npx",
"args": [
"-y",
"@smithery/cli",
"install",
"@hanweg/mcp-discord",
"--client",
"claude"
],
"env": {
"DISCORD_TOKEN": "YOUR_BOT_TOKEN"
}
}
}
}You can run a Discord MCP Server that bridges your Discord workspace with MCP clients, enabling you to manage channels, messages, members, and roles directly from MCP-enabled clients. This server lets you list servers, view channel and member details, send messages, react to content, and perform moderation actions within your Discord environment.
Use this MCP server to connect your Discord workspace to MCP clients. Once configured, you can list available servers, inspect channel details, read message history, send messages to channels, add reactions, and manage member roles. You can also create or delete text channels and moderate messages as needed. Your MCP client can request server information, channel lists, and member roles, and then perform actions such as sending messages or assigning roles based on user interactions.
Prerequisites you need before installation:
- Python 3.8+ or compatible environment with pip available
# Clone the Discord MCP server repository
git clone https://github.com/hanweg/mcp-discord.git
cd mcp-discord
# Create and activate a Python virtual environment
uv venv
# On Windows:
.venv\Scripts\activate
# On macOS/Linux:
source .venv/bin/activate
# If you are on Python 3.13+ and need audio support, install audioop as shown
# (optional, only if you encounter issues related to audio processing)
# uv pip install audioop-lts
# Install the package in editable mode
uv pip install -e .Configure Claude Desktop to run the MCP server via the runtime command. This starts the server from your local path and passes the required bot token for Discord authentication.
"discord": {
"command": "uv",
"args": [
"--directory",
"C:\\PATH\\TO\\mcp-discord",
"run",
"mcp-discord"
],
"env": {
"DISCORD_TOKEN": "your_bot_token"
}
}If you want to install the Discord MCP Server automatically for Claude Desktop using Smithery, run the following command.
npx -y @smithery/cli install @hanweg/mcp-discord --client claudeList available MCP servers connected to the Discord bridge, showing basic server metadata.
Fetch detailed information about a specific MCP server instance.
Retrieve the list of text channels within a server.
List server members and their assigned roles.
Get detailed information about a specific user.
Send a message to a specified channel in Discord.
Read the most recent messages from a channel.
Add a single reaction to a message.
Add multiple reactions to a message in one operation.
Remove a reaction from a message.
Moderate content by deleting messages or timing out users.
Create a new text channel in a Discord server.
Delete an existing text channel.
Assign a role to a user.
Remove a role from a user.