discord-mcp
Provides tools for controlling Discord as a user account, including browsing servers, channels, and DMs; sending, editing, deleting, and reacting to messages; moderation actions like kicking, banning, and timing out members; managing channels, roles, emojis, webhooks, invites, and guild settings; searching captured messages; and analyzing message history and user behavior.
Click on "Deploy 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-mcpsend a message in #general saying the meeting moved to 3pm"
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
A feature-rich Discord MCP (Model Context Protocol) server for Claude Code and other MCP clients. Control Discord from your AI assistant — browse servers, send messages, moderate, manage channels/roles/emojis, analyze your message history, and more. 70+ tools.
Runs on Bun, stores captured messages in SQLite, and authenticates with the tokens already cached in your local Discord client — no bot account or manual token setup needed.
⚠️ Read this first
This tool acts as your Discord account (user account, not a bot). Anything it does — sending, banning, editing servers — happens as you.
Automating a user account technically violates Discord's ToS. Use it on your own servers and at your own risk.
Tokens are decrypted locally via Windows DPAPI and never leave the MCP process — they are never printed, logged, or passed to the AI.
Windows only (token extraction uses Discord's LevelDB + DPAPI).
Related MCP server: MCP Discord
Features
📥 Capture & accounts
Tool | What it does |
| Connect to the Gateway WebSocket and capture live messages (pass |
| Disconnect the capture |
| Connection state, message counts, uptime |
| List cached Discord accounts (id + username only — tokens never exposed) |
Switching accounts is just start_capture({account: "username"}) while connected — it reconnects as that account.
🧭 Browsing
list_guilds,list_channels,list_dms,get_channel_infoget_user_info,get_guild_info,get_guild_members,get_guild_rolesget_invite_info(look up an invite without joining)
💬 Messaging
send_message(with reply support),edit_message,delete_message,bulk_delete_messagesreact_to_message,remove_reaction,get_reactionstyping_indicator,create_dm,fetch_channel_historycrosspost_message,follow_announcement_channelpin_message,unpin_message,get_pinned_messages
🛡️ Moderation
kick_member,ban_member,unban_member,list_banstimeout_member,set_nickname,move_memberadd_role_to_member/remove_role_from_memberprune_members(dry-run or execute),get_audit_log
📺 Channel admin
create_channel(text / voice / category / announcement / stage / forum),edit_channel,delete_channelreorder_channels,set_channel_permissions,delete_channel_permissionslist_webhooks,create_webhook,delete_webhook,execute_webhook
👑 Guild admin
create_role,edit_role,delete_role,reorder_rolescreate_guild_emoji,delete_guild_emojicreate_channel_invite,list_guild_invites,delete_inviteedit_guild_settings(name, verification level, content filter, AFK, system channel)list_scheduled_events,create_scheduled_event,delete_scheduled_event,get_voice_regions
🔎 Search & query (captured messages)
query_messages— filter by author, channel, guild, date, attachmentssearch_messages— full-text search (SQLite FTS5)get_active_conversations,get_mentions,get_unread_summary
🧠 Self-analysis
analyze_personality— vocabulary, emoji usage, punctuation, activity patternsresponse_style_analysis— timing, tone, opening/closing phrases, edit behaviorget_common_phrases— your bigrams, trigrams, filler words, signature expressionsget_conversation_threads— stimulus→response pairs with timingtrack_user_activity,compare_users
🎁 Extras
scan_giveaways,join_giveaway,auto_join_giveawaysget_relationships,add_friend,remove_friend,block_userget_connections,get_nitro_status,export_favorite_gifsjoin_guild_invite,leave_guildset_status,set_bio,set_avatarclone_server_structure,export_server_structureexport_dataset(JSON/CSV),get_capture_stats
Setup
1. Install Bun
Download from https://bun.sh or with PowerShell:
powershell -c "irm bun.sh/install.ps1 | iex"2. Clone & install
git clone https://github.com/nesquickwe/discord-mcp.git
cd discord-mcp
bun install
bun add -d bun-types3. Make sure Discord is logged in
The server reads tokens from your local Discord client's storage
(%APPDATA%\discord\Local Storage\leveldb). Just have the desktop app
installed and logged in to the account(s) you want to use.
4. Register with your AI tool
The included setup_mcp.ps1 auto-detects and registers the server with every supported client:
powershell -ExecutionPolicy Bypass -File setup_mcp.ps1Supported: Claude Code, OpenAI Codex, Trae, Google Antigravity, Windsurf/Devin, Cursor.
To register with just one:
powershell -ExecutionPolicy Bypass -File setup_mcp.ps1 claudePrefer manual setup? Add this to the right config file for your client (paths use Claude Code's %USERPROFILE%\.claude.json):
{
"mcpServers": {
"discord": {
"command": "<path-to-bun>",
"args": ["run", "<repo-path>\\src\\index.ts"]
}
}
}Client | Config location |
Claude Code |
|
Codex |
|
Trae |
|
Antigravity |
|
Windsurf / Devin |
|
Cursor |
|
Restart your AI tool and the discord MCP server appears with all tools.
Then restart Claude Code and the discord MCP server appears with all tools.
Usage tips
Connect first. Most API tools need an active session:
start_capture(optionally withaccount).Multiple accounts?
list_accountsshows what's cached, thenstart_capture({account: "myaccount"})to connect as a specific one.Captured vs API data —
query_messages/search_messagesonly see messages that arrived while capture was running;fetch_channel_historypulls straight from the Discord API.Messages are stored in
data/messages.db(SQLite) so analysis tools work across sessions.
Project layout
src/
├── index.ts # entry — registers all tool modules
├── token/ # DPAPI + LevelDB token extraction (multi-account)
├── gateway/ # Discord Gateway WebSocket client
├── storage/ # SQLite persistence (messages, channels, users)
├── analysis/ # personality / phrase / style / thread analysis
├── tools/ # tool modules (capture, messaging, moderation, ...)
└── util/ # Discord REST API helper, config, loggerLicense
MIT — see LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
An MCP server that provides read access to your cloud storage providers, bank accounts and more.
MCP server for progressive tool usage at any scale (see https://klavis.ai)
Hosted MCP server with managed OAuth for 15+ toolkits: Google Workspace, Fitbit, Oura, Kalshi, etc.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables interaction with Discord using personal user tokens instead of bot applications, allowing for seamless message management and server exploration. It provides tools for reading history, sending messages, and searching across channels and DMs directly through MCP-compatible clients.9MIT
- AlicenseNot gradedqualityCmaintenanceThe most complete open-source MCP server for Discord — 80+ tools, dual-mode: integrated (plugin) or standalone2111MIT
- AlicenseAqualityBmaintenanceMCP server over the real Discord REST API: 5 read-only tools plus 7 write tools gated off by default behind DISCORD_MCP_ENABLE_WRITE.12MIT
- AlicenseNot gradedqualityFmaintenanceMCP server that gives AI agents first-class access to Discord, enabling discovery, messaging, channel management, moderation, and arbitrary REST calls through typed, consent-aware tools.73MIT