Get the FREE Ultimate OpenClaw Setup Guide →

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.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio saseq-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

How to use

This MCP server exposes a suite of Discord automation tools via the Model Context Protocol. Through the Discord MCP, you can manage server information, users, channels, categories, webhooks, messages, and roles directly from MCP-compatible clients or AI assistants. Each tool is invoked with a clear function name such as get_server_info, send_message, create_text_channel, or assign_role, enabling tasks like fetching server details, sending messages to channels, creating channels or roles, and moderating content. If you provide a guildId (DISCORD_GUILD_ID) as an environment variable or as a parameter to tools, many operations can target a specific Discord server by default, simplifying repetitive tasks across a workflow.

How to install

Prerequisites:

  • Docker installed and running on your host
  • Access to a Discord bot token with appropriate permissions (DISCORD_TOKEN)

Step 1: Pull and run the MCP server with Docker

  • Ensure you have your Discord bot token ready.
  • Replace <YOUR_DISCORD_BOT_TOKEN> with your actual token (and <OPTIONAL_DEFAULT_SERVER_ID> if you want a default guild).

Command to run:

docker run --rm -i
-e DISCORD_TOKEN=<YOUR_DISCORD_BOT_TOKEN>
-e DISCORD_GUILD_ID=<OPTIONAL_DEFAULT_SERVER_ID>
saseq/discord-mcp:latest

Step 2: Verify the server is accessible

  • Use your MCP client to connect to the server name mcp-server and ensure tools such as get_server_info or send_message respond as expected.

Step 3: Optional manual installation methods (alternative):

  • OpenClaw or Cursor can be configured to point to the same docker image with the same environment variables.
  • For Claude Code or other editors, use the provided docker run command in your configuration.

Additional notes

Notes and tips:

  • DISCORD_TOKEN is required; without a valid token, the MCP server cannot authenticate with Discord.
  • DISCORD_GUILD_ID is optional but recommended if you frequently work with a single server; it makes guildId implicit for applicable tools.
  • The Docker image saseq/discord-mcp:latest is the recommended deployment method, but you can also adapt the configuration for other MCP runners that support Docker-based commands.
  • If you encounter connectivity or permission issues, ensure your bot has the necessary intents and permissions for the actions you intend (reading messages, sending messages, managing channels, etc.).
  • When using OpenClaw, Cursor, or Claude Code integrations, the same environment variables should be supplied in their respective configuration formats to ensure consistent behavior.

Related MCP Servers

Sponsor this space

Reach thousands of developers