The Discord MCP Server is a comprehensive tool for managing Discord bots and servers through a standardized interface, offering 93+ operations across all Discord functionalities.
Core Operations:
Message Management: Send, edit, delete messages; manage reactions, pins, bulk operations; retrieve message history and search with criteria like author, dates, attachments
Channel Operations: Create, edit, delete text/voice/forum channels; manage privacy settings and file uploads
Member & Role Management: Add/remove roles, edit member properties, search member information
Direct Messages & Friends: Create DM channels, manage friend relationships, send friend requests
Advanced Features:
Voice & Audio: Join/leave voice channels, play audio, control volume
Bot Presence: Update status (online, idle, DND), set custom activities (playing, streaming, watching)
Interactive Components: Send embeds, buttons, select menus, modal dialogs
Webhooks: Create, delete, and send webhook messages
Server Administration: Edit server settings, manage welcome screens, retrieve statistics
Content Management: Handle custom emojis, stickers, scheduled events
File Operations: List, download, and clean up message attachments
Security: Automoderation, invite management, bulk privacy controls
This unified master control interface streamlines all Discord bot operations into a single, standardized system.
Provides comprehensive Discord bot management capabilities including server information, channel creation and management, message operations, role and permission management, member moderation, voice channel operations, webhook management, and audit logging through Discord's API.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Discord MCP Servercreate a new text channel named announcements in the general category"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Discord MCP Server
⚠️ Security Notice: This project handles Discord credentials and privileged Discord operations. Treat all tokens and secrets as sensitive.
Discord MCP Server exposes Discord.js through one MCP tool with a dynamic symbol router.
Current Architecture
This repository now uses the dynamic Discord.js routing architecture:
MCP tool:
discord_manageHTTP runtime: Hono (
@hono/node-server)Web UI: Svelte app served by the same Hono process under
/appDiscovery operation:
discordjs.meta.symbols(method:automation.read)
Invocation operation format:
discordjs.<kind>.<symbol>(method:automation.write)Example:
discordjs.function.TextChannel%23send
Domain Method Contract
discord_manage uses the contract below:
mode:botoruseridentityId: identity record (for exampledefault-bot)method: one ofserver.read,server.write,channels.read,channels.write,messages.read,messages.write,members.read,members.write,roles.read,roles.write,automation.read,automation.write
operation: dynamic operation key (discordjs.meta.symbolsordiscordjs.<kind>.<symbol>)paramsorargsDiscovery operation
discordjs.meta.symbolsis validated underautomation.read.Invocation operations
discordjs.<kind>.<symbol>are validated underautomation.write.
Static operation keys (get_discordjs_symbols, invoke_discordjs_symbol) are removed and now return validation errors.
Runtime kind behavior:
Dynamic
enumsymbols are discovered directly from Discord.js runtime exports.interface,type,namespace, andexternalremain accepted for compatibility, but may return empty results in runtime-only discovery mode.
Related MCP server: mcp-discord
Branch Model
Canonical branch:
new-architecture-mainRepository default branch:
new-architecture-main
Quick Start
Prerequisites
Node.js 18+
npm
Discord bot token
Install
Run
Configuration
Create .env:
HTTP Endpoints
When MCP_HTTP_PORT (or PORT) is set:
GET /ssePOST /messageGET /healthGET /oauth/discord/startGET /oauth/discord/callbackGET /auth/codex/start(primary Codex-style login entrypoint)GET /auth/codex/callback(callback alias)GET /auth/oidc/start(alias)GET /auth/oidc/callback(alias)GET /auth/callback(Codex-compatible primary callback)GET /api/sessionPOST /api/session/logoutPOST /api/session/identityGET /api/chat/threadsPOST /api/chat/threadsGET /api/chat/threads/:threadId/messagesPOST /api/chat/planPOST /api/chat/executeGET /app/(SvelteKit web UI whenweb/buildexists)
Web UI Runtime (Single Server)
Use one command to build UI + backend and run Hono on :1455:
This flow:
Builds the SvelteKit app into
web/buildCompiles backend TypeScript
Runs a single Hono server on
http://localhost:1455Serves UI directly at
http://localhost:1455/app/(no Vite proxy required)
Missing Discord OAuth callback env vars (DISCORD_CLIENT_SECRET,
DISCORD_OAUTH_REDIRECT_URI) no longer block HTTP startup; only the
/oauth/discord/* callback exchange remains unavailable until configured.
Typed HTTP Client (hc)
You can use the generated typed client from Hono route types:
The MCP JSON-RPC contract on POST / is unchanged (initialize, tools/list, tools/call).
Web UI Flow
The UI is served by Hono at
/app/.Login starts at
/auth/codex/startand returns via/auth/callbackby default (/auth/codex/callbackand/auth/oidc/callbackare aliases).When OIDC is not configured and
DISCORD_WEB_ALLOW_DEV_AUTH=true(default outside production),/auth/codex/startcreates a local dev session automatically.After Codex OAuth callback, token exchange (
requested_token=openai-api-key) must succeed before a web session is created.If token exchange fails (for example
missing organization_id), login is rejected and the UI shows an actionable auth error.Session state is cookie-based and persisted in
DISCORD_WEB_UI_STORE_PATH.Chat planning uses dynamic operation generation and defaults write operations to
dryRun: true.Live writes require explicit confirmation in the UI (
confirmWrites: true).
Usage Examples
1) Discover Symbols
2) Dynamic Invocation (TextChannel#send)
3) Dry Run Before Executing
Notes on Operation Counts
If you expect thousands of operations in the MCP registry, this is by design:
The MCP registry exposes a small, fixed operation surface.
Discovery is exposed through
discordjs.meta.symbols.Discord.js breadth is exposed through dynamic symbol routing (
discordjs.<kind>.<symbol>).Runtime discovery includes
enumexports (for exampleChannelType,ActivityType).
Security Guidance
Keep tokens private and rotate regularly.
Use minimum Discord permissions required.
Prefer
dryRunfor risky operations.Use
allowWriteonly when intended.Enable audit logging in production.
Scripts
npm run build- compile TypeScriptnpm run dev- build once, then runtsc -w+node --watchnpm start- run compiled stdio servernpm run web- run compiled Hono HTTP/SSE server on port 1455npm run web:build- build then run HTTP/SSEnpm run ui:build- build SvelteKit web UI intoweb/buildnpm run web:full- build UI + backend and run HTTP server