Discord MCP Server

Author:@v-3
View on GitHub

Overview

The Discord MCP Server is a tool built on the Model Context Protocol (MCP). It enables large language models (LLMs), such as Claude, to connect with and interact directly with Discord channels. This allows the LLMs to send and read messages through the Discord API, with a focus on maintaining user control and security.

To get started, clone the project's repository and install its dependencies. You must then set up your Discord bot token within a .env file. Finally, integrate the configured server into your Claude for Desktop application to begin using it.

Key functionalities include sending messages to Discord channels and reading recent channel history. It features automatic discovery of accessible servers and channels, supports targeting channels by either their name or ID, and includes robust error handling and input validation.

This server is useful for scenarios where an LLM needs to participate in Discord conversations by reading and replying to messages. It can also automate the sending of announcements or reminders. Essentially, it facilitates interactive dialogues between users and an LLM within the Discord platform.

A prerequisite for using the server is having Node.js 16.x or a newer version installed, along with a Discord bot token granted the appropriate permissions. The server is compatible with any LLM that can be configured to work with an MCP server. For reading messages, there is a default limit of 50 messages per request, with a maximum allowable limit of 100.