
Discord
io.github.willuhmjsv1.1.1更新于 Oct 3, 2026
Discord for LLM agents: 168 tools for messages, moderation, channels, roles, threads and AutoMod.
概览
让助手通过 168 个工具管理 Discord 服务器,涵盖消息、审核、频道、角色、子区、事件、邀请、Webhook 和 AutoMod。
- 功能
- 提供 168 个 Discord 工具,覆盖消息、审核、频道、角色、子区、事件、邀请、Webhook 和 AutoMod。富消息支持嵌入、Components V2、投票、文件和回复,并在发送到 Discord 前校验,错误会指出有问题的字段。交互角色菜单在重启后仍然有效,并记录谁点击了什么。可通过 stdio 或本地 HTTP 端点运行。
- 适用场景
- 适合让助手管理或审核 Discord 服务器:发布和编辑消息、处理角色和频道、运行子区和事件,或配置 AutoMod。它面向机器人驱动的服务器管理,而不是随意读取聊天内容。
- 运行要求
- 使用 npx 需要 Node.js 22+,HTTP 模式可用 Docker。需要 DISCORD_TOKEN 中的机器人令牌,并将机器人以启用 Message Content 意图的方式邀请到服务器。DISCORD_GUILD_ID 设置默认服务器。ENABLE_MEMBERS_INTENT 启用成员列表工具。HTTP 模式默认绑定 127.0.0.1:8085。
安装
在 SourceWeft 中
- 打开 控制台中的 Discord,将其添加到工作区。
- 为需要使用其工具的对话启用该服务。
Desktop only,通过 STDIO。 STDIO 服务会启动本地进程,因此需要 SourceWeft 桌面宿主。
其他 MCP 客户端
参照 仓库 中的启动说明。
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
来源:README.md,提交 68549cf
工具
0版本历史
1- v1.1.1最新Oct 3, 2026


