v0.1.0 · MIT · Node ≥ 20 · stdio & HTTP

Run your Discord server from an AI client. Without giving it the crown.

A Model Context Protocol server exposing 46 guarded tools for channels, members, roles, moderation and bans — user-token or bot-token — every mutating call checked by a Sovereignty Guard before it touches Discord.

Get started View on GitHub
discord-sovereign-mcp banner

Everything Discord, tool-by-tool

46 strict-schema tools across eight domains — read and write, all auditable.

#

Channels & threads

List, create, edit, archive and delete channels and forum threads.

@

Members & roles

Guild member lookup, role assignment and removal, nicknames, timeouts.

Messages

Send, edit, reply, react and delete messages with embeds and flags.

Moderation

Ban, unban, kick, prune and page through the ban list with reasons.

Guild control

Guild settings, region, verification level, welcome screen, boost status.

Sovereignty Guard

Mutating tools require proof of ownership before a single API call.

The Sovereignty Guard

Before any mutating tool runs, the server verifies the caller can act as the guild's owner — highest role on a bot token, guild ownership on a user token. No crown, no call.

discord_assert_sovereignty guarded
const { result } = await mcp.use('discord_assert_sovereignty', {
  guild_id: '123456789012345678',
  hint: 'Am I allowed to mutate this server?',
});

// → { sovereign: true, verdict: 'owner', mode: 'user' }

const { content } = await mcp.use('discord_update_guild', {
  guild_id: '123456789012345678',
  name: 'Reforged',
  dry_run: true, // preview the change, touch nothing
});

Dry-run by default

Every destructive tool accepts dry_run — 16 of them expose it, and the server refuses writes when the guard or allowlist says no.

Blast radius

DISCORD_ALLOWED_GUILDS pins the agent to your test server. Tools targeting any guild outside the list are denied even when sovereignty would pass.

User-token mode

No bot needed: bootstrap a user token with --oauth and an in-browser consent flow — token persisted to .env.

Quick start

terminal
$ npx discord-sovereign-mcp --oauth
# 1. authorize in the browser · token written to .env
# 2. DISCORD_ALLOWED_GUILDS=123456789012345678 in .env (blast radius)
$ npx discord-sovereign-mcp
.mcp.json
{
  "mcpServers": {
    "discord-sovereign": {
      "command": "npx",
      "args": ["discord-sovereign-mcp@latest"],
      "env": { "DISCORD_TOKEN": "...", "DISCORD_ALLOWED_GUILDS": "" }
    }
  }
}
opencode.json
{
  "mcp": {
    "discord-sovereign": {
      "type": "local",
      "command": ["npx", "discord-sovereign-mcp@latest"],
      "enabled": true
    }
  }
}

Ready-to-paste configs for Claude Code, Claude Desktop, Codex, opencode, Antigravity, Cursor, Windsurf and Continue live in examples/mcp.