spranab

@spranab/discord-mcp

Community spranab
Updated

Run a Discord server from an AI assistant — 30+ actions across messages, channels, roles, members, moderation, threads, webhooks, invites and the audit log, behind one hierarchical MCP tool with tiered discovery.

@spranab/discord-mcp

npmnpm downloads

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

This one gives an AI assistant the whole server — 30+ actions across messages,channels, roles, members, moderation, threads, webhooks, invites, emojis andthe 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:

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

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

What it looks like

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

→ 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 thendiscord(category: "moderation") — it never had 30+ tool schemas sitting inits prompt. Channel and user IDs come from channels: list andmembers: list in the same way.

Features

One discord tool with 11 categories and 30+ actions:

Category Actions Description
server list, info List servers, get server details
channels list, create, edit, delete Full channel management
messages send, read, edit, delete, bulk_delete, pin, react, search Send, read, moderate messages
roles list, create, edit, delete, assign Role CRUD + assignment
members list, info, nickname Member listing and management
moderation kick, ban, unban, timeout, list_bans Server moderation
threads create Thread creation
webhooks list, create Webhook management
invites create, list Invite management
emojis list Custom emoji listing
audit log Audit log access

How It Works

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

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:

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

Manual

npm install -g @spranab/discord-mcp

Run with bot_token environment variable set:

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:

  • saga-mcp — SQLite-backed projecttracker so the agent doesn't lose the plan between sessions.
  • yantrikdb-mcp — persistentcognitive memory for Claude Code, Cursor and Windsurf.
  • truenas-mcp — 278 TrueNAS SCALEactions behind the same one-tool pattern used here.
  • brainstorm-mcp — multi-modeldebate as an MCP tool.
  • swarmcode — real-time channelbetween Claude Code instances on different machines.

License

MIT — see LICENSE.

MCP Server · Populars

MCP Server · New

    esperanza-volkov

    confdiff

    Semantic, format-aware diff for config & structured-data files (JSON, YAML, TOML, INI, .env, .properties, CSV, XML). See what actually changed — keys and values, not text noise.

    Community esperanza-volkov
    butterbase-ai

    @butterbase/mcp

    Open-source backend-as-a-service. Postgres, auth, storage, functions, AI gateway, MCP.

    Community butterbase-ai
    adamsiwiec1

    Host MCP SSE Server on Google Cloud Run

    Host an Model Context Protocol SSE deployment on Cloud Run, Authenticating with IAM.

    Community adamsiwiec1
    Mitek99

    DeepView MCP

    DeepView MCP is a Model Context Protocol server that enables IDEs like Cursor and Windsurf to analyze large codebases using Gemini 2.5 Pro's extensive context window.

    Community Mitek99
    prisma

    orm

    Next-generation ORM for Node.js & TypeScript | PostgreSQL, MySQL, MariaDB, SQL Server, SQLite, MongoDB and CockroachDB

    Community prisma