
Security News
US Government Forces Anthropic to Pull Claude Fable Days After Launch
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.
discord-selfbot-mcp
Advanced tools
Discord Selfbot MCP server - Node.js wrapper for Python implementation
comprehensive discord selfbot mcp server for full user autonomy.
this is a local mcp server (stdio transport). your mcp client spawns it as a process, and you provide secrets (like DISCORD_TOKEN) via the client's env/environment config.
manual run:
DISCORD_TOKEN="your_discord_token_here" python3 -m discord_py_self_mcp.main
important: automating user accounts is against the Discord ToS. use this at your own risk.
discord-py-self-mcp acts as a bridge between your ai assistant (Claude Code, OpenCode, Codex, etc) and your personal discord account. unlike standard bots, this "selfbot" runs as you; allowing your ai to read your dms, reply to friends, manage your servers, and interact with buttons/menus just like a human user.
built on the discord.py-self library by dolfies.
paste this into your llm agent session:
Install and configure discord-selfbot-mcp by following the instructions here:
https://raw.githubusercontent.com/Microck/discord.py-self-mcp/refs/heads/master/INSTALL.md
npm (recommended)
npm install -g discord-selfbot-mcp
discord-selfbot-mcp-setup
prerequisites:
uv (recommended) or piplibffi-dev (or libffi-devel), python-dev (e.g. python3-dev)install:
uv tool install git+https://github.com/Microck/discord.py-self-mcp.git
# or
pip install git+https://github.com/Microck/discord.py-self-mcp.git
note: voice dependencies (PyNaCl) are included by default. on linux, ensure system packages are installed first.
prerequisites:
install:
npm install -g discord-selfbot-mcp
the npm package is a wrapper that uses the underlying python implementation.
run the interactive setup script to extract your token and generate the mcp config json (it can also write to common client config files and creates a backup before editing).
# if using npm
discord-selfbot-mcp-setup
# if using python (uv/pip)
python3 -m discord_py_self_mcp.setup
because this server uses stdio, you configure it as a local command and pass the token via env (not url/headers).
examples:
mcp.example.jsonmcp.python.example.json.env.examplenpm wrapper (recommended):
{
"mcpServers": {
"discord-py-self": {
"command": "discord-selfbot-mcp",
"env": {
"DISCORD_TOKEN": "${DISCORD_TOKEN}"
}
}
}
}
python (uv tool):
{
"mcpServers": {
"discord-py-self": {
"command": "uv",
"args": ["tool", "run", "discord-py-self-mcp"],
"env": {
"DISCORD_TOKEN": "${DISCORD_TOKEN}"
}
}
}
}
python (pip / venv):
{
"mcpServers": {
"discord-py-self": {
"command": "python3",
"args": ["-m", "discord_py_self_mcp.main"],
"env": {
"DISCORD_TOKEN": "${DISCORD_TOKEN}"
}
}
}
}
if your client does not expand
${DISCORD_TOKEN}, replace it with the literal token value.
powered by the robust discord.py-self library.
| category | tools | description |
|---|---|---|
| system | 2 | get_user_info, list_guilds |
| messages | 6 | send_message, read_messages, search_messages, edit_message, delete_message, get_message_attachments |
| channels | 3 | create_channel, delete_channel, list_channels |
| dms | 1 | list_dm_channels |
| voice | 2 | join_voice_channel, leave_voice_channel |
| relationships | 4 | list_friends, send_friend_request, add_friend, remove_friend |
| presence | 2 | set_status, set_activity |
| interactions | 3 | send_slash_command, click_button, select_menu |
| threads | 5 | create_thread, send_thread_message, list_active_threads, read_thread_messages, archive_thread |
| members | 5 | kick_member, ban_member, unban_member, add_role, remove_role |
| invites | 3 | create_invite, list_invites, delete_invite |
| profile | 1 | edit_profile |
| reactions | 2 | add_reaction, remove_reaction |
| discrawl | 7 | run_discrawl, discrawl_doctor, discrawl_status, discrawl_sync, discrawl_search, discrawl_messages, discrawl_mentions |
list_dm_channels enumerates your open 1:1 and group DM channels so you can
discover a channel_id instead of needing to know it in advance. Each row is
<channel_id> - [dm|group] <recipient display> (id=<user_id>) [BOT]. Optional
args: include_groups (default true) and name_contains (case-insensitive
filter on recipient name/handle), e.g. find the DM with a person by name and
feed the id straight into read_messages / send_message.
send_slash_command invokes an application command in a channel or DM. Pass
application_id (the bot's user/application ID) for reliable resolution; in a DM
with a bot it is inferred automatically. The command and any options are
resolved from the application's registered command list
(GET /applications/{id}/commands), which works for ordinary guild-installed
bots whose commands the per-channel / search index does not return. Subcommands
are space-separated in command_name (e.g. "config set"). Example:
{
"channel_id": "123456789012345678",
"command_name": "remind",
"application_id": "987654321098765432",
"options": { "text": "stand up", "when": "in 10 minutes" }
}
Use run_discrawl to execute local discrawl commands directly from MCP.
Use typed tools for common operations (discrawl_sync, discrawl_search, discrawl_messages, etc.) when you want structured params.
By default this MCP uses the Microck fork at ../discrawl-self/bin/discrawl:
https://github.com/Microck/discrawl-self. It does not silently fall back to a
global discrawl from PATH; set DISCRAWL_BIN or the tool binary argument
when you intentionally want another executable.
Example tool call payload:
{
"command": "sync",
"args": ["--guild", "1234567890", "--since", "2026-03-01T00:00:00Z"],
"config_path": "~/.discrawl/config.toml"
}
Typed tool payload example:
{
"tool": "discrawl_sync",
"args": {
"guild": "1234567890",
"since": "2026-03-01T00:00:00Z",
"full": true,
"config_path": "~/.discrawl/config.toml"
}
}
Optional env var:
DISCRAWL_BIN - custom path to discrawl executable. This overrides the default Microck fork lookup.Use get_message_attachments when a message contains files or images you need to inspect directly.
It returns attachment metadata for the target message and can stream image/file content back through MCP outputs.
| feature | discord-py-self-mcp | discord.py-self (Lib) | Maol-1997 | codebyyassine | elyxlz |
|---|---|---|---|---|---|
| read messages | ✅ | ✅ | ✅ | ✅ | ✅ |
| send messages | ✅ | ✅ | ✅ | ✅ | ✅ |
| list guilds | ✅ | ✅ | ✅ | ✅ | ✅ |
| list channels | ✅ | ✅ | ✅ | ✅ | ✅ |
| get user info | ✅ | ✅ | ✅ | ✅ | ❌ |
| search messages | ✅ | ✅ | ❌ | ❌ | ❌ |
| create channels | ✅ | ✅ | ❌ | ✅ | ❌ |
| delete channels | ✅ | ✅ | ❌ | ✅ | ❌ |
| edit messages | ✅ | ✅ | ❌ | ❌ | ❌ |
| delete messages | ✅ | ✅ | ❌ | ❌ | ❌ |
| join voice | ✅ | ✅ | ❌ | ❌ | ❌ |
| manage friends | ✅ | ✅ | ❌ | ❌ | ❌ |
| manage threads | ✅ | ✅ | ❌ | ❌ | ❌ |
| slash commands | ✅ | ✅ | ❌ | ❌ | ❌ |
| click buttons | ✅ | ✅ | ❌ | ❌ | ❌ |
| select menus | ✅ | ✅ | ❌ | ❌ | ❌ |
| kick/ban | ✅ | ✅ | ❌ | ❌ | ❌ |
| invites | ✅ | ✅ | ❌ | ❌ | ❌ |
| profile edit | ✅ | ✅ | ❌ | ❌ | ❌ |
| setup wizard | ✅ | ❌ | ❌ | ❌ | ❌ |
| captcha solver | ✅ | ❌ | ❌ | ❌ | ❌ |
✅ = supported
❌ = not supported
🚧 = planned / in progress
automatically solves hCaptchas when encountered (e.g., joining servers, dms). built upon QIN2DIM/hcaptcha-challenger - an AI-powered hCaptcha solver using vision models.
warning: this feature is experimental. use at your own risk.
requirements:
GEMINI_API_KEY in your mcp client env.playwright install chromium --with-deps
optional:
CAPTCHA_PROXY: proxy url for solving hCaptcha challenges.TEMP_DIR: Directory for temporary model files (default: /tmp/hcaptcha)built-in rate limiting to prevent account bans. configurable via environment variables.
configuration:
| variable | default | description |
|---|---|---|
RATE_LIMIT_ENABLED | true | Enable/disable rate limiting |
RATE_LIMIT_MESSAGES_PER_MINUTE | 10 | Max messages per minute |
RATE_LIMIT_MESSAGES_PER_SECOND | 1 | Max messages per second |
RATE_LIMIT_ACTIONS_PER_MINUTE | 5 | Max actions (joins, etc.) per minute |
RATE_LIMIT_COOLDOWN | 60 | Cooldown duration when limit hit (seconds) |
rate limiting is enabled by default to reduce ban risk. Only disable it if you are deliberately taking responsibility for raw Discord API pacing yourself.
| problem | solution |
|---|---|
| token invalid | run the setup script again to extract a fresh one |
| missing dependencies | ensure uv or pip installed all requirements |
| playwright error | run playwright install chromium |
| audioop error | ensure audioop-lts is installed if using python 3.13+ |
| camoufox missing | run python -m camoufox fetch |
| voice error | install libffi-dev (linux) or ensure PyNaCl built correctly |
discord_py_self_mcp/
├── bot.py
├── main.py
├── setup.py
├── rate_limiter.py
├── tool_utils.py
├── cli_runtime.py
├── logging_utils.py
├── captcha/
│ └── solver.py
└── tools/
├── channels.py
├── dms.py
├── discrawl.py
├── embed.py
├── guilds.py
├── interactions.py
├── invites.py
├── members.py
├── messages.py
├── presence.py
├── profile.py
├── reactions.py
├── registry.py
├── relationships.py
├── threads.py
└── voice.py
in addition to the mcp server, this package also provides a skill/cli mode for command-line usage with a persistent daemon. this is useful for scripts or when you need faster execution without the mcp protocol overhead.
quick start:
# install (same package)
npm install -g discord-selfbot-mcp
# create .env file
echo "DISCORD_TOKEN=***" > .env
# use skill mode (from package directory)
python3 scripts/dcli.py send-message --channel 123 --content "Hello!"
key commands:
python3 scripts/dcli.py daemon start # start the daemon
python3 scripts/dcli.py daemon status # check daemon status
python3 scripts/dcli.py send-message --channel CHANNEL_ID --content "Hello"
python3 scripts/dcli.py list-guilds
python3 scripts/dcli.py read-messages --channel CHANNEL_ID --limit 20
python3 scripts/dcli.py get-message-attachments --channel CHANNEL_ID --message MESSAGE_ID
python3 scripts/dcli.py get-message-attachments --channel CHANNEL_ID --message MESSAGE_ID --download --output-dir ./attachments
when to use skill mode:
see SKILL.md for detailed documentation.
this project is licensed under the mit license.
issues and pull requests are welcome at github.com/Microck/discord.py-self-mcp.
git checkout -b feature/my-feature)git commit -m 'add my feature')git push origin feature/my-feature)please ensure tests pass (pytest) before submitting.
FAQs
Discord Selfbot MCP server - Node.js wrapper for Python implementation
The npm package discord-selfbot-mcp receives a total of 44 weekly downloads. As such, discord-selfbot-mcp popularity was classified as not popular.
We found that discord-selfbot-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.

Security News
A network of 152 Chrome live wallpaper extensions hid ad tracking and made extension-driven traffic look like Google search clicks.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.