home / mcp / discord mcp server
Provides Discord bot automation for Claude, enabling message sending, reading, channel/server queries, and user info through MCP tools.
Configuration
View docs{
"mcpServers": {
"rossh121-discord-mcp": {
"command": "node",
"args": [
"path/to/discord-mcp/build/index.js"
],
"env": {
"DISCORD_TOKEN": "your_discord_bot_token_here"
}
}
}
}This MCP server enables Claude to interact with Discord via programmable actions such as sending messages, reading messages, and managing channel resources. It provides a bridge between Claude’s capabilities and your Discord workspace, allowing automated control through well-defined tools.
You connect to the Discord MCP Server from your MCP client, then choose from the available tools to interact with your Discord servers. You can send messages, read recent messages, list channels or servers, and fetch user information. All actions respect the bot’s permissions in each server, so you’ll see results only where the bot has access.
Prerequisites you need before installing: Node.js 16 or higher, and a Discord bot token with appropriate permissions.
Step-by-step commands you will run on your machine:
# 1. Install dependencies
npm install
# 2. Build the project
npm run build
# 3. Start the server
npm startCreate a configuration file in the root directory to provide your Discord bot token to the server.
Example .env content used by the server:
DISCORD_TOKEN=your_discord_bot_token_hereConfigure Claude Desktop to run the Discord MCP Server as a local process. Add the following to Claude Desktop’s configuration so Claude can invoke the server directly.
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["path/to/discord-mcp/build/index.js"],
"env": { "DISCORD_TOKEN": "your_discord_bot_token_here" }
}
}
}Send a message to a Discord channel by specifying the target channel and the message text.
Fetch recent messages from a Discord channel, with options to limit how many messages are returned.
List all available channels in the connected Discord servers that the bot can access.
List Discord servers (guilds) that the bot has access to.
Retrieve information about a specific user, such as username and discriminator.