MCP Hub
Back to servers

discord-mcp

Lightweight multi-guild Discord MCP server with 60+ tools for messages, channels, roles, permissions, moderation, forums, webhooks, and embeds

glama
Stars
5
Forks
1
Updated
Mar 21, 2026
Validated
Mar 22, 2026

Discord MCP Server

A lightweight, multi-guild Discord MCP server with 60+ tools

npm License Node Discord.js MCP

discord-mcp MCP server

Manage your entire Discord server from Claude Desktop, Claude Code, Cursor, VS Code Copilot, or any MCP-compatible client. Messages, channels, roles, permissions, moderation, forums, webhooks — all through natural language.


Why this one?

  • 60+ tools — messages, channels, roles, permissions, moderation, forums, webhooks, embeds, and more
  • Multi-guild — works across multiple servers, no GUILD_ID lock-in
  • Lightweight — TypeScript + Node.js, ~25kB package, ~73MB Docker image (vs 400MB+ for Java alternatives)
  • Modular — clean architecture, easy to extend with new tools
  • Two install methods — npm or Docker, your choice

Quick Start

Add this to your MCP client config and replace YOUR_TOKEN_HERE with your bot token:

{
  "mcpServers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "@pasympa/discord-mcp"],
      "env": {
        "DISCORD_TOKEN": "YOUR_TOKEN_HERE"
      }
    }
  }
}

No install needed — npx handles everything.

Don't have a bot yet? See Creating Your Discord Bot.


Configuration

Claude Desktop

Add the config above to your claude_desktop_config.json:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json

Restart Claude Desktop after saving.

Claude Code
claude mcp add discord -e DISCORD_TOKEN=YOUR_TOKEN_HERE -- npx -y @pasympa/discord-mcp
Cursor

Add the config above to ~/.cursor/mcp.json. See Cursor MCP docs for details.

VS Code / GitHub Copilot

Add to your .vscode/mcp.json:

{
  "inputs": [
    {
      "type": "promptString",
      "id": "discord-token",
      "description": "Discord Bot Token",
      "password": true
    }
  ],
  "servers": {
    "discord": {
      "command": "npx",
      "args": ["-y", "@pasympa/discord-mcp"],
      "env": {
        "DISCORD_TOKEN": "${input:discord-token}"
      }
    }
  }
}

See VS Code MCP docs for details.

Docker
{
  "mcpServers": {
    "discord": {
      "command": "docker",
      "args": [
        "run", "--rm", "-i",
        "-e", "DISCORD_TOKEN=YOUR_TOKEN_HERE",
        "pasympa/discord-mcp:latest"
      ]
    }
  }
}
From source
git clone https://github.com/PaSympa/discord-mcp
cd discord-mcp
npm install && npm run build
{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/absolute/path/to/discord-mcp/dist/index.js"],
      "env": {
        "DISCORD_TOKEN": "YOUR_TOKEN_HERE"
      }
    }
  }
}
.env file (alternative)

Instead of passing the token in the MCP config, create a .env file at the project root:

DISCORD_TOKEN=YOUR_TOKEN_HERE

The server loads .env automatically via dotenv.


Creating Your Discord Bot

  1. Go to discord.com/developers/applications
  2. New Application > give it a name
  3. Bot tab > Reset Token > copy the token
  4. Enable Privileged Gateway Intents:
    • Server Members Intent
    • Message Content Intent
  5. OAuth2 > URL Generator:
    • Scopes: bot
    • Permissions: Send Messages, Read Message History, Manage Channels, Manage Roles, Kick Members, Ban Members, Moderate Members, View Audit Log, Manage Messages, Manage Threads, Add Reactions, Manage Guild, Manage Webhooks
  6. Copy the generated URL and invite the bot to your server

Available Tools (60)

Discovery & Navigation

ToolDescription
discord_list_guildsList all servers the bot is connected to
discord_get_guild_infoGet detailed guild info (name, members, channels, roles, boosts)
discord_list_channelsList all channels in a guild grouped by category
discord_find_channel_by_nameFind a channel by name (partial match)

Messages (13 tools)

ToolDescription
discord_read_messagesRead the last N messages from a text channel
discord_send_messageSend a plain text message
discord_reply_messageReply to a specific message
discord_edit_messageEdit a message sent by the bot
discord_delete_messageDelete a specific message
discord_add_reactionAdd a reaction emoji to a message
discord_create_threadCreate a thread from a message or standalone
discord_bulk_delete_messagesDelete multiple messages at once (2-100)
discord_send_embedSend a rich embed with all options
discord_edit_embedEdit an embed previously sent by the bot
discord_send_multiple_embedsSend up to 10 embeds in a single message
discord_pin_messagePin or unpin a message
discord_search_messagesSearch messages by keyword (last 100)

