discord-mcp
Exposes the Discord API to LLM agents, providing a full guild surface: sending and managing messages (rich embeds, Components V2, polls, files, replies, forwards, stickers, reactions, pins, search), channels, categories and permission overwrites, threads, forum posts, members and moderation (kick/ban/timeouts), roles, AutoMod rules, invites, webhooks, emoji/stickers/soundboard, scheduled events, audit log, and welcome screen/onboarding/widgets/templates. Also handles interactive components with restart-safe role menus and an interaction log the agent can read.
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.
discord-mcp
An MCP server that lets an LLM run a Discord server: 168 tools for messages, moderation, channels, roles, threads, events, invites, webhooks, AutoMod and more. Works with Claude, Cursor, VS Code, or any MCP client.
Rich messages: embeds, Components V2, polls, files, replies — validated before they reach Discord, with errors that name the bad field.
Interactions: role menus that survive restarts, plus a log of who clicked what.
Secure by default: binds to
127.0.0.1, SSRF-guarded URL fetching, webhook tokens never echoed.
Quick start
Create a bot in the developer portal, invite it to your server, and enable the Message Content intent (Bot → Privileged Gateway Intents).
Add this to your MCP client's config (
mcp.json,claude_desktop_config.json,.cursor/mcp.json, ...):
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@willuhmjs/discord-mcp", "--stdio"],
"env": {
"DISCORD_TOKEN": "your-bot-token",
"DISCORD_GUILD_ID": "your-server-id"
}
}
}
}VS Code uses "servers" instead of "mcpServers". On Windows, if the client can't find npx, use
"command": "cmd" with "args": ["/c", "npx", "-y", "@willuhmjs/discord-mcp", "--stdio"].
Claude Code — one command:
claude mcp add discord -e DISCORD_TOKEN=... -e DISCORD_GUILD_ID=... -- npx -y @willuhmjs/discord-mcp --stdioDocker — a long-running HTTP server at http://127.0.0.1:8085/mcp:
docker run --rm -e DISCORD_TOKEN=... -p 127.0.0.1:8085:8085 ghcr.io/willuhmjs/discord-mcpRequires Node.js 22+ for npx.
Related MCP server: Discord MCP Server
Configuration
Variable | Default | Meaning |
| — (required) | Bot token. |
| — | Default server for tools when |
| off | Enables the privileged Server Members intent (also enable it in the portal). Member-list tools need it. |
|
|
|
|
| HTTP bind address and port. |
| — | Listen on a Unix socket instead of |
In HTTP mode, POST /mcp serves MCP (stateful sessions via Mcp-Session-Id) and GET /health returns
200 once the bot is connected.
Keeping the HTTP endpoint private
The HTTP endpoint has no authentication: anyone who can reach it can use every tool as the bot. Keep it on loopback or a private network. On a shared machine, other accounts can still reach a loopback port, so use a Unix socket that only you can open:
mkdir -m 700 ~/.mcp
MCP_SOCKET=~/.mcp/discord.sock DISCORD_TOKEN=... npx @willuhmjs/discord-mcp
curl --unix-socket ~/.mcp/discord.sock http://localhost/healthThe socket is created with mode 600. Avoid network file systems such as NFS. The Docker image binds
0.0.0.0, so keep that container on an internal network. stdio mode has no network exposure at all.
Tools
Every tool, with its parameters and the Discord permission it needs, is listed in
docs/TOOLS.md, along with the
conventions (string IDs, JSON-string payloads, reason for the audit log) and message/component formats.
Security
Every URL a tool fetches (emoji, stickers, files, avatars) goes through one guarded fetcher: http/https only, private/loopback/metadata IPs blocked before the request and after every redirect, size and time limits.
Webhook tokens are credentials:
create_webhookreturns the URL once, and no list/get tool shows it.No tool reads the server's filesystem.
Development
npm ci
npm run build # tsc -> dist/
npm test # vitest, no Discord token needed
npm run typecheckA contract test locks every tool name and parameter set against tests/fixtures/tool-contract.json.
TESTING.md is the manual checklist for a run in a real test server.
Releases are automated: commits on main using Conventional Commits
(feat:, fix:, feat!:) feed a release PR; merging it publishes to npm, the MCP Registry and GHCR.
License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Build and change Discord bots by describing them: slash commands, events, embeds, modals and data.
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Discord MCP server for ChatGPT, Claude and any AI agent: list servers and channels, read channel messages, search messages, send message, reply to message, send DM, read mentions and assign role in your own Discord account. Cotlet works in the account through your Cloud Browser, a real Chrome where you sign in to Discord yourself; Cotlet does not store your password and you need no Discord API key. About the official Discord API: Yes, Discord has an official API for bots and OAuth2 apps, but it acts as a bot that a server manager adds, not as you, and Discord has no official MCP server for it (checked 5 Nov 2026). The MCP server on Discord's docs site only searches documentation. Setup and FAQ: https://cotlet.dev/integrations/discord-api-mcp-server
Run Discord forms, surveys, polls and quizzes from your AI app: build, launch and analyze projects.
Related MCP Servers
- AlicenseNot gradedqualityBmaintenanceEnables comprehensive interaction with Discord servers to manage guilds, channels, messages, and members through an agentic workflow. It supports RAG capabilities, rate-limited message operations, and includes a React-based dashboard for monitoring and configuration.2MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to manage Discord servers through natural language, offering tools for guilds, channels, messages, roles, members, webhooks, invites, and automations. Includes a conversational agent that responds to @mentions in Discord.10Apache 2.0
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to send and read messages in Discord channels, manage servers, channels, and roles via Discord's API.19 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to read messages, discover channels, send messages, and monitor Discord communities using the Discord HTTP API.-