mcp-discord
Implement Discord MCP server enabling AI assistants to interact with the Discord platform.
claude mcp add --transport stdio barryyip0625-mcp-discord node path/to/mcp-discord/build/index.js \ --env DISCORD_TOKEN="your_discord_bot_token"
How to use
MCP-Discord is a Mongo-like MCP (Model Context Protocol) server that bridges AI assistants with Discord. It authenticates with a Discord bot token and exposes a set of tools to login, list servers, read and send messages, manage channels, threads, webhooks, and reactions, and perform forum-related actions. The server supports two transport modes: the standard stdio transport for simple integrations and a streamable HTTP transport for stateless, network-based usage. Use the commands exposed by the MCP interface to interact with Discord via AI prompts or automation tasks. The README provides concrete JSON examples showing how to invoke the server in Claude or Cursor environments, and how to run it directly via Node or Docker.
Common capabilities include:
- discord_login and discord_list_servers for authentication and discovery of accessible guilds
- discord_send to post messages to channels (by ID or name)
- channel management (create/delete text channels, manage threads)
- forum operations (create/delete posts, replies, and retrieve forum lists)
- message retrieval, read/delete, and reactions handling
- webhook creation and management
To start using it, provide your Discord bot token (DISCORD_TOKEN) either as an environment variable or via a CLI/config option, then choose your transport (stdio or http) and connect your MCP client accordingly. The examples show both Node-based execution and containerized usage, including how Claude/Cursor can invoke the server via JSON-config fragments.
How to install
Prerequisites:
- Node.js v16 or higher
- npm v7 or higher
- A Discord bot with the necessary permissions (including Message Content Intent and presence/server member intents as appropriate)
- Access to a terminal or shell where you can run commands
Install via NPM (recommended for development or local use):
# Install the package (if you prefer running directly from source, clone the repo and run npm install there)
npm install -g mcp-discord
# Run the server (stdio transport by default; supply DISCORD_TOKEN env var)
DISCORD_TOKEN=your_discord_bot_token npx mcp-discord
Install via Smithery (as described in the README):
# Open Smithery URL for the project (no CLI steps shown here; follow the README guidance)
Manual Docker setup (alternative to npm/npx):
# Pull the image
docker pull barryy625/mcp-discord:latest
# Run with token (stdio default)
docker run -e DISCORD_TOKEN=your_discord_bot_token barryy625/mcp-discord:latest
# Or run with HTTP transport on a specific port
docker run -e DISCORD_TOKEN=your_discord_bot_token -p 8080:8080 barryy625/mcp-discord:latest --transport http --port 8080
Build from source (if you clone the repo):
# Clone the repository
git clone https://github.com/barryyip0625/mcp-discord.git
cd mcp-discord
# Install dependencies
npm install
# Compile TypeScript if applicable
npm run build
Additional notes
Environment and configuration tips:
- Always supply DISCORD_TOKEN securely (environment variables are recommended).
- If using HTTP transport, ensure the port you specify is open in your firewall and mapped correctly when running in containers.
- The mcp-config snippet can be adapted to cloud or CI environments by replacing token strings with secret managers where supported.
- When running via Docker, the container defaults to stdio transport; to enable HTTP, add --transport http and --port <port> to the command.
- If you encounter rate limits or permission errors, verify the bot's permissions in the target server and ensure the required intents are enabled in the Discord Developer Portal.
- The Discord bot must be invited to target servers to access data; without being added to a server, the bot cannot retrieve lists or messages from that server.
Related MCP Servers
mcp-graphql
Model Context Protocol server for GraphQL
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-google-map
A powerful Model Context Protocol (MCP) server providing comprehensive Google Maps API integration with LLM processing capabilities.
systemprompt-code-orchestrator
MCP server for orchestrating AI coding agents (Claude Code CLI & Gemini CLI). Features task management, process execution, Git integration, and dynamic resource discovery. Full TypeScript implementation with Docker support and Cloudflare Tunnel integration.
pluggedin-app
The Crossroads for AI Data Exchanges. A unified, self-hostable web interface for discovering, configuring, and managing Model Context Protocol (MCP) servers—bringing together AI tools, workspaces, prompts, and logs from multiple MCP sources (Claude, Cursor, etc.) under one roof.
rohlik
MCP server that lets you shop groceries across the Rohlik Group platforms (Rohlik.cz, Knuspr.de, Gurkerl.at, Kifli.hu, Sezamo.ro)