discord-mcp
Enables controlling a Discord bot through MCP, with tools for messaging, channel and thread management, server/member/role administration, moderation, AutoMod, audit logs, emoji and stickers, scheduled events, application commands, interaction responses, gateway events, and webhooks.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@discord-mcpsend a message to #general saying the build passed"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
discord-mcp
Control a Discord bot from an AI model through Model Context Protocol. Each supported Discord operation has its own tool, with validated inputs, structured results and links to the official Discord reference.
The server runs locally over stdio and controls one bot across all the servers it can access. The AI model runs in your MCP client.
Install
Install Node.js 24.17 or newer. Download the .tgz package from GitHub Releases, then install it, replacing VERSION with the downloaded version:
npm install -g ./yoraudev-discord-mcp-VERSION.tgzReleases are published after product changes merge from dev into main. There is no npm registry publication. To build from source:
git clone https://github.com/yoraudev/discord-mcp.git
cd discord-mcp
npm ci
npm run buildRelated MCP server: Agent Construct
Connect
Create an application and bot in the Discord Developer Portal, invite it to your server, and add this entry to your MCP client's configuration:
{
"mcpServers": {
"discord": {
"command": "discord-mcp",
"env": {
"DISCORD_BOT_TOKEN": "YOUR_BOT_TOKEN",
"DISCORD_APPLICATION_ID": "YOUR_APPLICATION_ID"
}
}
}
}For a source checkout, use node as the command and the absolute path to dist/index.js as its argument. Windows clients that cannot resolve a global npm command can also launch node with the installed package's absolute entrypoint. Credentials belong in environment variables. .env is loaded by npm start; other launchers must explicitly pass environment variables or Node's env-file option.
Ask your model to inspect discord_status, list channels, send a message, manage roles, configure application commands, or read events using discord_events_poll. The complete tool catalog is produced from the registered input schemas.
Capabilities
Area | Operations |
Messaging | Messages, replies, forwards, attachments, embeds, components, reactions, pins, polls and bot DMs |
Channels | Text, voice and Stage channel management, forums, media channels, threads, permissions, invites and typing |
Servers | Members, roles, moderation, bans, AutoMod, audit logs, integrations, onboarding, templates and settings |
Assets and events | Guild/application emoji, stickers, scheduled events and Stage instances |
Applications | Global/guild commands, command permissions, interaction responses, metadata, linked roles, identity profiles and supported monetization endpoints |
Gateway | Presence, member requests, channel information, received events, reconnect/resume and connection-gap reports |
Webhooks | Incoming webhooks and an optional signed receiver for Discord application events |
Features remain subject to Discord permissions, role hierarchy, intents, application eligibility and documented API restrictions. See the coverage inventory, setup guide and architecture.
Configuration
Variable | Default | Purpose |
| Required | Bot authentication |
| Detected after login | Application path parameters and OAuth2 client ID |
| Non-privileged messaging, channel and event intents | Comma-separated discord.js intent names; see the setup guide |
|
| Maximum retained events, from 1 to 100000 |
| Unset | Enables optional OAuth2 authorization |
|
| Registered loopback OAuth2 callback |
| Unset | Application Ed25519 public key for webhook verification |
| Unset | Opt-in listener on |
| Unset | Set |
Good to know
Audio connections, playback, recording, receiving, TTS, soundboard and voice messages are excluded. Voice/Stage channel administration and member move/mute/deafen operations are supported.
OAuth2, event history, webhook handles and interaction rules live in memory and reset when the process ends. Keep the MCP client connected to receive events.
Poll with the last returned cursor. A
gapreports overwritten events; cursors from a previous process are rejected. Discord reconnect events report possible delivery gaps.Deferrable interactions are acknowledged automatically. Configure immediate modal/autocomplete rules before users trigger them. Use the interaction handle from the event to edit the original response or send followups.
Webhook tokens returned by Discord are replaced with
webhook_handle; interaction tokens are replaced withinteraction_handle. Handles expire and cannot be reused after a restart.The webhook receiver needs a public HTTPS reverse proxy to reach the local port. Hosting and tunnels are not created by this project.
Development
npm ci
npm run check
npm run docs:generate
npm packUse npm run reference:sync to refresh the ignored official-document cache, then node tools/build-reference.mjs to rebuild the reviewed inventory. Review the inventory and schema overrides before accepting upstream changes. Reference updates must include regenerated documentation and contract tests.
The development guide describes validation, live Discord testing and release setup. Follow AGENTS.md when changing the project.
License
Free to use, modify and redistribute under the project's attribution and origin-preservation conditions. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Context and control for any AI. Agent identity, scoped access, and proof across tools.
A Model Context Protocol server for Wix AI tools
OAuth 2.1 short-link tools for AI agents with scoped tokens, approvals, audit logs, and revocation.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA comprehensive Model Context Protocol server implementation that enables AI assistants to interact with file systems, databases, GitHub repositories, web resources, and system tools while maintaining security and control.18 npm2MIT
- AlicenseNot gradedqualityDmaintenanceModel Context Protocol server that standardizes tool discovery, execution, and context management for AI applications.MIT
- FlicenseNot gradedqualityDmaintenanceEquips AI coding agents with filesystem, Git, database, and computation tools via the Model Context Protocol.1-
- AlicenseNot gradedqualityCmaintenanceEnables developers to build and deploy secure, typed Model Context Protocol servers with tools, resources, prompts, bearer-token authentication, per-tool scopes, rate limiting, and health probes over Streamable HTTP.MIT