discord-mcp

v0.2.0
io.github.qungtai/discord-mcp Checked 14 hours ago Published 27 days ago

A community MCP server for the Discord REST API with traceable coverage

Values you need

VariableWhat it is
DISCORD_TOKENrequired secret Discord Bot Token
DISCORD_MCP_ALLOWED_GUILDSoptional Comma-separated list of allowed guild IDs. When set, operations outside these guilds are refused.
DISCORD_MCP_TOOLSETSoptional Comma-separated list of enabled toolsets. Available: core, messages, reactions, threads, channels, webhooks, guild, members, roles, moderation, events, invites. Default: core,messages,reactions,threads
DISCORD_MCP_READ_ONLYoptional Blocks all mutating actions and allows read-only tools only (true or false). Any other value stops startup. Default: false
DISCORD_MCP_APPROVALoptional Confirmation mode for destructive operations (elicitation or none). Any other value stops startup. Default: elicitation
DISCORD_MCP_ALLOW_DMSoptional Permits direct messages and user-scoped operations alongside an active guild allowlist (true or false). Any other value stops startup. Default: false
DISCORD_MCP_FILE_ROOTSoptional Optional comma-separated list of absolute directory paths accessible for uploads. When unset, empty, or parsing to no entries, file access is open by default for any absolute path, except hidden files and directories.
DISCORD_MCP_DOWNLOAD_DIRoptional Absolute directory path where attachment downloads are stored. Defaults to ~/Downloads/discord-mcp and is created recursively on first download.
DISCORD_MCP_MAX_DOWNLOAD_BYTESoptional Maximum download size in bytes for discord_download_attachment (defaults to 100 MiB). Default: 104857600
DISCORD_MCP_MAX_UPLOAD_BYTESoptional Maximum upload size in bytes (defaults to 20 MiB). Default: 20971520
DISCORD_MCP_REQUEST_TIMEOUT_MSoptional HTTP request timeout in milliseconds for Discord REST API requests. Default: 15000
DISCORD_MCP_RATE_LIMIT_WAIT_MSoptional Maximum wait duration in milliseconds when encountering a Discord rate limit before aborting. Default: 5000

npm (npx) discovery passed

Requires Node.js 18+

Run in a terminal
claude mcp add discord-mcp -e 'DISCORD_TOKEN=<DISCORD_TOKEN>' -- npx -y @qungtai/discord-mcp@0.2.0
Add to claude_desktop_config.json
{
  "mcpServers": {
    "discord-mcp": {
      "args": [
        "-y",
        "@qungtai/discord-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>"
      }
    }
  }
}
Add to ~/.cursor/mcp.json
{
  "mcpServers": {
    "discord-mcp": {
      "args": [
        "-y",
        "@qungtai/discord-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "DISCORD_TOKEN": "<DISCORD_TOKEN>"
      }
    }
  }
}
Add to .vscode/mcp.json
{
  "inputs": [
    {
      "description": "DISCORD_TOKEN",
      "id": "discord-token",
      "password": true,
      "type": "promptString"
    }
  ],
  "servers": {
    "discord-mcp": {
      "args": [
        "-y",
        "@qungtai/discord-mcp@0.2.0"
      ],
      "command": "npx",
      "env": {
        "DISCORD_TOKEN": "${input:discord-token}"
      },
      "type": "stdio"
    }
  }
}
Add to ~/.codex/config.toml
[mcp_servers.discord-mcp]
command = "npx"
args = ["-y", "@qungtai/discord-mcp@0.2.0"]
env = { "DISCORD_TOKEN" = "<DISCORD_TOKEN>" }

For AI agents

  1. Ask the user for: DISCORD_TOKEN. Never invent or guess these values; secrets go into the client config, not into chat logs.
  2. Pick the user's MCP client and apply the matching config from the first install method (it is the one verified by the smoke test when available).
  3. Restart or reload the client so it starts the server.
  4. Verify: the server should expose these tools: discord_add_my_message_reaction, discord_add_thread_member, discord_bulk_delete_messages, discord_create_pin, discord_create_thread, discord_create_thread_from_message, discord_crosspost_message, discord_delete_all_message_reactions, ….
  5. If it fails, check that the required runtime is installed (Node.js 18+) and that the values above are set.

Machine-readable: install.md · manifest.json