Channels (5 tools)

ToolDescription
discord_create_channelCreate a text, voice channel or category
discord_delete_channelDelete a channel
discord_edit_channelEdit name, topic, slowmode
discord_move_channelMove a channel into/out of a category
discord_clone_channelClone a channel with its permissions

Channel Permissions (6 tools)

ToolDescription
discord_get_channel_permissionsList all permission overwrites on a channel
discord_set_role_permissionAllow/deny permissions for a role on a channel
discord_set_member_permissionAllow/deny permissions for a member on a channel
discord_reset_channel_permissionsRemove all overwrites (reset to inherited)
discord_copy_permissionsCopy overwrites from one channel to another
discord_audit_permissionsFull permission audit for all channels

Members (6 tools)

ToolDescription
discord_list_membersList guild members with their roles
discord_get_member_infoDetailed member info (roles, permissions, join date)
discord_kick_memberKick a member
discord_ban_memberBan a member (optionally delete recent messages)
discord_unban_memberUnban a user
discord_timeout_memberTimeout a member (0 to remove)

Roles (7 tools)

ToolDescription
discord_list_rolesList all roles with permissions and member count
discord_create_roleCreate a new role
discord_edit_roleEdit a role (name, color, permissions, hoist, mentionable)
discord_delete_roleDelete a role
discord_add_roleAssign a role to a member
discord_remove_roleRemove a role from a member
discord_get_role_membersList all members with a specific role

Forums (10 tools)

ToolDescription
discord_get_forum_channelsList all forum channels in a guild
discord_create_forum_channelCreate a new forum channel
discord_create_forum_postCreate a post/thread in a forum
discord_get_forum_postGet a post's details and messages
discord_list_forum_threadsList threads (active + archived)
discord_reply_to_forumReply to a forum post
discord_delete_forum_postDelete a forum thread
discord_get_forum_tagsGet available tags
discord_set_forum_tagsSet/update tags on a forum
discord_update_forum_postUpdate title, archived, locked, tags

Webhooks (5 tools)

ToolDescription
discord_create_webhookCreate a webhook on a channel
discord_send_webhook_messageSend via webhook (custom username/avatar, embeds)
discord_edit_webhookEdit a webhook's name, avatar, or channel
discord_delete_webhookDelete a webhook
discord_list_webhooksList webhooks for a channel or guild

Moderation & Screening

ToolDescription
discord_get_audit_logFetch the guild audit log
discord_get_membership_screeningGet the membership screening form
discord_update_membership_screeningUpdate screening rules for new members

Stats

ToolDescription
discord_get_server_statsServer stats: members, channels, roles, boost level

Usage Examples

"List all servers the bot is in"
"Read the last 10 messages in #general"
"Send 'Hello everyone!' to the announcements channel"
"Create a forum channel called 'feedback' with tags Bug, Feature, Question"
"Show the full permission audit for the server"
"Create a webhook on #notifications and send a test message"
"Ban user 112233445566 and delete their messages from the last 3 days"

Finding Discord IDs

Enable Developer Mode in Discord: Settings > Advanced > Developer Mode

Then right-click on a server, channel, or user > Copy ID.


Project Structure

discord-mcp/
├── src/
│   ├── index.ts             ← Entry point (MCP server + transport)
│   ├── client.ts            ← Discord client + shared helpers
│   └── tools/
│       ├── index.ts         ← Tool registry
│       ├── types.ts         ← Shared TypeScript interfaces
│       ├── discovery.ts     ← Guild/channel discovery
│       ├── messages.ts      ← Message CRUD, reactions, threads, embeds
│       ├── channels.ts      ← Channel management
│       ├── permissions.ts   ← Permission overwrites
│       ├── members.ts       ← Member management
│       ├── roles.ts         ← Role CRUD and assignment
│       ├── moderation.ts    ← Audit log
│       ├── screening.ts     ← Membership screening
│       ├── stats.ts         ← Server statistics
│       ├── forums.ts        ← Forum channels, posts, tags
│       └── webhooks.ts      ← Webhook management
├── Dockerfile
├── .dockerignore
├── package.json
├── tsconfig.json
└── README.md

Adding a new tool

  1. Create a new file in src/tools/ (e.g. events.ts)
  2. Export definitions (tool schemas) and handle() (tool logic)
  3. Import and add it to the modules array in src/tools/index.ts

Security

  • Never commit your Discord token to Git
  • Use environment variables or a .env file (not versioned)
  • Give the bot only the permissions it needs

Contributing

Contributions are welcome!

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Follow the modular structure — see Adding a new tool
  4. Commit your changes and open a pull request

License

MIT — see LICENSE for details.

Reviews

No reviews yet

Sign in to write a review