discord
An MCP server for interacting with Discord
claude mcp add --transport stdio gustycube-discord-mcp node /path/to/discord-mcp/dist/index.js \ --env ALLOW_GUILD_IDS="123456789,987654321" \ --env ALLOW_CHANNEL_IDS="111111111,222222222" \ --env DISCORD_BOT_TOKEN="your_bot_token_here"
How to use
This MCP server exposes a set of AI-assisted tools that interact with Discord via both REST API calls and real-time Gateway events. By wiring a Discord bot token and configuring allowlists for guilds and channels, you enable secure, granular access to Discord data and actions through declarative tools generated from the API catalog. Developers can route requests through the auto-generated tools to perform tasks such as sending messages, retrieving user or guild info, managing channels, sending rich content, and subscribing to live events. The tooling is designed to minimize accidental exposure (safe defaults, explicit allowlists) while offering a broad surface for automation and AI-assisted workflows.
To use, run the MCP server with a Node.js environment as described in the configuration. The Discord tools expose endpoints and commands that your AI or client can invoke. Ensure your environment variables are set (notably DISCORD_BOT_TOKEN and allowlists) to grant the necessary scope of access. The documentation site linked in the README provides examples, tool references, and security details to help you compose requests, build workflows, and handle events from Discord in real time.
How to install
Prerequisites:
- Node.js (>= 14) and npm installed
- Git installed
- Access to a Discord bot token with the appropriate permissions
Step-by-step:
-
Clone the repository git clone https://github.com/GustyCube/discord-mcp cd discord-mcp
-
Install dependencies npm install
-
Configure environment
- Copy the example env and edit as needed
cp .env.example .env
Set DISCORD_BOT_TOKEN and any ALLOW_* values
- Copy the example env and edit as needed
cp .env.example .env
-
Build and run npm run build npm start
-
Verify the MCP server is running and reachable, then consult the documentation for available tools and usage examples.
Additional notes
Tips and considerations:
- Use allowlists (ALLOW_GUILD_IDS and ALLOW_CHANNEL_IDS) to restrict access to specific Discord guilds and channels for security.
- The tools are generated from a declarative API catalog; new endpoints may appear as the catalog updates. Refer to the documentation for the latest tool set.
- Monitor rate limits and bot permissions in Discord to avoid temporary blocks; ensure the bot has only the necessary permissions.
- If you run in production, consider environment-based configurations and secrets management for DISCORD_BOT_TOKEN.
- The example configuration uses a local path to the built index.js; adjust the path to your deployment layout if different.
Related MCP Servers
discord
A MCP server for the Discord integration. Enable your AI assistants to seamlessly interact with Discord. Enhance your Discord experience with powerful automation capabilities.
mcp-discord
Implement Discord MCP server enabling AI assistants to interact with the Discord platform.
mcp -js
MCP server that exposes YepCode processes as callable tools for AI platforms. Securely connect AI assistants to your YepCode workflows, APIs, and automations.
pinmeto-location
PinMeTo MCP server that enables users with authorized credentials to unlock their data
mcp
Teamwork.com MCP server
alris
Alris is an AI automation tool that transforms natural language commands into task execution.