better-discord-mcp
Allows reading and controlling Discord through a BetterDiscord plugin, including reading channels, sending messages, searching, and moderation actions like ban, kick, timeout, and delete.
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., "@better-discord-mcpshow me recent messages in #general"
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.
better-discord-mcp
An MCP server that lets an AI client (Claude Desktop / Claude Code) read and control Discord through a BetterDiscord plugin. It drives your logged-in Discord client, so it can read any channel you can see, send messages, and perform moderation (ban / kick / timeout / delete) wherever your account has permission.
Claude ──stdio──▶ MCP server ──WebSocket(127.0.0.1:6473)──▶ BD plugin ──▶ Discord⚠️ Important: Terms of Service
This automates a user account, not a bot account. Automating a user account ("selfbotting") violates Discord's Terms of Service and can result in account termination, regardless of intent. Use only on your own or explicitly authorized servers, ideally with a test account. You accept the risk.
For ToS-compliant moderation, build a real Discord bot instead — but that cannot "see your client" the way this does.
Related MCP server: discord-mcp
Setup
1. Install the BetterDiscord plugin
Copy
plugin/DiscordMCP.plugin.jsinto your BetterDiscord plugins folder:Windows:
%AppData%\BetterDiscord\plugins\
Open Discord → Settings → Plugins → enable DiscordMCP.
It will keep trying to connect to the bridge every 3s (toast shows status).
2. Install server deps
npm install3. Register the MCP server with your client
Claude Code:
claude mcp add discord -- node "C:/Users/navjo/Documents/GitHub/better-discord-mcp/server/index.js"Claude Desktop (claude_desktop_config.json):
{
"mcpServers": {
"discord": {
"command": "node",
"args": ["C:/Users/navjo/Documents/GitHub/better-discord-mcp/server/index.js"]
}
}
}The server hosts the WebSocket bridge; the plugin connects to it. Start order
doesn't matter — the plugin auto-reconnects. Use the discord_status tool to
confirm the link is up.
Tools
Read / info
Tool | Purpose |
| Is the plugin connected? |
| Current guild / channel / user |
| List your servers |
| Channels in a guild |
| Recent messages in a channel |
| Search a guild or channel |
| User / guild-member info |
| List a guild's roles |
| List open DM channels |
Messaging
Tool | Purpose |
| Send a message |
| Edit your own message |
| React to a message |
| Show typing indicator |
| Open/fetch a DM with a user |
Moderation (🔒 gated — need confirm:true)
Tool | Purpose |
| Delete a message |
| Bulk-delete recent messages (<14 days) |
| Ban (needs Ban Members) |
| Kick (needs Kick Members) |
| Timeout / un-timeout a member |
| Add a role (Manage Roles) |
| Remove a role (Manage Roles) |
🔒 = destructive: the first call returns a confirmation preview and does
nothing; re-call with confirm:true to execute. Disable with
DISCORD_MCP_REQUIRE_CONFIRM=false.
Full surface (~100 tools)
This exposes essentially all of Discord's REST-driven features. Beyond the
common tools above, there are named tools for: audit log, bans (list/get/unban),
threads (create/edit/join/leave/members/archived lists), forum posts, channel
permission overwrites, channel/role reordering, polls, replies & embeds,
crossposting, scheduled events, AutoMod rules, stickers, integrations,
webhooks (create/edit/execute), invites (resolve/join), friends/block/notes,
status, prune, voice mute/deafen & status, welcome screen, vanity url, and more.
See COVERAGE.md for the complete map and what is not reachable.
discord_request — raw escape hatch
For anything without a named tool (templates, onboarding, slash-command registration, brand-new endpoints), call any REST endpoint directly:
discord_request(method="post", path="/guilds/123/templates", body={ "name": "..." })Non-GET raw calls are also gated by the confirmation rule.
What is NOT possible via this bridge
Voice audio (joining/streaming/listening), live event streaming, and the
full online-member list are gateway/WebRTC, not REST — this bridge can't
drive them. It can move/mute/deafen members and set voice channel status.
Use polling (get_messages) instead of live message events.
Config
DISCORD_MCP_PORT(default6473) — must matchthis.portin the plugin.DISCORD_MCP_TIMEOUT(default15000ms) — per-request timeout.DISCORD_MCP_REQUIRE_CONFIRM(defaulttrue) — gate destructive tools.
How API calls are authenticated
Current Discord builds obfuscate the internal REST client (getAPIBaseURL) and
the token module (getToken), so the plugin doesn't rely on them. Instead it
sniffs your Authorization header from Discord's own outgoing requests
(hooking XMLHttpRequest/fetch) and then calls https://discord.com/api/v9
directly with fetch. This is version-proof — it survives Discord updates.
One consequence: the token is only captured after Discord makes an authenticated request. Most live traffic goes over the gateway WebSocket, so right after enabling the plugin you may need to switch channels once to trigger a REST call. After that the token is cached for the session.
Troubleshooting
not connected: Discord must be running with the plugin enabled. Check the plugin toast / Discord devtools console (Ctrl+Shift+I) for errors.Auth token not captured yet: click into a different channel once (forces a REST request the plugin can read the token from), then retry.Discord API 401/403: your account lacks permission for that action, or the captured token is stale — toggle the plugin off/on and switch channels.Diagnostics:
discord_request(path="__debug__")dumps module/token state for debugging without touching devtools.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sys0xdbg/better-discord-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server