Discord
saseq/discord-mcp · 310 stars · Java · MIT
MCP server A MCP server for the Discord integration. Enable your AI assistants to seamlessly interact with Discord. Enhance your Discord experience with powerful automation capabilities.
Install
claude mcp add discord-mcp --transport http http://localhost:8085/mcpThese repos do not share one command. When an entry shows a command, it was copied as published. Check the repo's README before you run it.
Files
📖 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
► 🐳 Docker Installation (Recommended)
[!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_IDenv variable is optional. When provided, it sets a default Discord server ID so any tool that accepts aguildIdparameter 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
🐋 Docker Compose Installation
#### 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_CONSOLEmanually. Logging is configured automatically for bothhttpand legacystdiomodes.
Default MCP endpoint URL (HTTP profile): http://localhost:8085/mcp
Health endpoint (Actuator): http://localhost:8085/actuator/health
🔧 Manual Installation
#### 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.
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_IDenvironment variable is optional. When provided, it sets a default Discord server ID so any tool that accepts aguildIdparameter can omit it.
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=<YOUR_DISCORD_BOT_TOKEN>",
"-e",
"DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>",
"saseq/discord-mcp:latest"
]
}
}
}
⌨️ Claude Code Connection
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 CLI Connection
codex mcp add discord-mcp --url http://localhost:8085/mcp
codex mcp list
🦞 OpenClaw Connection
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"
}
}
}
}
🖲 Cursor Connection
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"
}
}
}
🚀 n8n Connection
#### Connect in n8n
- Open n8n and add an MCP Client node.
- Choose HTTP or Streamable HTTP transport (depending on your n8n version/node options).
- Set the server URL to:
http://localhost:8085/mcp - Save the node and test the connection.
- After connecting, you can use the available Discord tools exposed by
discord-mcpinside your workflow.
#### Notes
- If n8n is running in Docker,
localhostmay point to the n8n container itself, not your host machine. - In that case, use the Docker service name or another reachable host, for example:
http://discord-mcp:8085/mcp
🖥 Claude Desktop Connection
STDIO local config (Default, legacy):
Past the following configuration into your Claude Desktop
claude_desktop_config.jsonfile.
{
"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:
- Open Claude Desktop and go to
Settings->Connectors. - Add a custom connector and set MCP URL to your server endpoint (for example
https://<PUBLIC_HOST>/mcp). - Save and reconnect.
Claude Desktop remote connectors are managed via Connectors UI (not
claude_desktop_config.json).http://localhost:8085/mcpis 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
- [
get_server_info](): Get detailed discord server information
#### User Management
- [
get_user_id_by_name](): Get a Discord user's ID by username in a guild for ping usage<@id> - [
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 attachment metadata, supportscount1-100 and optional cursor:beforeorafteroraround)
#### Message Management
- [
send_message](): Send a message to a specific channel - [
edit_message](): Edit a message from a specific channel
Facts
- Kind
- MCP server
- Repo
- saseq/discord-mcp
- Group
- Uncategorized
- Stars
- 310
- License
- MIT
- Language
- Java
- Last push
- 2026-04-25
- Forks
- 105
- Topics
- ai, claude, discord, discord-bot, java, mcp, mcp-server, n8n, openclaw
- 1Everythingmodelcontextprotocol/serversThis MCP server attempts to exercise all the features of the MCP protocol. It is not intended to be a useful server, but rather a test server for builders of MCP clients. It implements prompts, tools, resources, sampling, and more to showcase MCP capabilities.85.8k
- 2Fetchmodelcontextprotocol/serversA Model Context Protocol server that provides web content fetching capabilities. This server enables LLMs to retrieve and process content from web pages, converting HTML to markdown for easier consumption.85.8k
- 3Gitmodelcontextprotocol/serversA Model Context Protocol server for Git repository interaction and automation. This server provides tools to read, search, and manipulate Git repositories via Large Language Models.85.8k
- 4Memorymodelcontextprotocol/serversA basic implementation of persistent memory using a local knowledge graph. This lets Claude remember information about the user across chats.85.8k
- 5Sequential Thinkingmodelcontextprotocol/serversAn MCP server implementation that provides a tool for dynamic and reflective problem-solving through a structured thinking process.85.8k
- 6Timemodelcontextprotocol/serversA Model Context Protocol server that provides time and timezone conversion capabilities. This server enables LLMs to get current time information and perform timezone conversions using IANA timezone names, with automatic system timezone detection.85.8k