Discord MCP MCP Server
Run a Discord server from your AI assistant, 30+ actions in one tool
About
Run a Discord server from an AI assistant. 30+ actions (channels, messages, roles, members, moderation) behind one hierarchical MCP tool, so the agent reads and writes Discord without a separate tool definition per action. Needs a Discord bot token with the relevant intents enabled in the Developer Portal.
Security Report
This is a legitimate Discord moderation bridge that reads its bot token from an environment variable and sends data only to the Discord API, with no exfiltration or malicious code found. The main concerns are that the README tells users to grant the bot Administrator permission, which far exceeds what most actions need, and that destructive actions such as ban, kick, bulk delete, channel deletion and role assignment are exposed with no confirmation or allowlist, so prompt injection from channel content could trigger them. Webhook URLs, which act as credentials, are also returned to the model. Supply chain analysis found 1 known vulnerability in dependencies (0 critical, 1 high severity). Package verification found 1 issue.
3 files analyzed · 10 issues found
Security scores are indicators to help you make informed decisions, not guarantees. Always review permissions before connecting any MCP server.
Permissions Required
This plugin requests these system permissions. Most are normal for its category.
What You'll Need
Set these up before or after installing:
Environment variable: bot_token
Sign up freeHow to Install
Add this to your MCP configuration file:
{
"mcpServers": {
"discord-mcp": {
"env": {
"bot_token": "your-bot-token-here"
},
"args": [
"-y",
"@spranab/discord-mcp"
],
"command": "npx"
}
}
}Getting Started
Once installed, try these example prompts and explore these capabilities:
- 1"Post an announcement in the #updates channel"
- 2"List all members who joined this week"
- 3Tool: discord: one hierarchical tool covering 30+ Discord actions
Documentation
View on GitHubFrom the project's GitHub README.
Moderating a Discord server means clicking: open the server, find the channel, scroll for the message, open the member list, apply the timeout, write the note somewhere. Every Discord MCP server that exposes one tool per operation also costs you thousands of tokens of context before the model reads your question.
This one gives an AI assistant the whole server — 30+ actions across messages,
channels, roles, members, moderation, threads, webhooks, invites, emojis and
the audit log — behind a single discord tool with three-level discovery,
so the model pays for the actions it uses and nothing else.
Install (60 seconds)
Claude Code — add to your .mcp.json:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@spranab/discord-mcp"],
"env": { "bot_token": "YOUR_BOT_TOKEN" }
}
}
}
Need a bot token? See Discord Bot Setup below — about two minutes in the Developer Portal.
What it looks like
You: "Someone's spamming #general. Clear the last 20 messages there, time that user out for an hour, and log it for the mods."
→ discord(category: "messages", action: "bulk_delete",
params: { channel_id: "9876...", count: 20 })
→ discord(category: "moderation", action: "timeout",
params: { guild_id: "1234...", user_id: "5555...",
duration_minutes: 60, reason: "Spam in #general" })
→ discord(category: "messages", action: "send",
params: { channel_id: "4321...",
content: "Timed out spammer (1h), cleared 20 messages in #general" })
The model found bulk_delete and timeout by calling discord() and then
discord(category: "moderation") — it never had 30+ tool schemas sitting in
its prompt. Channel and user IDs come from channels: list and
members: list in the same way.
Features
One discord tool with 11 categories and 30+ actions:
| Category | Actions | Description |
|---|---|---|
| server | list, info | List servers, get server details |
| channels | list, create, edit, delete | Full channel management |
| messages | send, read, edit, delete, bulk_delete, pin, react, search | Send, read, moderate messages |
| roles | list, create, edit, delete, assign | Role CRUD + assignment |
| members | list, info, nickname | Member listing and management |
| moderation | kick, ban, unban, timeout, list_bans | Server moderation |
| threads | create | Thread creation |
| webhooks | list, create | Webhook management |
| invites | create, list | Invite management |
| emojis | list | Custom emoji listing |
| audit | log | Audit log access |
How It Works
The tool uses 3-level navigation to keep your tool list clean:
discord() → list categories
discord(category="messages") → list actions & params
discord(category="messages", action="send", params={...}) → execute
Other clients
Same JSON shape for Cursor, Windsurf, Claude Desktop and Cline:
{
"mcpServers": {
"discord": {
"command": "npx",
"args": ["-y", "@spranab/discord-mcp"],
"env": {
"bot_token": "YOUR_BOT_TOKEN"
}
}
}
}
Manual
npm install -g @spranab/discord-mcp
Run with bot_token environment variable set:
bot_token=YOUR_BOT_TOKEN discord-mcp
Discord Bot Setup
- Go to the Discord Developer Portal
- Create a new application
- Go to Bot and copy the token
- Enable Privileged Gateway Intents (all three):
- Presence Intent
- Server Members Intent
- Message Content Intent
- Go to Installation > Default Install Settings > Guild Install
- Add the
botscope and selectAdministratorpermissions - Use the install link to add the bot to your server
Tech Stack
- TypeScript
- discord.js v14
- MCP SDK
- Zod for validation
Related projects
Other MCP servers and agent infrastructure by the same author:
- saga-mcp — SQLite-backed project tracker so the agent doesn't lose the plan between sessions.
- yantrikdb-mcp — persistent cognitive memory for Claude Code, Cursor and Windsurf.
- truenas-mcp — 278 TrueNAS SCALE actions behind the same one-tool pattern used here.
- brainstorm-mcp — multi-model debate as an MCP tool.
- swarmcode — real-time channel between Claude Code instances on different machines.
- mcpier — self-hosted MCP control plane that keeps API keys off your clients.
License
MIT — see LICENSE.
Reviews
No reviews yet
Be the first to review this server!
More Communication MCP Servers
Toleno
Freeby Toleno · Developer Tools
Toleno Network MCP Server — Manage your Toleno mining account with Claude AI using natural language.
MCP Marketplace
Freeby mcp-marketplace · Developer Tools
Search and install MCP servers from inside your AI client.
mcp-creator-python
Freeby mcp-marketplace · Developer Tools
Create, build, and publish Python MCP servers to PyPI — conversationally.
by Lharries · Communication
Read, search, and send WhatsApp messages through your AI assistant
FinAgent
Freeby mcp-marketplace · Finance
Free stock data and market news for any MCP-compatible AI assistant.
Memory
Freeby Modelcontextprotocol · Productivity
Knowledge graph-based persistent memory across sessions