Get the FREE Ultimate OpenClaw Setup Guide →

discord

Manage your entire Discord server from Claude Code, Claude Desktop, Cursor, or Windsurf via MCP. 134 admin tools across 20 categories. Interactive setup wizard included.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio hardheadhackerhead-discord-mcp npx -y @quadslab.io/discord-mcp \
  --env DISCORD_TOKEN="your-bot-token" \
  --env DISCORD_GUILD_ID="your-server-id"

How to use

This MCP server allows you to manage a Discord server from Claude Code, Claude Desktop, Cursor, or Windsurf using natural language. After setup, you can issue commands like creating or updating roles, channels, permissions, moderating members, handling messages, schedules, webhooks, events, and polls. The system offers 134 tools across 20 categories, with fuzzy name resolution for channels, roles, and members, so you don’t need exact IDs. Use the interactive wizard to configure the bot and connect the MCP client(s), or configure manually via a JSON config. Once connected, you can query the MCP to perform administration tasks in plain English, and Claude will translate those requests into Discord actions with structured JSON responses for visibility and auditing.

How to install

Prerequisites:

  • Node.js v18 or newer installed on your machine
  • npm (comes with Node.js)
  • A Discord bot token and target server (guild) ID
  • Optional: access to the MCP CLI (via npm) or the repository if you prefer manual setup

Install and set up using the MCP CLI (recommended):

  1. Install Node.js from https://nodejs.org and verify: node -v npm -v

  2. Install and run the MCP server via npx (no local install required): npx @quadslab.io/discord-mcp init

    Follow the interactive wizard to create a bot, validate token, and generate config

  3. If you prefer manual setup, install locally and run from source: git clone https://github.com/HardHeadHackerHead/discord-mcp.git cd discord-mcp npm install cp .env.example .env

    Edit .env with your DISCORD_TOKEN and DISCORD_GUILD_ID

    npm run build npm start

  4. Alternatively, configure via a one-liner config (example provided in readme) and run with your preferred MCP client.

Additional notes

Tips and common issues:

  • Ensure your Discord bot has the necessary permissions in the target guild (roles, channels, moderation, etc.). The health check command will verify permissions.
  • If using the wizard, it will auto-detect installed MCP clients and write the appropriate config for each client.
  • For manual setups, keep your config in the expected location (.mcp.json for Claude Code, claude_desktop_config.json for Claude Desktop, etc.).
  • When using npx, environment variables like DISCORD_TOKEN and DISCORD_GUILD_ID can be supplied via the config or environment.
  • If you encounter token or permission errors, re-run the check command to verify current access and permissions, and regenerate invite links with the required scopes.
  • The MCP server responds with structured JSON; use that output for automation and logging.

Related MCP Servers

Sponsor this space

Reach thousands of developers