Discord MCP README

The full upstream README, mirrored for reference. Install config, tool schemas, adoption signals and our own overview live on the Discord MCP listing page.

@spranab/discord-mcp

npm npm downloads license

Moderating a Discord server means clicking: open the server, find the channel, scroll for the message, open the member list, apply the timeout, write the note somewhere. Every Discord MCP server that exposes one tool per operation also costs you thousands of tokens of context before the model reads your question.

This one gives an AI assistant the whole server — 30+ actions across messages, channels, roles, members, moderation, threads, webhooks, invites, emojis and the audit log — behind a single discord tool with three-level discovery, so the model pays for the actions it uses and nothing else.

Install (60 seconds)

Claude Code — add to your .mcp.json:

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

Need a bot token? See Discord Bot Setup below — about two minutes in the Developer Portal.

What it looks like

You: "Someone's spamming #general. Clear the last 20 messages there, time that user out for an hour, and log it for the mods."

Code
→ discord(category: "messages", action: "bulk_delete",
          params: { channel_id: "9876...", count: 20 })
→ discord(category: "moderation", action: "timeout",
          params: { guild_id: "1234...", user_id: "5555...",
                    duration_minutes: 60, reason: "Spam in #general" })
→ discord(category: "messages", action: "send",
          params: { channel_id: "4321...",
                    content: "Timed out spammer (1h), cleared 20 messages in #general" })

The model found bulk_delete and timeout by calling discord() and then discord(category: "moderation") — it never had 30+ tool schemas sitting in its prompt. Channel and user IDs come from channels: list and members: list in the same way.

Features

One discord tool with 11 categories and 30+ actions:

CategoryActionsDescription
serverlist, infoList servers, get server details
channelslist, create, edit, deleteFull channel management
messagessend, read, edit, delete, bulk_delete, pin, react, searchSend, read, moderate messages
roleslist, create, edit, delete, assignRole CRUD + assignment
memberslist, info, nicknameMember listing and management
moderationkick, ban, unban, timeout, list_bansServer moderation
threadscreateThread creation
webhookslist, createWebhook management
invitescreate, listInvite management
emojislistCustom emoji listing
auditlogAudit log access

How It Works

The tool uses 3-level navigation to keep your tool list clean:

Code
discord()                                          → list categories
discord(category="messages")                       → list actions & params
discord(category="messages", action="send", params={...}) → execute

Other clients

Same JSON shape for Cursor, Windsurf, Claude Desktop and Cline:

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

Manual

Terminal
npm install -g @spranab/discord-mcp

Run with bot_token environment variable set:

bash
bot_token=YOUR_BOT_TOKEN discord-mcp

Discord Bot Setup

  1. Go to the Discord Developer Portal
  2. Create a new application
  3. Go to Bot and copy the token
  4. Enable Privileged Gateway Intents (all three):
    • Presence Intent
    • Server Members Intent
    • Message Content Intent
  5. Go to Installation > Default Install Settings > Guild Install
  6. Add the bot scope and select Administrator permissions
  7. Use the install link to add the bot to your server

Tech Stack

Related projects

Other MCP servers and agent infrastructure by the same author:

  • yantrikdb — the Rust engine behind yantrikdb-mcp: temporal decay, contradiction detection and a knowledge graph as an embeddable library.
  • yantrikdb-mcp — persistent cognitive memory for Claude Code, Cursor and Windsurf.
  • yantrikdb-server — yantrikdb as an HTTP gateway and MCP server, with an openraft cluster mode instead of an embedded library.
  • yantrik-memory — persistent cognitive memory for AI agents on the YantrikDB engine, with evolving personality traits and bond progression.
  • langchain-yantrikdb — YantrikDB as a LangChain VectorStore and ChatMessageHistory.
  • yantrikdb-client — typed Python client SDK for YantrikDB over HTTP: remember, recall with retrieval reasons, contradiction handling.
  • yantrikdb-hermes-plugin — YantrikDB memory provider for NousResearch/hermes-agent, with self-tuning ranking and contradiction tracking.
  • openclaw-memory-yantrikdb — OpenClaw memory plugin backed by YantrikDB: conflict-aware session briefings and auto-capture over plain HTTP.
  • saga-mcp — SQLite-backed project tracker so the agent doesn't lose the plan between sessions.
  • brainstorm-mcp — multi-model debate as an MCP tool.
  • truenas-mcp — 278 TrueNAS SCALE actions behind the same one-tool pattern used here.
  • mcpier — self-hosted MCP control plane that keeps API keys off your clients.
  • icantmarket-mcp — browse products and post asks/reviews on icantmarket from any MCP client.
  • swarmcode — real-time channel between Claude Code instances on different machines.
  • tier — adapts a tool list to the model behind it, so small models still pick the right one.
  • chronicler — self-hosted AI roleplay client with memory that survives long campaigns, and native MCP tool support.
  • contextcache — compiles tool schemas into a KV cache once and reuses it across sessions, instead of re-prefilling them on every request.

License

MIT — see LICENSE.