PickSkill
← Back

saseq/discord-mcp

README.md
Rendered from GitHub raw
View raw ↗

📖 Description

A Model Context Protocol (MCP) server for the Discord API (JDA), allowing seamless integration of Discord Bot with MCP-compatible applications like Claude Desktop.

Enable your AI assistants to seamlessly interact with Discord. Manage channels, send messages, and retrieve server information effortlessly. Enhance your Discord experience with powerful automation capabilities.

🔬 Installation

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

1) Create local runtime env

cat > .env <<EOF
SPRING_PROFILES_ACTIVE=http
DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>
DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>
EOF

2) Start one shared MCP server container

docker compose up -d --build

3) Verify

docker ps --filter name=discord-mcp
curl -fsS http://localhost:8085/actuator/health

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

Health endpoint (Actuator): http://localhost:8085/actuator/health

Clone the repository

git clone https://github.com/SaseQ/discord-mcp

Build the project

NOTE: Maven installation is required to use the mvn command. Full instructions can be found here.

cd discord-mcp
mvn clean package # The jar file will be available in the /target directory

Configure AI client

Run the JAR as a long-running server:

DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> \
DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> \
SPRING_PROFILES_ACTIVE=http \
java -jar /absolute/path/to/discord-mcp-1.0.0.jar

Then configure your MCP client to connect over HTTP to:

http://localhost:8085/mcp

NOTE: The DISCORD_GUILD_ID environment variable is optional. When provided, it sets a default Discord server ID so any tool that accepts a guildId parameter can omit it.

🔗 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=<YOUR_DISCORD_BOT_TOKEN>",
        "-e",
        "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
        "saseq/discord-mcp:latest"
      ]
    }
  }
}

Recommended (HTTP singleton mode):

claude mcp add discord-mcp --transport http http://localhost:8085/mcp

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

claude mcp add discord-mcp -- docker run --rm -i -e DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> -e DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> saseq/discord-mcp:latest
codex mcp add discord-mcp --url http://localhost:8085/mcp
codex mcp list

Run this command:

openclaw mcp set discord-mcp '{"url":"http://localhost:8085/mcp","transport":"streamable-http"}'
openclaw mcp list

OR

Pasting the following configuration into your OpenClaw ~/.openclaw/config.json file:

{
  "mcp": {
    "servers": {
      "discord-mcp": {
        "url": "http://localhost:8085/mcp",
        "transport": "streamable-http"
      }
    }
  }
}

Go to: Settings -> Cursor Settings -> MCP -> Add new global MCP server

Pasting the following configuration into your Cursor ~/.cursor/mcp.json file is the recommended approach. You may also install in a specific project by creating .cursor/mcp.json in your project folder. See Cursor MCP docs for more info.

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

STDIO local config (Default, legacy):

Past the following configuration into your Claude Desktop claude_desktop_config.json file.

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

Remote MCP Connector:

  1. Open Claude Desktop and go to Settings -> Connectors.
  2. Add a custom connector and set MCP URL to your server endpoint (for example https://<PUBLIC_HOST>/mcp).
  3. Save and reconnect.

Claude Desktop remote connectors are managed via Connectors UI (not claude_desktop_config.json). http://localhost:8085/mcp is reachable only from your machine. For Claude Desktop remote connectors, expose the endpoint with public HTTPS (for example tunnel/reverse proxy).

🛠️ Available Tools

Server Information

User Management

Message Management

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)

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.