Discord MCP
Enables 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.
README
Discord MCP
Repository: github.com/sandraschi/discord-mcp
FastMCP 3.1 Discord MCP server with sampling (server-side Ollama / OpenAI-compatible or client LLM), agentic workflow (discord_agentic_workflow), skills (SkillsDirectoryProvider + skill://…/SKILL.md), prompts, and a 2026 fleet-style dashboard (React + Vite + Tailwind, dark glass shell).
Ports
- Backend: 10756 — REST (
/api/v1/…) + MCP streamable HTTP at/mcp - Frontend: 10757
Setup
- Create a bot at Discord Developer Portal. Copy the bot token.
- Invite the bot to your server (OAuth2 URL Generator, scope:
bot). - Copy
.env.exampleto.envin the repo root (discord-mcp/.env) and setDISCORD_TOKEN=...(no quotes). The backend loads this file on startup (python-dotenv). Restart the server after changing.env. If the token is already set in the system environment or Cursor MCPenv, that value wins (.envdoes not override existing vars). - For local agentic sampling (when the MCP host does not provide sampling): run Ollama and optionally set
DISCORD_SAMPLING_BASE_URL/DISCORD_SAMPLING_MODEL. SetDISCORD_SAMPLING_USE_CLIENT_LLM=1if you want the host LLM to sample and the server handler only as fallback.
Run
- Webapp (backend + dashboard): from repo root run
.\start.ps1orstart.bat, or fromwebapp/:.\start.ps1. - Backend only:
uv run python -m discord_mcp.server --mode dual --port 10756 - Stdio (MCP only):
uv run python -m discord_mcp.server --mode stdio
Cursor MCP
- This repo as workspace root:
.cursor/mcp.jsonregisters discord-mcp (stdio). SetDISCORD_TOKENin that file’senvor rely on your shell environment. Reload MCP / restart Cursor after edits. - Global / multi-root merge: copy the
discord-mcpblock fromcursor-config-template.jsoninto your user MCP JSON (Windows:%USERPROFILE%\.cursor\mcp.json). Adjustcwdto your clone path if you are not using the defaultD:/Dev/repos/discord-mcp.
MCP HTTP (remote / Inspector)
- Endpoint:
http://localhost:10756/mcp(streamable HTTP, FastMCP 3.1) - Discovery / manifest:
GET /api/v1/meta - Health:
GET /api/v1/health(includes sampling status)
Tools
- discord(operation=…) — Portmanteau:
list_guilds,list_channels,send_message,get_messages,get_guild_stats,create_channel,create_guild,create_invite,list_invites,revoke_invite,list_members,get_member,list_active_threads,rag_ingest,rag_query.create_guildrequires user OAuth2 (bot 403).list_members/get_memberrequire GUILD_MEMBERS intent. - discord_help(category=…, topic=…) — Multi-level help.
- discord_agentic_workflow(goal, ctx) — High-level goal via
ctx.sample+ tools (SEP-1577). Returns a structured dict (success,message,recommendationsor error fields).
Prompts (registered)
discord_quick_start, discord_diagnostics, discord_moderation_playbook, discord_rag_workflow, discord_invite_operations
Skills
Bundled under src/discord_mcp/skills/<name>/SKILL.md, exposed as MCP resources (skill://…). Listed in the dashboard under Skills and via GET /api/v1/skills.
Resources
resource://discord-mcp/capabilities— Short capability summary for clients.
API (REST)
GET /api/v1/health— Health, token_set, rate limits, sampling,mcp_http_pathGET /api/v1/meta— Tools, prompts, resources, skills root, samplingGET /api/v1/skills— Bundled skill previews (dashboard)GET /api/v1/guilds— List guilds (proxy to tool)GET /api/v1/guilds/{guild_id}/channels— List channels- (See OpenAPI at
/docsfor full list.)
Discord HTTP 429 (API rate limits)
Discord enforces per-route limits on the REST API. On HTTP 429, the server now waits for retry_after (from the response body or Retry-After header) and retries the same request up to 5 times before returning an error. If you still see 429 after that, slow down (e.g. fewer parallel message fetches, smaller RAG ingest batches) or wait a minute—especially if "global": true appears in Discord’s response (rare; indicates a broader limit).
Safety and rate limits (anti-spam)
Write operations are rate-limited so the bot is not usable as a spambot:
- Messages: max 10/min global, max 3/min per channel, min 5s between sends (configurable).
- Channels: max 5 created per minute.
- Invites: max 5 created per minute (
DISCORD_RATE_LIMIT_INVITES_PER_MINUTE). - Message length: capped at 2000 (Discord max); override with
DISCORD_MAX_MESSAGE_LENGTH.
Env: DISCORD_RATE_LIMIT_MESSAGES_PER_MINUTE, DISCORD_RATE_LIMIT_MESSAGES_PER_CHANNEL_PER_MINUTE, DISCORD_RATE_LIMIT_CHANNELS_PER_MINUTE, DISCORD_MAX_MESSAGE_LENGTH, DISCORD_MIN_MESSAGE_INTERVAL_SECONDS. When a limit is hit, the tool returns success: false, rate_limited: true, and an explanatory error. Current config is in GET /api/v1/health under rate_limit.
Documentation
- docs/README.md — doc index
- docs/TECHNICAL.md — architecture, env, Discord 429, MCP
/mcp - CHANGELOG.md — release notes
Standards
- FastMCP 3.1: instructions, sampling handler, skills provider, strict validation, streamable HTTP mount.
- Webapp:
start.ps1, ports 10756/10757, dark glass layout, top bar status, activity log, Tools / Skills / Apps pages.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。