# spranab/discord-mcp [Health: Active]

**Category:** 💬 Communication  
**Repository:** https://github.com/spranab/discord-mcp  
**GitHub Stars:** 0  
**npm Downloads (last month):** 55  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/spranab-discord-mcp

## Description
Run a Discord server from an AI assistant - 30+ actions behind one hierarchical MCP tool.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "discord-mcp": {
    "command": "npx",
    "args": ["-y","@spranab/discord-mcp"],
    "env": {
      "BOT_TOKEN": ""
    }
  }
}
```

**Requires environment variables:** `BOT_TOKEN` — the values above are empty placeholders; fill in real credentials before running (see the repository for what each one is for).

## Documentation

## What spranab/discord-mcp does

spranab/discord-mcp gives an MCP-compatible AI client access to Discord through a configured bot. Rather than publishing a separate MCP tool for every operation, it groups the API surface behind a single `discord` tool. The server provides more than 30 actions across 11 categories:

- Server discovery and details
- Channel creation, editing, deletion, and listing
- Message sending, reading, editing, deletion, bulk deletion, pinning, reactions, and search
- Role creation, editing, deletion, listing, and assignment
- Member lookup, listing, and nickname changes
- Kicks, bans, unbans, timeouts, and ban listing
- Thread creation
- Webhook listing and creation
- Invite creation and listing
- Custom emoji listing
- Audit log access

This is suited to workflows such as finding a channel or member, cleaning up messages, applying moderation, and recording an action for other members.

## How it works

The tool uses hierarchical discovery. Calling `discord()` returns the available categories. Supplying a category shows its actions and expected parameters. Supplying the category, action, and a `params` object performs the requested Discord operation.

For example, an agent can first inspect the `messages` category, then call the `bulk_delete` action with a channel ID and message count. IDs can be obtained through the server's channel and member listing actions. This layout limits the amount of tool schema an MCP client needs to expose before the agent chooses an operation.

The implementation is written in TypeScript and uses discord.js v14, the MCP TypeScript SDK, and Zod for validation.

## Setup and configuration

Create a Discord application in the Developer Portal, create its bot, and copy the bot token. The bot setup requires all three privileged gateway intents: Presence, Server Members, and Message Content. The bot is installed to a guild with the `bot` scope and Administrator permissions.

For an MCP client using an `npx` launch, configure the server with the package `@spranab/discord-mcp` and provide the token as `bot_token`:

```json
{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "@spranab/discord-mcp"],
      "env": { "bot_token": "YOUR_BOT_TOKEN" }
    }
  }
}
```

Alternatively, install the package globally with npm and run `discord-mcp` with `bot_token` set in the environment.

## Tools and capabilities

All operations are dispatched through the `discord` tool. Its categories support:

- Finding servers, channels, and members needed for later actions
- Reading, searching, sending, editing, deleting, pinning, and reacting to messages
- Removing multiple messages in one request
- Managing channels and roles, including assigning roles
- Applying or reversing moderation actions
- Creating threads, webhooks, and invites
- Reviewing bans and the audit log
- Listing custom emojis

The same JSON MCP configuration shape is documented for Claude Code, Cursor, Windsurf, Claude Desktop, and Cline.

## Limitations and notes

The bot must be installed in the target Discord server and have permissions sufficient for the requested operation. Privileged gateway intents must be enabled during bot setup. Administrative actions such as bans, timeouts, role changes, and message removal depend on Discord's permission rules and the bot's position in the server hierarchy.

_Full upstream README: https://allmcps.com/mcp/spranab-discord-mcp/readme_

