discord-mcp
Provides tools for interacting with Discord, enabling AI agents to manage guilds, channels, messages, threads, members, roles, webhooks, and direct messages.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
@echohello/discord-mcp
Discord MCP server for Claude, Codex, OpenCode and other MCP clients. TypeScript, stdio transport, ~22 focused tools covering the 80% of Discord interactions agents actually need.
npm install -g @echohello/discord-mcp
DISCORD_TOKEN=... discord-mcpWhy
The Discord MCP ecosystem has Java servers, Python servers, and 100-tool kitchen sinks. This one is a small, focused TypeScript implementation built on the official discord.js and @modelcontextprotocol/sdk packages. Tight tool surface, strict TypeScript, and explicit intent behind each tool.
Related MCP server: MCP-Discord
Features
22 tools covering guilds, channels, messages, threads, members, roles, webhooks and DMs
Resolve channels/users/roles by ID or name (case-insensitive)
Pagination cursors on message history (
before/after/around)Forum channel support for posts and threads
Webhook send works without bot context (just a webhook URL)
Strict TypeScript, zero
any, runtime input validation withzodSingle binary, single env var (
DISCORD_TOKEN)Optional container image at
ghcr.io/echohello-dev/discord-mcp(multi-arch)
Tools
Tool | Purpose |
| List guilds the bot is a member of |
| Detailed guild info |
| List channels in a guild, optionally filtered by type |
| Resolve a channel by ID or name |
| Detailed channel info |
| List channel categories |
| Create a text channel (requires Manage Channels) |
| Delete a channel |
| Send a message (supports reply + tts) |
| Edit a bot-authored message |
| Delete a message |
| Read message history with pagination |
| React to a message |
| Remove the bot's reaction |
| Create a thread (from message or as a forum post) |
| List active threads (channel-scoped or guild-wide) |
| Reply in a thread |
| List guild members (with optional search) |
| Get a member by ID/name |
| Find a user globally |
| List roles |
| Get a role by ID/name |
| List webhooks on a channel |
| Create a webhook |
| Send a message via webhook URL |
| DM a user |
| Read DM history |
Install
npm install -g @echohello/discord-mcpOr run without installing:
npx @echohello/discord-mcpDocker
Multi-arch image (linux/amd64, linux/arm64) at ghcr.io/echohello-dev/discord-mcp. The container speaks stdio, so wire it into any MCP client the same way you would the binary.
docker pull ghcr.io/echohello-dev/discord-mcp
docker run --rm -i -e DISCORD_TOKEN=your-bot-token ghcr.io/echohello-dev/discord-mcpMCP client configs:
{
"mcpServers": {
"discord": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "DISCORD_TOKEN=your-bot-token", "ghcr.io/echohello-dev/discord-mcp"]
}
}
}Images are tagged on every v*.*.* git tag (see .github/workflows/docker.yml).
Note on visibility: The GHCR package defaults to private on first publish. Flip it to public once via the package settings — the workflow will keep it public on subsequent tags if your token has org admin scope.
Configure your Discord bot
Open https://discord.com/developers/applications and create an application.
Bot tab → Add Bot → Reset Token → copy it.
Bot settings → enable Server Members Intent and Message Content Intent.
OAuth2 → URL Generator → scopes:
bot→ permissions: at minimumView Channels
Send Messages
Read Message History
Add Reactions
Manage Messages (for editing/deleting others)
Manage Channels (for create/delete channel)
Manage Webhooks (for webhook creation)
Open the generated URL to invite the bot.
Configure your MCP client
Claude Desktop (~/Library/Application Support/Claude/claude_desktop_config.json)
{
"mcpServers": {
"discord": {
"command": "discord-mcp",
"env": {
"DISCORD_TOKEN": "your-bot-token",
"DISCORD_GUILD_ID": "optional-default-guild-id"
}
}
}
}Claude Code
claude mcp add discord -- discord-mcp \
-e DISCORD_TOKEN=your-bot-token \
-e DISCORD_GUILD_ID=optional-default-guild-idOpenCode
{
"mcp": {
"discord": {
"type": "stdio",
"command": "discord-mcp",
"env": {
"DISCORD_TOKEN": "your-bot-token",
"DISCORD_GUILD_ID": "optional-default-guild-id"
}
}
}
}Codex
codex mcp add discord -- discord-mcp -e DISCORD_TOKEN=your-bot-tokenEnvironment variables
Variable | Required | Description |
| yes | Bot token from the Discord Developer Portal |
| no | Default guild; makes |
| no | Set to |
Build from source
git clone https://github.com/echohello-dev/discord-mcp
cd discord-mcp
npm install
npm run build
node dist/index.jsDevelopment
npm install
npm run dev # run with tsx (no build)
npm run typecheck # tsc --noEmit
npm test # vitest
npm run build # tsc → dist/Design notes
Single transport (stdio). The MCP world is moving toward streamable HTTP, but stdio still has the lowest friction for local agent integration.
Discord.js v14. Maintained, typed, and the path of least resistance for a Node-native MCP.
Resolvers accept ID or name. Most users say "send to general"; resolvers translate that into the right channel ID. UUIDs always win when present.
Pagination cursors are exposed as
before/after/around. Matches the underlying Discord.js API so advanced callers can compose anything the client can.Forum channels are first-class. Forum posts are just threads with a parent channel of type
GUILD_FORUM, socreate_threadhandles both shapes.Webhooks work standalone.
send_webhook_messageonly needs a webhook URL, not the bot context. Useful for CI/CD alerts.22 tools, deliberately. More tools means more cognitive load on the agent. The cut line: anything where the bot can't act without elevated perms (kick/ban/timeout) and anything that's easy to misfire (mass DMs, role cascades) is intentionally excluded.
Original implementation. Built from scratch on top of the public MCP protocol and public Discord.js API. No code from other Discord MCP implementations.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Build Discord communities with AI: roles, channels, modules, automations and reviewed announcements.
Run Discord forms, surveys, polls and quizzes from your AI app: build, launch and analyze projects.
Messaging tools for AI agents: send messages, manage chats, groups and channels.
Related MCP Servers
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform by managing servers, channels, roles, members, messages, forum posts, reactions, and webhooks.950 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform by managing servers, channels, roles, forum posts, messages, reactions, and webhooks through a Discord bot.950 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with the Discord platform, covering bot login, server and member inspection, message and reaction handling, role management, forum posts, channel and category management, permissions, and webhooks.950 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Discord by managing servers, channels, roles, members, messages, forum posts, reactions, and webhooks.950 npmMIT