Skip to main content
Glama
Discord MCP Server

Discord MCP Server

by esenbora

Discord MCP Server

npm version

A Model Context Protocol (MCP) server that exposes Discord bot capabilities to Claude.

Installation

npm install -g @buzzicra/discord-mcp

Or use directly with npx:

npx @buzzicra/discord-mcp

Related MCP server: discord-mcp

Features

  • 26 tools covering messaging, channels, servers, members, roles, and moderation

  • Full Discord.js v14 integration

  • TypeScript with strict typing

Prerequisites

  1. Node.js 18+

  2. Discord Bot Token - Create a bot at Discord Developer Portal

Bot Permissions

Your Discord bot needs these permissions:

  • Read Messages/View Channels

  • Send Messages

  • Manage Messages

  • Add Reactions

  • Manage Channels (for channel operations)

  • Kick Members

  • Ban Members

  • Moderate Members (for timeouts)

  • Manage Roles

Required Intents

Enable these Privileged Gateway Intents in the Discord Developer Portal:

  • Server Members Intent

  • Message Content Intent

Installation

# Clone or navigate to the directory
cd discord_mcp

# Install dependencies
npm install

# Build
npm run build

Configuration

Environment Variable

Set DISCORD_BOT_TOKEN in your environment:

export DISCORD_BOT_TOKEN="your-bot-token"

Claude Code MCP Config

Add to your ~/.claude.json or project's .mcp.json:

{
  "mcpServers": {
    "discord": {
      "command": "node",
      "args": ["/path/to/discord_mcp/dist/index.js"],
      "env": {
        "DISCORD_BOT_TOKEN": "your-bot-token"
      }
    }
  }
}

Available Tools

Messaging (6 tools)

Tool

Description

send_message

Send a message to a channel

get_messages

Get recent messages from a channel

edit_message

Edit an existing message

delete_message

Delete a message

add_reaction

Add reaction to a message

reply_to_message

Reply to a specific message

Channels (5 tools)

Tool

Description

list_channels

List all channels in a server

get_channel

Get channel details

create_channel

Create a new channel

delete_channel

Delete a channel

update_channel

Update channel settings

Server (3 tools)

Tool

Description

get_server_info

Get server details

list_servers

List all servers the bot is in

get_server_stats

Get server statistics

Members (4 tools)

Tool

Description

list_members

List server members

get_member

Get member details

search_members

Search members by username

get_member_roles

Get roles for a member

Roles (4 tools)

Tool

Description

list_roles

List all server roles

add_role

Add role to member

remove_role

Remove role from member

create_role

Create a new role

Moderation (4 tools)

Tool

Description

kick_member

Kick a member from server

ban_member

Ban a member from server

unban_member

Unban a user

timeout_member

Timeout a member

Usage Examples

Once configured, you can use natural language with Claude:

  • "List all the servers my Discord bot is in"

  • "Send a message to channel 123456789 saying 'Hello!'"

  • "Get the last 10 messages from channel 123456789"

  • "Create a new text channel called 'announcements' in server 987654321"

  • "Timeout user 111222333 for 10 minutes"

Development

# Watch mode for development
npm run dev

# Type checking
npm run typecheck

Troubleshooting

"DISCORD_BOT_TOKEN environment variable is required"

Make sure you've set the token in your MCP config or environment.

"Missing Access" errors

Check that your bot has the required permissions and intents enabled.

Bot not responding to channel operations

Ensure the bot has access to the specific channel and server.

License

MIT

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables interaction with Discord through the Model Context Protocol, providing access to all Discord features like channels, messages, threads, reactions, and roles. Supports secure Discord bot operations with rate limiting, caching, and comprehensive API coverage for OpenAI, LangChain, and other MCP clients.
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude to manage Discord servers through the Discord API, supporting server info, messaging, channel management, webhooks, and user interactions.
      11 npm
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Enables Claude Code to interact with Discord servers, including sending messages, reading channels, managing threads, and adding reactions via natural language commands.
      MIT
    • A
      license
      A
      quality
      C
      maintenance
      Enables Claude or any MCP client to operate a Discord bot through 35 tools, covering reading channels, searching history, posting and replying, managing channels, threads and roles, moderating members, and reading the audit log. It runs locally as a stateless subprocess, making plain HTTPS calls to Discord's REST API with no gateway connection.
      35
      MIT