discord-self-mcp
Exposes a Discord user account to coding agents through 80 tools covering account info, servers, channels, messages (read, send, search, react), members and roles (add role, timeout, kick), invites, threads, emoji, DMs, and moderation actions, with read/write and admin toggles plus an optional guild allowlist.
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-self-mcp send a message in #general saying the deploy finished"
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-self-mcp
MCP server that exposes a Discord user account to coding agents: read and send messages, manage channels, roles and members, handle invites, threads and emoji, and moderate a server.
Built on @discord-selfbot/core, the TypeScript fork of discord.js-selfbot.
Works with OpenCode, Claude Code, Cursor, Zed, or any MCP client that speaks stdio.
Warning: automating a user account through the Discord API breaks Discord's Terms of Service and can get the account banned. Use an account you can afford to lose. The token is a full account credential: anyone with it owns the account.
Features
80 tools across account, servers, channels, messages, members, roles, invites, threads, emoji and DMs.
Read and write modes, plus a separate switch for destructive/admin actions.
Optional guild allowlist so an agent cannot touch servers you did not name.
DM sending limited to conversations that already exist, because opening new DMs needs a captcha.
Snowflake ids validated before any request; permission names validated against the library flag table.
Login is lazy, so the MCP server starts immediately and reports a clear error if the token is wrong.
Related MCP server: discord-user-connector
Install
git clone https://github.com/rawnullbyte/discord-self-mcp.git
cd discord-self-mcp
npm install
npm run buildOpenCode
{
"mcp": {
"discord": {
"type": "local",
"command": ["node", "/home/you/Projects/discord-self-mcp/dist/index.js"],
"enabled": true,
"environment": {
"DISCORD_TOKEN": "your-user-token"
}
}
}
}npx -y /home/you/Projects/discord-self-mcp works too if you prefer npx over an explicit path. See docs/setup.md for Claude Desktop and other clients.
Configuration
Variable | Default | Meaning |
| required | User account token. |
|
|
|
|
|
|
| all | Comma-separated guild ids the server may touch. |
|
| Login wait before tools report a timeout. |
Full details in docs/configuration.md.
Tools
Group | Examples |
Account |
|
Servers |
|
Channels |
|
Messages |
|
Members |
|
Roles |
|
Invites |
|
Threads |
|
Emoji |
|
DMs |
|
Every tool with its parameters is documented in docs/tools.md.
What is intentionally missing
Creating a DM with a user who is not already in the DM list, friend requests, username and password changes, and voice audio all need a captcha or an interactive client, or are outside the library. See docs/capabilities.md for the full list and the reason for each gap.
Development
npm run typecheck
npm test # unit tests against the built output
npm run smoke # spawns the MCP server and lists toolsLayout:
src/
index.ts entry point, tool registration
discord.ts login, resolvers, guards
config.ts environment parsing
format.ts Discord object serializers
util.ts validation, permissions, result helpers
tools/ one module per tool group
test/ unit and stdio smoke tests
docs/ setup, configuration, tool reference, securityLicense
MIT. Upstream library is GPL-3.0, see NOTICE.
Available Tools
80 toolsdiscord_account_profileC
Public profile fields of the logged-in account.
Inputs: no named parameters.
discord_add_roleA
Add one or more roles to a member. Requires Manage Roles and a role below the account highest role.
Inputs: userId (required), guildId (required), roleIds (required), reason.
discord_archive_threadA
Archive or unarchive a thread. Requires Manage Threads.
Inputs: threadId (required), locked, reason, archived.
discord_ban_memberC
Ban a user from a server. Requires Ban Members.
Inputs: userId (required), guildId (required), reason, deleteMessageSeconds.
discord_channel_infoC
Details of a channel, thread or DM by id.
Inputs: channelId (required).
discord_clear_statusB
Clear activity and presence back to online.
Inputs: no named parameters.
discord_create_channelB
Create a channel or category. Requires Manage Channels.
Inputs: name (required), guildId (required), nsfw, type, +5 more.
discord_create_emojiB
Upload a custom emoji from an image URL or data URI. Requires Manage Expressions.
Inputs: url (required), name (required), guildId (required), roles, +1 more.
discord_create_inviteB
Create an invite for a channel. Requires Create Invite.
Inputs: channelId (required), reason, unique, maxUses, +2 more.
discord_create_roleC
Create a role. Requires Manage Roles.
Inputs: name (required), guildId (required), color, hoist, +3 more.
discord_create_threadB
Create a public or private thread in a text channel. Requires Create Public Threads or Create Private Threads.
Inputs: name (required), channelId (required), reason, private, +2 more.
discord_delete_channelB
Delete a channel or category. Requires confirm: true.
Inputs: confirm (required), guildId (required), channelId (required), reason.
discord_delete_emojiB
Delete a custom emoji. Requires Manage Expressions.
Inputs: emojiId (required), guildId (required), reason.
discord_delete_inviteA
Revoke an invite by code. Requires Manage Server.
Inputs: code (required), guildId (required).
discord_delete_messageB
Permanently delete a message. Requires confirm: true.
Inputs: confirm (required), channelId (required), messageId (required).
discord_delete_permission_overwriteC
Remove the permission overwrite for a role or member on one channel.
Inputs: guildId (required), targetId (required), channelId (required), reason.
discord_delete_roleA
Delete a role. Requires confirm: true and Manage Roles.
Inputs: roleId (required), confirm (required), guildId (required), reason.
discord_disconnect_memberB
Disconnect a member from voice. Requires Move Members.
Inputs: userId (required), guildId (required), reason.
discord_edit_channelC
Rename a channel, change its topic, slowmode, NSFW flag, category or position.
Inputs: guildId (required), channelId (required), name, nsfw, +5 more.
discord_edit_guildB
Rename the server or change its description. Requires Manage Server.
Inputs: guildId (required), name, reason, description.
discord_edit_messageC
Edit a message the account sent.
Inputs: content (required), channelId (required), messageId (required).
discord_edit_permission_overwriteC
Allow or deny permissions for a role or member on one channel.
Inputs: guildId (required), targetId (required), channelId (required), targetType (required), +3 more.
discord_edit_roleA
Rename a role, change its color, hoist, mentionable flag or permissions. Requires Manage Roles.
Inputs: roleId (required), guildId (required), name, color, +4 more.
discord_get_memberB
Get one member of a server, including roles and computed permissions.
Inputs: userId (required), guildId (required).
discord_get_messageC
Fetch one message by id.
Inputs: channelId (required), messageId (required).
discord_get_userC
Look up a user by id.
Inputs: userId (required).
discord_guild_infoC
Server details with channels, roles and emoji summary.
Inputs: guildId (required).
discord_guild_member_meC
The account member object in a server: nickname, roles and computed permissions.
Inputs: guildId (required).
discord_join_guildA
Join a server with an invite code. Requires confirm: true; the account stays joined until it leaves.
Inputs: code (required), confirm (required).
discord_join_threadC
Join a thread.
Inputs: threadId (required).
discord_kick_memberB
Kick a member from the server. Requires Kick Members.
Inputs: userId (required), guildId (required), reason.
discord_leave_guildA
Leave a server permanently. Requires confirm: true.
Inputs: confirm (required), guildId (required).
discord_leave_threadC
Leave a thread.
Inputs: threadId (required).
discord_list_audit_logsA
Read recent audit log entries. Requires View Audit Log.
Inputs: guildId (required), limit, before, userId, +1 more.
discord_list_bansB
List banned users. Requires Ban Members.
Inputs: guildId (required), limit.
discord_list_blockedB
List blocked users.
Inputs: no named parameters.
discord_list_channelsC
List channels of a server, filtered by name or type.
Inputs: guildId (required), type, limit, query.
discord_list_dmsB
List existing DM and group DM channels. Only these channels can be messaged by the account.
Inputs: limit, query.
discord_list_emojisC
List custom emoji of a server.
Inputs: guildId (required), limit.
discord_list_friend_requestsA
List incoming and outgoing friend requests. Sending and accepting them needs a captcha and is not exposed.
Inputs: no named parameters.
discord_list_friendsB
List friends of the account, with nicknames when set.
Inputs: no named parameters.
discord_list_guild_invitesA
List active invites of a server. Requires Manage Server.
Inputs: guildId (required).
discord_list_guildsC
List servers the account is a member of.
Inputs: limit, query.
discord_list_membersA
List or search members of a server. Large servers need query or after paging.
Inputs: guildId (required), after, limit, query.
discord_list_permission_overwritesB
List role and member permission overwrites of a guild channel.
Inputs: guildId (required), channelId (required).
discord_list_pinsC
List pinned messages in a channel.
Inputs: channelId (required).
discord_list_reactionsC
List reactions on a message and the users who added them.
Inputs: channelId (required), messageId (required), limit.
discord_list_role_membersC
List member ids that have a role.
Inputs: roleId (required), guildId (required).
discord_list_rolesB
List roles of a server with permissions and position.
Inputs: guildId (required).
discord_list_threadsB
List active or archived threads of a channel.
Inputs: channelId (required), limit, archived.
discord_move_memberA
Move a member to another voice channel, or disconnect them with channelId null. Requires Move Members.
Inputs: userId (required), guildId (required), channelId (required), reason.
discord_pin_messageB
Pin a message. Requires Manage Messages.
Inputs: channelId (required), messageId (required).
discord_prune_membersA
Preview or run a member prune by inactivity. Members with roles are never pruned by Discord.
Inputs: guildId (required), days, dryRun, reason.
discord_reactC
React to a message with a unicode emoji or name:id custom emoji.
Inputs: emoji (required), channelId (required), messageId (required).
discord_read_messagesC
Fetch recent messages from a channel or existing DM, newest first.
Inputs: channelId (required), after, limit, around, +1 more.
discord_remove_reactionC
Remove one of the account's reactions from a message.
Inputs: emoji (required), channelId (required), messageId (required).
discord_remove_roleB
Remove one or more roles from a member. Requires Manage Roles.
Inputs: userId (required), guildId (required), roleIds (required), reason.
discord_remove_timeoutC
Remove a member timeout.
Inputs: userId (required), guildId (required), reason.
discord_search_messagesC
Search messages in a channel by text, optionally from one author.
Inputs: content (required), channelId (required), limit, offset, +1 more.
discord_send_messageA
Send a message to a channel or an existing DM. Replying needs only replyToId. Sending to a DM user who is not already in the DM list needs a captcha and is not supported.
Inputs: content (required), channelId (required), tts, replyToId.
discord_send_typingC
Show the typing indicator in a channel.
Inputs: channelId (required).
discord_set_about_meA
Set the account bio. Empty string clears it.
Inputs: bio (required).
discord_set_accent_colorC
Set the profile accent color.
Inputs: color.
discord_set_avatarA
Set the account avatar from an image URL or data URI.
Inputs: url (required).
discord_set_bannerA
Set the account banner from an image URL or data URI. Empty string clears it.
Inputs: url (required).
discord_set_channel_positionC
Move a channel to a position inside its category.
Inputs: guildId (required), position (required), channelId (required).
discord_set_custom_statusC
Set the custom status text and optional emoji.
Inputs: text (required), emoji, expiresInMinutes.
discord_set_global_nameC
Set the display name (global name).
Inputs: name (required).
discord_set_nicknameB
Change a member nickname, or clear it with null. Requires Manage Nicknames.
Inputs: userId (required), guildId (required), nickname (required), reason.
discord_set_pronounsA
Set profile pronouns. Empty string clears them.
Inputs: pronouns (required).
discord_set_role_positionB
Move a role to a position. Requires Manage Roles.
Inputs: roleId (required), guildId (required), position (required).
discord_set_rolesB
Replace all roles of a member. Requires Manage Roles.
Inputs: userId (required), guildId (required), roleIds (required), reason.
discord_set_server_deafB
Server deafen or undeafen a member in voice. Requires Deafen Members.
Inputs: deaf (required), userId (required), guildId (required), reason.
discord_set_server_muteB
Server mute or unmute a member in voice. Requires Mute Members.
Inputs: mute (required), userId (required), guildId (required), reason.
discord_set_statusA
Set presence status, activity and custom status. Use discord_clear_status to reset.
Inputs: afk, url, status, activity, +1 more.
discord_timeout_memberB
Put a member in timeout. Requires Moderate Members. Maximum 28 days.
Inputs: userId (required), guildId (required), minutes (required), reason.
discord_unban_memberC
Remove a ban. Requires Ban Members.
Inputs: userId (required), guildId (required), reason.
discord_unpin_messageA
Unpin a message. Requires Manage Messages.
Inputs: channelId (required), messageId (required).
discord_user_profileC
Fetch a user profile (bio, pronouns, mutual servers) as returned by Discord.
Inputs: userId (required).
discord_whoamiA
Details of the logged-in account: id, username, tag, email availability, guild count.
Inputs: no named parameters.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 80 tools
Tools are organized cleanly by resource (guilds, channels, messages, members, roles, invites, threads, emoji, DMs), so most selections are unambiguous. A few pairs blur together: whoami vs account_profile vs user_profile, set_status vs set_custom_status, and move_member vs disconnect_member (disconnect is just move_member with null channel).
Nearly everything follows the discord_verb_noun snake_case pattern with a uniform prefix. Minor deviations are noun-first or idiosyncratic names like discord_guild_info, discord_channel_info, discord_whoami, and discord_guild_member_me.
80 tools is very heavy for an agent to navigate and is well past the point where each tool earns its place. The breadth mirrors the Discord API, but several clusters (status setting, member role manipulation, voice member control, profile field setters) could be consolidated into fewer parameterized tools.
Coverage is broad and deep: account profile, guilds, channels, permission overwrites, messages, reactions, pins, members, roles, invites, threads, emoji, and DMs all have full lifecycle operations. Gaps are mostly documented limitations (no DM creation, no friend-request accept due to captcha) rather than oversights.
Maintenance
Related MCP Connectors
Connect a Discord bot (bot token from the developer portal) to read/send messages, list guilds and c
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
Control your Discord community: send/read messages, manage channels and forums, and handle webhook…
Build and change Discord bots by describing them: slash commands, events, embeds, modals and data.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to send and read messages in Discord channels, manage servers, channels, and roles via Discord's API.14 npm2MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to access and interact with a Discord user account via the Discord client API, allowing them to read servers, channels, DMs, mentions, and message history, and optionally send messages and perform other actions.1MIT
- AlicenseNot gradedqualityBmaintenanceEnables AI assistants to interact with a Discord account to read channels, send and manage messages, handle DMs and reactions, search messages, and update status.141 npmMIT
- AlicenseNot gradedqualityAmaintenanceEnables AI assistants to interact with Discord by logging in as a bot and managing servers, channels, roles, members, messages, forum posts, reactions, and webhooks.1,578 npmMIT