SD

saseq/discord-mcp

Developer tools
578 stars 110 forks Quality 88 Trend 38MIT

A MCP server for the Discord integration. Enable your AI assistants to seamlessly interact with Discord. Enhance your Discord experience with powerful automation capabilities.

Overview

A Model Context Protocol (MCP) server for the Discord API using (JDA), designed to integrate Discord bots with MCP-compatible applications such as Claude, ChatGPT etc. It allows AI assistants to interact with Discord by managing channels, sending messages, and retrieving server information. Ideal for building powerful Discord automation and AI-driven workflows. Docker installation is required. Full instructions can be found on docker.com. Instructions for creating a Discord bot and retrieving its token can be found here. The DISCORD_GUILD_ID env variable is optional. When provided, it sets a default Discord server ID so any tool that accepts a guildId parameter can omit it. Default MCP endpoint URL (HTTP profile): http://localhost:8085/mcp You do not need to set LOGGING_PATTERN_CONSOLE manually. Logging is configured automatically for both http and legacy stdio modes.

README

📖 Description

A Model Context Protocol (MCP) server for the Discord API using (JDA), designed to integrate Discord bots with MCP-compatible applications such as Claude, ChatGPT etc. It allows AI assistants to interact with Discord by managing channels, sending messages, and retrieving server information. Ideal for building powerful Discord automation and AI-driven workflows.

🔬 Installation

[!NOTE] Docker installation is required. Full instructions can be found on docker.com.

1) Set local env variables

export DISCORD_TOKEN="YOUR_DISCORD_BOT_TOKEN"
export DISCORD_GUILD_ID="OPTIONAL_DEFAULT_SERVER_ID"
export SPRING_PROFILES_ACTIVE=http

[!IMPORTANT] Instructions for creating a Discord bot and retrieving its token can be found here.

[!TIP] The DISCORD_GUILD_ID env variable is optional.

When provided, it sets a default Discord server ID so any tool that accepts a guildId parameter can omit it.

2) Run the Docker container

docker run -d -i \
  --name discord-mcp \
  --restart unless-stopped \
  -p 8085:8085 \
  -e SPRING_PROFILES_ACTIVE \
  -e DISCORD_TOKEN \
  -e DISCORD_GUILD_ID \
  saseq/discord-mcp:latest

Default MCP endpoint URL (HTTP profile): http://localhost:8085/mcp

🔗 Connections

► 🗞️ Default config.json Connection

Recommended (HTTP singleton mode):

{
  "mcpServers": {
    "discord-mcp": {
      "url": "http://localhost:8085/mcp"
    }
  }
}

Legacy mode (stdio, starts a new process/container per client session):

{
  "mcpServers": {
    "discord-mcp": {
      "command": "docker",
      "args": [
        "run",
        "--rm",
        "-i",
        "-e",
        "DISCORD_TOKEN=",
        "-e",
        "DISCORD_GUILD_ID=",
        "saseq/discord-mcp:latest"
      ]
    }
  }
}

🛠️ Available Tools

Server Information

User Management

  • get_user_id_by_name: Get a Discord user’s ID by username in a guild for ping usage ``
  • get_member_by_id: Get a Discord guild member by stable user ID, including username, global name, nickname, effective name, bot flag, join time, and roles
  • search_members: Search Discord guild members by ID, username, global name, nickname, or effective name and return identity candidates with stable user IDs
  • send_private_message: Send a private message to a specific user
  • edit_private_message: Edit a private message from a specific user
  • delete_private_message: Delete a private message from a specific user
  • read_private_messages: Read private message history from a specific user (includes author IDs, reply markers, attachment metadata, supports count 1-100 and optional cursor: before or after or around)

Message Management

  • send_message: Send a message to a specific channel
  • edit_message: Edit a message from a specific channel
  • delete_message: Delete a message from a specific channel
  • read_messages: Read message history from a specific channel (includes author IDs, reply markers, attachment metadata, supports count 1-100 and optional cursor: before or after or around)
  • search_messages: Search the most recent messages of a channel or thread for text (case-insensitive scan of up to 1000 messages, newest first)
  • add_reaction: Add a reaction (emoji) to a specific message
  • remove_reaction: Remove a specified reaction (emoji) from a message
  • get_message: Get a single message by ID in the same format as read_messages; replies include the message they reply to
  • get_message_replies: Find replies to a message by scanning the messages posted after it (up to 1000)

Channel Management

Category Management

Webhook Management

Role Management

Moderation and User Management

  • kick_member: Kicks a member from the server
  • ban_member: Bans a user from the server
  • unban_member: Removes a ban from a user
  • timeout_member: Disables communication for a member for a specified duration
  • remove_timeout: Removes a timeout (unmute) from a member before it expires
  • set_nickname: Changes a member’s nickname on the server
  • get_bans: Returns a list of banned users on the server with ban reasons

Voice & Stage Channel Management

Scheduled Events Management

Channel Permission Overwrites

Invite Management

  • create_invite: Create a new invite link for a specific channel
  • list_invites: List all active invites on the server with their statistics
  • delete_invite: Delete (revoke) an invite so the link stops working
  • get_invite_details: Get details about a specific invite (works for any public invite)

Thread Management

  • list_active_threads: List all active threads in the server
  • list_threads: List the threads of one channel (text, news, forum or media), including recent archived public threads; a returned thread ID works as channelId in the message tools (archived threads become usable there only after list_threads has been called on their parent channel)
  • get_thread_info: Get detailed information about a thread (parent channel, owner, archived/locked state, message and member counts; archived threads need list_threads on the parent channel first)

Forum Management

Emoji Management

  • list_emojis: List all custom emojis on the server
  • get_emoji_details: Get detailed information about a specific custom emoji
  • create_emoji: Upload a new custom emoji to the server (base64 or image URL, max 256KB)
  • edit_emoji: Edit an existing emoji’s name or role restrictions
  • delete_emoji: Permanently delete a custom emoji from the server

If DISCORD_GUILD_ID is set, the guildId parameter becomes optional for all tools above.

A more detailed examples can be found in the Wiki.

View the full README on GitHub

Install

docker run --rm -i -e DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> -e DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> saseq/discord-mcp:latest
New to MCP? Start with the mcpskill.org guide →

Configuration

{ "mcpServers": { "discord-mcp": { "url": "http://localhost:8085/mcp" } } }