📖 Description
以下摘录自该仓库的 README(片段) · 在 GitHub 读完整 README →
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
> [!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
Default MCP endpoint URL (HTTP profile): http://localhost:8085/mcp
🐋 Docker Compose Installation
1) Clone the repository
2) Go to the project directory
3) Create local runtime env
4) Start one shared MCP server container
5) Verify
> [!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
🔧 Manual Installation
1) Clone the repository
2) Build the project
> NOTE: Maven installation is required to use the mvn command. Full instructions can be found here.
3) Configure AI client
Run the JAR as a long-running server:
> 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
🔗 Connections
► 🗞️ Default config.json Connection
Recommended (HTTP singleton mode):
Legacy mode (stdio, starts a new process/container per client session):
⌨️ Claude Code Connection
Recommended (HTTP singleton mode):
Legacy mode (stdio, starts a new process/container per client session):
🤖 Codex CLI Connection
🦞 OpenClaw Connection
Run this command:
OR
Pasting the following configuration into your OpenClaw ~/.openclaw/config.json file:
🖲 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.
🚀 n8n Connection
Connect in n8n
1. Open n8n and add an **MCP Client** node.
2. Choose **HTTP** or **Streamable HTTP** transport (depending on your n8n version/node options).
3. Set the server URL to: http://localhost:8085/mcp
4. Save the node and test the connection.
5. After connecting, you can use the available Discord tools exposed by discord-mcp inside your workflow.
Notes
- If n8n is running in Docker, localhost may 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.json file.
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:// /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).