D

Discord Server MCP

by pr5ias · io.github.pr5ias/discord-server-mcp

Enables creating, organising and moderating Discord servers from Claude or any MCP client through your own bot, with dry-run previews, templates, layouts and backups. Supports multiple bots and servers, name-based references, and guided setup from zero.

npm Local · stdio GlamaOfficial MCP Registry High confidence

Install

Add to ~/Library/Application Support/Claude/claude_desktop_config.json

Windows / Linux path
Windows: %APPDATA%\Claude\claude_desktop_config.json
Linux: ~/.config/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

Restart Claude Desktop to activate the new server.

Add to .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)

Windows / Linux path
Windows: .cursor\mcp.json (project) or %USERPROFILE%\.cursor\mcp.json (global)
Linux: .cursor/mcp.json (project) or ~/.cursor/mcp.json (global)
{
  "mcpServers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

Cursor usually picks up config changes automatically; if the server does not appear, reload the window.

Add to .mcp.json (project) or ~/.claude.json (global)

Windows / Linux path
Windows: .mcp.json (project) or %USERPROFILE%\.claude.json (global)
Linux: .mcp.json (project) or ~/.claude.json (global)
{
  "mcpServers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

The server will be available in the next Claude Code session.

Add to .vscode/mcp.json

Windows / Linux path
Windows: .vscode\mcp.json
Linux: .vscode/mcp.json
{
  "servers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

Reload the VS Code window to activate.

Add to ~/.codeium/windsurf/mcp_config.json

Windows / Linux path
Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
Linux: ~/.codeium/windsurf/mcp_config.json
{
  "mcpServers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

Restart Windsurf (or refresh its MCP servers panel) to activate the new server.

Windsurf Next uses ~/.codeium/windsurf-next/mcp_config.json. Devin Desktop (the Windsurf rebrand) uses ~/.config/devin/mcp_config.json and imports the Windsurf file.

Add to ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Windows / Linux path
Windows: %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux: ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
{
  "mcpServers": {
    "io-github-pr5ias-discord-server-mcp": {
      "command": "npx",
      "args": [
        "-y",
        "discord-server-mcp"
      ],
      "env": {
        "DISCORD_BOT_TOKEN": "<YOUR_VALUE>",
        "DISCORD_GUILD_ID": "<VALUE>",
        "DISCORD_PRESENCE": "on",
        "DISCORD_TOOLSETS": "all",
        "DISCORD_ACTIVE_BOT": "<VALUE>",
        "DISCORD_TOKEN_FILE": "~/.discord-mcp/token.txt",
        "DISCORD_WRITE_MODE": "full",
        "DISCORD_SERVER_BOTS": "<VALUE>",
        "DISCORD_PRESENCE_TEXT": "<VALUE>",
        "DISCORD_PRESENCE_TYPE": "watching",
        "DISCORD_ALLOWED_GUILDS": "all",
        "DISCORD_PRESENCE_STATUS": "online",
        "DISCORD_CONFIRM_DESTRUCTIVE": "on"
      }
    }
  }
}

Cline reloads cline_mcp_settings.json automatically; if the server does not appear, reload the VS Code window.

Open it from Cline's MCP Servers panel → Configure. Roo Code uses a different file and format.

Configuration

Environment variables this server reads. Secrets stay on your machine.

NameRequiredDescription
DISCORD_BOT_TOKEN secret No A bot token. Bots added from the chat or with `init` are saved in `~/.discord-mcp/bots.json`. A token on the first line of `~/.discord-mcp/token.txt` is also read; `DISCORD_TOKEN_FILE` changes that path.
DISCORD_GUILD_ID No Default server when the bot is in several.
DISCORD_PRESENCE No `off` keeps the bot offline (no gateway connection). Default: on
DISCORD_TOOLSETS No Comma-separated tool groups to offer, e.g. `messages,channels`. Default: all
DISCORD_ACTIVE_BOT No Name or id of the bot used when a request names no server (`use_bot` sets it). Defaults to the first bot.
DISCORD_TOKEN_FILE No Path to a file whose first line contains a bot token. Default: ~/.discord-mcp/token.txt
DISCORD_WRITE_MODE No `preview`: every change is only shown. `readonly`: no changing tools at all. Default: full
DISCORD_SERVER_BOTS No JSON mapping of server id to bot name/id, choosing the bot per server, e.g. `{"<server id>": "<bot>"}` (`set_server_bot` sets it).
DISCORD_PRESENCE_TEXT No Status text, e.g. `My Server` shows "Watching My Server".
DISCORD_PRESENCE_TYPE No Presence activity type: `playing`, `listening`, `watching`, `competing`, or `custom`. Default: watching
DISCORD_ALLOWED_GUILDS No Comma-separated server ids the tools may touch. Default: all
DISCORD_PRESENCE_STATUS No Presence status: `online`, `idle`, `dnd`, or `invisible`. Default: online
DISCORD_CONFIRM_DESTRUCTIVE No Permanent actions (delete, kick, ban, purge, prune…) return a preview until called with `confirm: true`. Default: on

Similar servers