$git clone https://github.com/SaseQ/discord-mcpA 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 D
| 1 | <div align="center"> |
| 2 | <img src="assets/img/Discord_MCP_full_logo.svg" width="60%" alt="DeepSeek-V3" /> |
| 3 | </div> |
| 4 | <hr> |
| 5 | <div align="center" style="line-height: 1;"> |
| 6 | <a href="https://github.com/modelcontextprotocol/servers" target="_blank" style="margin: 2px;"> |
| 7 | <img alt="MCP Server" src="https://badge.mcpx.dev?type=server" style="display: inline-block; vertical-align: middle;"/> |
| 8 | </a> |
| 9 | <a href="https://discord.gg/5Uvxe5jteM" target="_blank" style="margin: 2px;"> |
| 10 | <img alt="Discord" src="https://img.shields.io/discord/936242526120194108?color=7389D8&label&logo=discord&logoColor=ffffff" style="display: inline-block; vertical-align: middle;"/> |
| 11 | </a> |
| 12 | <a href="https://github.com/SaseQ/discord-mcp/blob/main/LICENSE" target="_blank" style="margin: 2px;"> |
| 13 | <img alt="MIT License" src="https://img.shields.io/github/license/SaseQ/discord-mcp" style="display: inline-block; vertical-align: middle;"/> |
| 14 | </a> |
| 15 | </div> |
| 16 | |
| 17 | |
| 18 | ## 📖 Description |
| 19 | |
| 20 | A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server for the Discord API using [(JDA)](https://jda.wiki/), |
| 21 | designed to integrate Discord bots with MCP-compatible applications such as Claude, ChatGPT etc. It allows AI assistants to interact with |
| 22 | Discord by managing channels, sending messages, and retrieving server information. Ideal for building powerful Discord automation and AI-driven workflows. |
| 23 | |
| 24 | |
| 25 | ## 🔬 Installation |
| 26 | |
| 27 | ### ► 🐳 Docker Installation (Recommended) |
| 28 | |
| 29 | > [!NOTE] |
| 30 | > Docker installation is required. Full instructions can be found on [docker.com](https://www.docker.com/products/docker-desktop/). |
| 31 | |
| 32 | #### 1) Set local env variables |
| 33 | ```bash |
| 34 | export DISCORD_TOKEN="YOUR_DISCORD_BOT_TOKEN" |
| 35 | export DISCORD_GUILD_ID="OPTIONAL_DEFAULT_SERVER_ID" |
| 36 | export SPRING_PROFILES_ACTIVE=http |
| 37 | ``` |
| 38 | |
| 39 | > [!IMPORTANT] |
| 40 | > Instructions for creating a Discord bot and retrieving its token can be found [here](https://discordjs.guide/legacy/preparations/app-setup). |
| 41 | |
| 42 | > [!TIP] |
| 43 | > The `DISCORD_GUILD_ID` env variable is optional. |
| 44 | > |
| 45 | > When provided, it sets a default Discord server ID so any tool that accepts a `guildId` parameter can omit it. |
| 46 | |
| 47 | #### 2) Run the Docker container |
| 48 | ```bash |
| 49 | docker run -d -i \ |
| 50 | --name discord-mcp \ |
| 51 | --restart unless-stopped \ |
| 52 | -p 8085:8085 \ |
| 53 | -e SPRING_PROFILES_ACTIVE \ |
| 54 | -e DISCORD_TOKEN \ |
| 55 | -e DISCORD_GUILD_ID \ |
| 56 | saseq/discord-mcp:latest |
| 57 | ``` |
| 58 | |
| 59 | Default MCP endpoint URL (HTTP profile): `http://localhost:8085/mcp` |
| 60 | |
| 61 | <details> |
| 62 | <summary style="font-size: 1.35em; font-weight: bold;"> |
| 63 | 🐋 Docker Compose Installation |
| 64 | </summary> |
| 65 | |
| 66 | #### 1) Clone the repository |
| 67 | ```bash |
| 68 | git clone https://github.com/SaseQ/discord-mcp |
| 69 | ``` |
| 70 | |
| 71 | #### 2) Go to the project directory |
| 72 | ```bash |
| 73 | cd discord-mcp |
| 74 | ``` |
| 75 | |
| 76 | #### 3) Create local runtime env |
| 77 | ```bash |
| 78 | cat > .env <<EOF |
| 79 | SPRING_PROFILES_ACTIVE=http |
| 80 | DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> |
| 81 | DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> |
| 82 | EOF |
| 83 | ``` |
| 84 | |
| 85 | #### 4) Start one shared MCP server container |
| 86 | ```bash |
| 87 | docker compose up -d --build |
| 88 | ``` |
| 89 | |
| 90 | #### 5) Verify |
| 91 | ```bash |
| 92 | docker ps --filter name=discord-mcp |
| 93 | curl -fsS http://localhost:8085/actuator/health |
| 94 | ``` |
| 95 | |
| 96 | > [!TIP] |
| 97 | > You do not need to set `LOGGING_PATTERN_CONSOLE` manually. |
| 98 | > Logging is configured automatically for both `http` and legacy `stdio` modes. |
| 99 | |
| 100 | Default MCP endpoint URL (HTTP profile): `http://localhost:8085/mcp` |
| 101 | |
| 102 | Health endpoint (Actuator): `http://localhost:8085/actuator/health` |
| 103 | |
| 104 | </details> |
| 105 | |
| 106 | <details> |
| 107 | <summary style="font-size: 1.35em; font-weight: bold;"> |
| 108 | 🔧 Manual Installation |
| 109 | </summary> |
| 110 | |
| 111 | #### 1) Clone the repository |
| 112 | ```bash |
| 113 | git clone https://github.com/SaseQ/discord-mcp |
| 114 | ``` |
| 115 | |
| 116 | #### 2) Build the project |
| 117 | |
| 118 | > NOTE: Maven installation is required to use the mvn command. Full instructions can be found [here](https://www.baeldung.com/install-maven-on-windows-linux-mac). |
| 119 | |
| 120 | ```bash |
| 121 | cd discord-mcp |
| 122 | mvn clean package # The jar file will be available in the /target directory |
| 123 | ``` |
| 124 | |
| 125 | #### 3) Configure AI client |
| 126 | Run the JAR as a long-running server: |
| 127 | |
| 128 | ```bash |
| 129 | DISCORD_TOKEN=<YOUR_DISCORD_ |