home / mcp / discord mcp server

Discord MCP Server

Provides Discord bot automation for Claude, enabling message sending, reading, channel/server queries, and user info through MCP tools.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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 start

Configuration and security

Create 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_here

Claude Desktop integration

Configure 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" }
    }
  }
}

Available tools

send-message

Send a message to a Discord channel by specifying the target channel and the message text.

read-messages

Fetch recent messages from a Discord channel, with options to limit how many messages are returned.

list-channels

List all available channels in the connected Discord servers that the bot can access.

list-servers

List Discord servers (guilds) that the bot has access to.

get-user-info

Retrieve information about a specific user, such as username and discriminator.