Discord MCP
Discord MCP
Repository: github.com/sandraschi/discord-mcp
FastMCP 3.1 Discord MCP-Server mit Sampling (server-seitiges Ollama / OpenAI-kompatibel oder Client-LLM), agentenbasiertem Workflow (discord_agentic_workflow), Skills (SkillsDirectoryProvider + skill:///SKILL.md), Prompts und einem 2026 Fleet-Style Dashboard (React + Vite + Tailwind, dunkles Glas-Design).
Ports
Backend: 10756 REST (
/api/v1/) + MCP streamable HTTP unter/mcpFrontend: 10757
Related MCP server: Discord MCP Server
Einrichtung
Erstellen Sie einen Bot im Discord Developer Portal. Kopieren Sie das Bot-Token.
Laden Sie den Bot auf Ihren Server ein (OAuth2 URL Generator, Scope:
bot).Kopieren Sie
.env.examplenach.envim Repository-Root (discord-mcp/.env) und setzen SieDISCORD_TOKEN=...(ohne Anführungszeichen). Das Backend lädt diese Datei beim Start (python-dotenv). Starten Sie den Server neu, nachdem Sie die.envgeändert haben. Wenn das Token bereits in der Systemumgebung oder in Cursor MCPenvgesetzt ist, hat dieser Wert Vorrang (.envüberschreibt keine bestehenden Variablen).Für lokales agentenbasiertes Sampling (wenn der MCP-Host kein Sampling bereitstellt): Führen Sie Ollama aus und setzen Sie optional
DISCORD_SAMPLING_BASE_URL/DISCORD_SAMPLING_MODEL. Setzen SieDISCORD_SAMPLING_USE_CLIENT_LLM=1, wenn Sie möchten, dass das Host-LLM das Sampling übernimmt und der Server-Handler nur als Fallback dient.
Ausführung
Webapp (Backend + Dashboard): Führen Sie vom Repository-Root aus
.\start.ps1oderstart.bataus, oder vonwebapp/:.\start.ps1.Nur Backend:
uv run python -m discord_mcp.server --mode dual --port 10756Stdio (nur MCP):
uv run python -m discord_mcp.server --mode stdio
Cursor MCP
Dieses Repository als Workspace-Root:
.cursor/mcp.jsonregistriert discord-mcp (stdio). Setzen SieDISCORD_TOKENin derenv-Sektion dieser Datei oder verlassen Sie sich auf Ihre Shell-Umgebung. Laden Sie MCP neu / starten Sie Cursor nach Änderungen neu.Global / Multi-Root-Merge: Kopieren Sie den
discord-mcp-Block auscursor-config-template.jsonin Ihre Benutzer-MCP-JSON (Windows:%USERPROFILE%\.cursor\mcp.json). Passen Siecwdan Ihren Klon-Pfad an, falls Sie nicht den StandardD:/Dev/repos/discord-mcpverwenden.
MCP HTTP (Remote / Inspector)
Endpunkt:
http://localhost:10756/mcp(streamable HTTP, FastMCP 3.1.0)Discovery / Manifest:
GET /api/v1/metaStatus:
GET /api/v1/health(enthält 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_guilderfordert Benutzer-OAuth2 (Bot 403).list_members/get_membererfordern das GUILD_MEMBERS-Intent.discord_help(category=, topic=) Mehrstufige Hilfe.
discord_agentic_workflow(goal, ctx) High-Level-Ziel via
ctx.sample+ Tools (SEP-1577). Gibt ein strukturiertes dict zurück (success,message,recommendationsoder Fehlerfelder).
Prompts (registriert)
discord_quick_start, discord_diagnostics, discord_moderation_playbook, discord_rag_workflow, discord_invite_operations
Skills
Gebündelt unter src/discord_mcp/skills/<name>/SKILL.md, verfügbar als MCP-Ressourcen (skill://). Gelistet im Dashboard unter Skills und via GET /api/v1/skills.
Ressourcen
resource://discord-mcp/capabilitiesKurze Zusammenfassung der Fähigkeiten für Clients.
API (REST)
GET /api/v1/healthStatus, token_set, Ratenbegrenzungen, Sampling,mcp_http_pathGET /api/v1/metaTools, Prompts, Ressourcen, Skills-Root, SamplingGET /api/v1/skillsGebündelte Skill-Vorschauen (Dashboard)GET /api/v1/guildsGilden auflisten (Proxy zum Tool)GET /api/v1/guilds/{guild_id}/channelsKanäle auflisten(Siehe OpenAPI unter
/docsfür die vollständige Liste.)
Discord HTTP 429 (API-Ratenbegrenzungen)
Discord erzwingt routenbasierte Limits für die REST-API. Bei HTTP 429 wartet der Server nun auf retry_after (aus dem Antwort-Body oder dem Retry-After-Header) und wiederholt dieselbe Anfrage bis zu 5 Mal, bevor ein Fehler zurückgegeben wird. Wenn Sie danach immer noch 429 sehen, verlangsamen Sie die Anfragen (z. B. weniger parallele Nachrichtenabrufe, kleinere RAG-Ingest-Batches) oder warten Sie eine Minute, insbesondere wenn "global": true in der Antwort von Discord erscheint (selten; weist auf ein breiteres Limit hin).
Sicherheit und Ratenbegrenzungen (Anti-Spam)
Schreiboperationen sind ratenbegrenzt, damit der Bot nicht als Spambot missbraucht werden kann:
Nachrichten: max. 10/Min. global, max. 3/Min. pro Kanal, mind. 5 Sek. zwischen dem Senden (konfigurierbar).
Kanäle: max. 5 pro Minute erstellt.
Einladungen: max. 5 pro Minute (
DISCORD_RATE_LIMIT_INVITES_PER_MINUTE).Nachrichtenlänge: begrenzt auf 2000 (Discord-Maximum); überschreibbar mit
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. Wenn ein Limit erreicht wird, gibt das Tool success: false, rate_limited: true und einen erklärenden error zurück. Die aktuelle Konfiguration finden Sie unter GET /api/v1/health im Bereich rate_limit.
Dokumentation
docs/README.md Dokumentations-Index
docs/TECHNICAL.md Architektur, Env, Discord 429, MCP
/mcpCHANGELOG.md Versionshinweise
Standards
FastMCP 3.1.0: Anweisungen, Sampling-Handler, Skills-Provider, strikte Validierung, streamable HTTP-Mount.
Webapp:
start.ps1, Ports 10756/10757, dunkles Glas-Layout, Statusleiste oben, Aktivitätsprotokoll, Tools / Skills / Apps-Seiten.
🛡️ Industrial Quality Stack
Dieses Projekt hält sich an SOTA 14.1 Industriestandards für hochpräzise agentenbasierte Orchestrierung:
Python (Core): Ruff für Linting und Formatierung. Null-Toleranz für
print-Anweisungen in Core-Handlern (T201).Webapp (UI): Biome für Linting im Sub-Millisekundenbereich. Strikte
noConsoleLog-Durchsetzung.Protokoll-Konformität: Gehärtete
stdout/stderr-Isolierung, um eine absturzsichere JSON-RPC-Kommunikation zu gewährleisten.Automatisierung: Justfile Rezepte für alle Fleet-Operationen (
just lint,just fix,just dev).Sicherheit: Automatisierte Audits via
banditundsafety.
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
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
Build Discord communities with AI: roles, channels, modules, automations and reviewed announcements.
Let AI agents read your Discord community's analytics, members and tickets, and save drafts.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to interact with Discord through the REST API and real-time events, supporting message management, user info, channel operations, and more with security controls.23 npm1MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to send and read messages in Discord channels, manage servers, channels, and roles via Discord's API.14 npm2MIT
- FlicenseNot gradedqualityDmaintenanceEnables LLMs to read messages, discover channels, send messages, and monitor Discord communities using the Discord HTTP API.-
- AlicenseNot gradedqualityBmaintenanceExposes the full Discord API to LLM agents so they can send and manage rich messages, channels, threads, members, roles, moderation, AutoMod, webhooks, and interactive components. Acts as a drop-in replacement for the legacy Java/Spring implementation, keeping all 75 original tools while adding embeds, polls, files, server configuration, and restart-safe role menus.92 npmMIT