Skip to content
Back to search

discord-mcp

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

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today
Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/saseq--discord-mcp/badge.svg)](/listings/saseq--discord-mcp)

HTML

<a href="/listings/saseq--discord-mcp"><img src="/api/listings/saseq--discord-mcp/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

► 🐳 Docker Installation (Recommended)

> [!NOTE] > Docker installation is required. Full instructions can be found on [docker.com](https://www.docker.com/products/docker-desktop/).

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](https://discordjs.guide/legacy/preparations/app-setup).

> [!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`

<details> <summary style="font-size: 1.35em; font-weight: bold;"> 🐋 Docker Compose Installation </summary>

1) Clone the repository

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

2) Go to the project directory

cd discord-mcp

3) 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

4) Start one shared MCP server container

docker compose up -d --build

5) Verify

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

> [!TIP] > You do not need to set `LOGGING_PATTERN_CONSOLE` manually. > Logging is configured automatically for both `http` and legacy `stdio` modes.

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

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

</details>

<details> <summary style="font-size: 1.35em; font-weight: bold;"> 🔧 Manual Installation </summary>

1) Clone the repository

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

2) Build the project

> 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).

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

3) 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

> 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.

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

</details>

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

README.md · README · 430 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  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. ## 📖 Description
  17. A [Model Context Protocol (MCP)](https://modelcontextprotocol.io/introduction) server for the Discord API using [(JDA)](https://jda.wiki/),
  18. designed to integrate Discord bots with MCP-compatible applications such as Claude, ChatGPT etc. It allows AI assistants to interact with
  19. Discord by managing channels, sending messages, and retrieving server information. Ideal for building powerful Discord automation and AI-driven workflows.
  20. ## 🔬 Installation
  21. ### ► 🐳 Docker Installation (Recommended)
  22. > [!NOTE]
  23. > Docker installation is required. Full instructions can be found on [docker.com](https://www.docker.com/products/docker-desktop/).
  24. #### 1) Set local env variables
  25. ```bash
  26. export DISCORD_TOKEN="YOUR_DISCORD_BOT_TOKEN"
  27. export DISCORD_GUILD_ID="OPTIONAL_DEFAULT_SERVER_ID"
  28. export SPRING_PROFILES_ACTIVE=http
  29. ```
  30. > [!IMPORTANT]
  31. > Instructions for creating a Discord bot and retrieving its token can be found [here](https://discordjs.guide/legacy/preparations/app-setup).
  32. > [!TIP]
  33. > The `DISCORD_GUILD_ID` env variable is optional.
  34. >
  35. > When provided, it sets a default Discord server ID so any tool that accepts a `guildId` parameter can omit it.
  36. #### 2) Run the Docker container
  37. ```bash
  38. docker run -d -i \
  39. --name discord-mcp \
  40. --restart unless-stopped \
  41. -p 8085:8085 \
  42. -e SPRING_PROFILES_ACTIVE \
  43. -e DISCORD_TOKEN \
  44. -e DISCORD_GUILD_ID \
  45. saseq/discord-mcp:latest
  46. ```
  47. Default MCP endpoint URL (HTTP profile): `http://localhost:8085/mcp`
  48. <details>
  49. <summary style="font-size: 1.35em; font-weight: bold;">
  50. 🐋 Docker Compose Installation
  51. </summary>
  52. #### 1) Clone the repository
  53. ```bash
  54. git clone https://github.com/SaseQ/discord-mcp
  55. ```
  56. #### 2) Go to the project directory
  57. ```bash
  58. cd discord-mcp
  59. ```
  60. #### 3) Create local runtime env
  61. ```bash
  62. cat > .env <<EOF
  63. SPRING_PROFILES_ACTIVE=http
  64. DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>
  65. DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>
  66. EOF
  67. ```
  68. #### 4) Start one shared MCP server container
  69. ```bash
  70. docker compose up -d --build
  71. ```
  72. #### 5) Verify
  73. ```bash
  74. docker ps --filter name=discord-mcp
  75. curl -fsS http://localhost:8085/actuator/health
  76. ```
  77. > [!TIP]
  78. > You do not need to set `LOGGING_PATTERN_CONSOLE` manually.
  79. > Logging is configured automatically for both `http` and legacy `stdio` modes.
  80. Default MCP endpoint URL (HTTP profile): `http://localhost:8085/mcp`
  81. Health endpoint (Actuator): `http://localhost:8085/actuator/health`
  82. </details>
  83. <details>
  84. <summary style="font-size: 1.35em; font-weight: bold;">
  85. 🔧 Manual Installation
  86. </summary>
  87. #### 1) Clone the repository
  88. ```bash
  89. git clone https://github.com/SaseQ/discord-mcp
  90. ```
  91. #### 2) Build the project
  92. > 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).
  93. ```bash
  94. cd discord-mcp
  95. mvn clean package # The jar file will be available in the /target directory
  96. ```
  97. #### 3) Configure AI client
  98. Run the JAR as a long-running server:
  99. ```bash
  100. DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN> \
  101. DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID> \
  102. SPRING_PROFILES_ACTIVE=http \
  103. java -jar /absolute/path/to/discord-mcp-1.0.0.jar
  104. ```
  105. > 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.
  106. Default MCP endpoint URL (HTTP profile): `http://localhost:8085/mcp`
  107. </details>
  108. ## 🔗 Connections
  109. ### ► 🗞️ Default config.json Connection
  110. Recommended (HTTP singleton mode):
  111. ```json
  112. {
  113. "mcpServers": {
  114. "discord-mcp": {
  115. "url": "http://localhost:8085/mcp"
  116. }
  117. }
  118. }
  119. ```
  120. Legacy mode (stdio, starts a new process/container per client session):
  121. ```json
  122. {
  123. "mcpServers": {
  124. "discord-mcp": {
  125. "command": "docker",
  126. "args": [
  127. "run",
  128. "--rm",
  129. "-i",
  130. "-e",
  131. "DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
  132. "-e",
  133. "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
  134. "saseq/discord-mcp:latest"
  135. ]
  136. }
  137. }
  138. }
  139. ```
  140. <details>
  141. <summary style="font-size: 1.35em; font-weight: bold;">
  142. ⌨️ Claude Code Connection
  143. </summary>
  144. Recommended (HTTP singleton mode):
  145. ```bash
  146. claude mcp add discord-mcp --transport http http://localhost:8085/mcp
  147. ```
  148. Legacy mode (stdio, starts a new process/container per client session):
  149. ```bash
  150. 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
  151. ```
  152. </details>
  153. <details>
  154. <summary style="font-size: 1.35em; font-weight: bold;">
  155. 🤖 Codex CLI Connection
  156. </summary>
  157. ```bash
  158. codex mcp add discord-mcp --url http://localhost:8085/mcp
  159. codex mcp list
  160. ```
  161. </details>
  162. <details>
  163. <summary style="font-size: 1.35em; font-weight: bold;">
  164. 🦞 OpenClaw Connection
  165. </summary>
  166. Run this command:
  167. ```bash
  168. openclaw mcp set discord-mcp '{"url":"http://localhost:8085/mcp","transport":"streamable-http"}'
  169. openclaw mcp list
  170. ```
  171. OR
  172. Pasting the following configuration into your OpenClaw `~/.openclaw/config.json` file:
  173. ```json
  174. {
  175. "mcp": {
  176. "servers": {
  177. "discord-mcp": {
  178. "url": "http://localhost:8085/mcp",
  179. "transport": "streamable-http"
  180. }
  181. }
  182. }
  183. }
  184. ```
  185. </details>
  186. <details>
  187. <summary style="font-size: 1.35em; font-weight: bold;">
  188. 🖲 Cursor Connection
  189. </summary>
  190. Go to: `Settings` -> `Cursor Settings` -> `MCP` -> `Add new global MCP server`
  191. 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](https://docs.cursor.com/context/model-context-protocol) for more info.
  192. ```json
  193. {
  194. "mcpServers": {
  195. "discord-mcp": {
  196. "url": "http://localhost:8085/mcp"
  197. }
  198. }
  199. }
  200. ```
  201. </details>
  202. <details>
  203. <summary style="font-size: 1.35em; font-weight: bold;">
  204. 🚀 n8n Connection
  205. </summary>
  206. #### Connect in n8n
  207. 1. Open n8n and add an **MCP Client** node.
  208. 2. Choose **HTTP** or **Streamable HTTP** transport (depending on your n8n version/node options).
  209. 3. Set the server URL to: `http://localhost:8085/mcp`
  210. 4. Save the node and test the connection.
  211. 5. After connecting, you can use the available Discord tools exposed by `discord-mcp` inside your workflow.
  212. #### Notes
  213. - If n8n is running in Docker, `localhost` may point to the n8n container itself, not your host machine.
  214. - In that case, use the Docker service name or another reachable host, for example: `http://discord-mcp:8085/mcp`
  215. </details>
  216. <details>
  217. <summary style="font-size: 1.35em; font-weight: bold;">
  218. 🖥 Claude Desktop Connection
  219. </summary>
  220. STDIO local config (Default, legacy):
  221. > Past the following configuration into your Claude Desktop `claude_desktop_config.json` file.
  222. ```json
  223. {
  224. "mcpServers": {
  225. "discord-mcp": {
  226. "command": "docker",
  227. "args": [
  228. "run",
  229. "--rm",
  230. "-i",
  231. "-e",
  232. "DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>",
  233. "-e",
  234. "DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
  235. "saseq/discord-mcp:latest"
  236. ]
  237. }
  238. }
  239. }
  240. ```
  241. Remote MCP Connector:
  242. 1. Open Claude Desktop and go to `Settings` -> `Connectors`.
  243. 2. Add a custom connector and set MCP URL to your server endpoint (for example `https://<PUBLIC_HOST>/mcp`).
  244. 3. Save and reconnect.
  245. > Claude Desktop remote connectors are managed via Connectors UI (not `claude_desktop_config.json`).
  246. > `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).
  247. </details>
  248. ## 🛠️ Available Tools
  249. #### Server Information
  250. - [`get_server_info`](): Get detailed discord server information
  251. #### User Management
  252. - [`get_user_id_by_name`](): Get a Discord user's ID by username in a guild for ping usage `<@id>`
  253. - [`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
  254. - [`search_members`](): Search Discord guild members by ID, username, global name, nickname, or effective name and return identity candidates with stable user IDs
  255. - [`send_private_message`](): Send a private message to a specific user
  256. - [`edit_private_message`](): Edit a private message from a specific user
  257. - [`delete_private_message`](): Delete a private message from a specific user
  258. - [`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`)
  259. #### Message Management
  260. - [`send_message`](): Send a message to a specific channel
  261. - [`edit_message`](): Edit a message from a specific channel
  262. - [`delete_message`](): Delete a message from a specific channel
  263. - [`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`)
  264. - [`search_messages`](): Search the most recent messages of a channel or thread for text (case-insensitive scan of up to 1000 messages, newest first)
  265. - [`add_reaction`](): Add a reaction (emoji) to a specific message
  266. - [`remove_reaction`](): Remove a specified reaction (emoji) from a message
  267. - [`get_message`](): Get a single message by ID in the same format as `read_messages`; replies include the message they reply to
  268. - [`get_message_replies`](): Find replies to a message by scanning the messages posted after it (up to 1000)
  269. #### Channel Management
  270. - [`create_text_channel`](): Create a new text channel
  271. - [`edit_text_channel`](): Edit settings of a text channel (name, topic, nsfw, slowmode, category, position)
  272. - [`delete_channel`](): Delete a channel
  273. - [`find_channel`](): Find a channel type and ID using name and server ID
  274. - [`list_channels`](): List of all channels
  275. - [`get_channel_info`](): Get detailed information about a channel
  276. - [`move_channel`](): Move a channel to another category and/or change its position
  277. #### Category Management
  278. - [`create_category`](): Create a new category for channels
  279. - [`edit_category`](): Edit a category (rename or move position)
  280. - [`delete_category`](): Delete a category
  281. - [`find_category`](): Find a category ID using name and server ID
  282. - [`list_channels_in_category`](): List of channels in a specific category
  283. #### Webhook Management
  284. - [`create_webhook`](): Create a new webhook on a specific channel
  285. - [`delete_webhook`](): Delete a webhook
  286. - [`list_webhooks`](): List of webhooks on a specific channel
  287. - [`send_webhook_message`](): Send a message via webhook
  288. #### Role Management
  289. - [`list_roles`](): Get a list of all roles on the server with their details
  290. - [`create_role`](): Create a new role on the server
  291. - [`edit_role`](): Modify an existing role's settings
  292. - [`delete_role`](): Permanently delete a role from the server
  293. - [`assign_role`](): Assign a role to a user
  294. - [`remove_role`](): Remove a role from a user
  295. #### Moderation and User Management
  296. - [`kick_member`](): Kicks a member from the server
  297. - [`ban_member`](): Bans a user from the server
  298. - [`unban_member`](): Removes a ban from a user
  299. - [`timeout_member`](): Disables communication for a member for a specified duration
  300. - [`remove_timeout`](): Removes a timeout (unmute) from a member before it expires
  301. - [`set_nickname`](): Changes a member's nickname on the server
  302. - [`get_bans`](): Returns a list of banned users on the server with ban reasons
  303. #### Voice & Stage Channel Management
  304. - [`create_voice_channel`](): Create a new voice channel in a guild
  305. - [`create_stage_channel`](): Create a new stage channel for audio events
  306. - [`edit_voice_channel`](): Edit settings of a voice or stage channel (name, bitrate, user limit, region)
  307. - [`move_member`](): Move a member to another voice channel
  308. - [`disconnect_member`](): Disconnect a member from their current voice channel
  309. - [`modify_voice_state`](): Server mute or deafen a member in voice channels
  310. #### Scheduled Events Management
  311. - [`create_guild_scheduled_event`](): Schedule a new event on the server (voice, stage, or external)
  312. - [`edit_guild_scheduled_event`](): Modify event details or change its status (start, complete, cancel)
  313. - [`delete_guild_scheduled_event`](): Permanently delete a scheduled event
  314. - [`list_guild_scheduled_events`](): List all active and scheduled events on the server
  315. - [`get_guild_scheduled_event_users`](): Get list of users interested in a scheduled event
  316. #### Channel Permission Overwrites
  317. - [`list_channel_permission_overwrites`](): List all permission overwrites for a channel with role/member breakdown
  318. - [`upsert_role_channel_permissions`](): Create or update permission overwrite for a role on a channel
  319. - [`upsert_member_channel_permissions`](): Create or update permission overwrite for a member on a channel
  320. - [`delete_channel_permission_overwrite`](): Delete a permission overwrite for a role or member from a channel
  321. #### Invite Management
  322. - [`create_invite`](): Create a new invite link for a specific channel
  323. - [`list_invites`](): List all active invites on the server with their statistics
  324. - [`delete_invite`](): Delete (revoke) an invite so the link stops working
  325. - [`get_invite_details`](): Get details about a specific invite (works for any public invite)
  326. #### Thread Management
  327. - [`list_active_threads`](): List all active threads in the server
  328. - [`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)
  329. - [`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)
  330. #### Forum Management
  331. - [`create_forum_channel`](): Create a new forum channel
  332. - [`edit_forum_channel`](): Edit settings of a forum channel (name, topic, nsfw, slowmode, category, position, default sort, default layout)
  333. - [`list_forum_channels`](): List all forum channels in the server
  334. - [`get_forum_channel_info`](): Get detailed information about a forum channel including tags and settings
  335. - [`list_forum_tags`](): List all available tags in a forum channel
  336. - [`create_forum_post`](): Create a new forum post (thread) with an initial message in a forum channel
  337. - [`list_forum_posts`](): List active posts (threads) in a forum channel
  338. - [`modify_forum_post`](): Modify a forum post: lock/unlock, archive/unarchive, pin/unpin, or change applied tags
  339. #### Emoji Management
  340. - [`list_emojis`](): List all custom emojis on the server
  341. - [`get_emoji_details`](): Get detailed information about a specific custom emoji
  342. - [`create_emoji`](): Upload a new custom emoji to the server (base64 or image URL, max 256KB)
  343. - [`edit_emoji`](): Edit an existing emoji's name or role restrictions
  344. - [`delete_emoji`](): Permanently delete a custom emoji from the server
  345. >If `DISCORD_GUILD_ID` is set, the `guildId` parameter becomes optional for all tools above.
  346. <hr>
  347. A more detailed examples can be found in the [Wiki](https://github.com/SaseQ/discord-mcp/wiki).

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If it’s helped, pass it on.