
Discord
io.github.willuhmjsv1.1.1Updated Oct 3, 2026
Discord for LLM agents: 168 tools for messages, moderation, channels, roles, threads and AutoMod.
Overview
Lets an assistant operate a Discord server through 168 tools for messages, moderation, channels, roles, threads, events, invites, webhooks and AutoMod.
- What it does
- Exposes 168 Discord tools covering messages, moderation, channels, roles, threads, events, invites, webhooks and AutoMod. Rich messages support embeds, Components V2, polls, files and replies, validated before reaching Discord with errors naming the bad field. Interaction role menus survive restarts and log who clicked what. Runs over stdio or a local HTTP endpoint.
- When to use it
- Use it when an assistant should manage or moderate a Discord server: posting and editing messages, handling roles and channels, running threads and events, or configuring AutoMod. It suits bot-driven server administration rather than casual chat reading.
- Requirements
- Node.js 22+ for npx, or Docker for the HTTP mode. A Discord bot token in DISCORD_TOKEN, plus the bot invited to the server with the Message Content intent enabled. DISCORD_GUILD_ID sets a default server. ENABLE_MEMBERS_INTENT enables member-list tools. HTTP mode binds 127.0.0.1:8085 by default.
Installation
In SourceWeft
- Open Discord in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
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, ...):
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:
Docker — a long-running HTTP server at http://127.0.0.1:8085/mcp:
Requires Node.js 22+ for npx.
Configuration
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:
The 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
A 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
Source: README.md at commit 68549cf
Tools
0Version history
1- v1.1.1LatestOct 3, 2026


