discord-selfbot-mcp 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +24 -7
- package/SKILL.md +3 -8
- package/package.json +1 -1
- package/scripts/daemon.py +397 -331
- package/scripts/dcli.py +189 -225
- package/server.json +4 -4
- package/setup-wizard.js +9 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Microck
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
<p align="center">
|
|
12
12
|
<img src="https://img.shields.io/badge/license-MIT-green" alt="license">
|
|
13
13
|
<img src="https://img.shields.io/badge/language-python-blue" alt="language">
|
|
14
|
-
<img src="https://img.shields.io/
|
|
14
|
+
<a href="https://www.npmjs.com/package/discord-selfbot-mcp"><img src="https://img.shields.io/npm/v/discord-selfbot-mcp?color=orange&label=npm" alt="npm"></a>
|
|
15
15
|
<img src="https://img.shields.io/badge/mcp-sdk-orange" alt="mcp">
|
|
16
16
|
<img src="https://img.shields.io/badge/skill-cli-purple" alt="skill">
|
|
17
17
|
<a href="https://github.com/Microck/opencode-studio"><img src="https://img.shields.io/badge/opencode-studio-brown?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAABiElEQVR4nF2Sv0tWcRTGPyeVIpCWwmyJGqQagsqCsL2hhobsD3BvdWhoj/6CiIKaoqXBdMjKRWwQgqZ%2BokSvkIhg9BOT9xPn9Vx79cD3cu6953zP8zznCQB1V0S01d3AKeAKcBVYA94DjyJioru2k9SHE%2Bqc%2Bkd9rL7yf7TUm%2BpQ05yPUM%2Bo626Pp%2BqE2q7GGfWrOpjNnWnAOPAGeAK8Bb4U5D3AJ%2BAQsAAMAHfVvl7gIrAf2Kjiz8BZYB3YC/wFpoGDwHfgEnA0oU7tgHiheEShyXxY/Vn/n6ljye8DcBiYAloRcV3tAdrV1xMRG%2Bo94DywCAwmx33AJHASWK7iiAjzNFOBl7WapPYtYdyo8RlLqVpOVPvq9KoH1NUuOneycaRefqnP1ftdUyiOt5KS%2BqLWdDpVzTXMl5It4Jr6u%2BQ/nhyBc8C7jpowGxGvmxuPqT9qyYuFIKdP71B8WT3SOKexXLrntvqxq3BefaiuFMQ0wqZftxl3M78MjBasfiDN/SAi0kFbtf8ACtKBWZBDoJEAAAAASUVORK5CYII%3D" alt="Add with OpenCode Studio" /></a>
|
|
@@ -190,7 +190,7 @@ powered by the robust `discord.py-self` library.
|
|
|
190
190
|
| **relationships** | 4 | list_friends, send_friend_request, add_friend, remove_friend |
|
|
191
191
|
| **presence** | 2 | set_status, set_activity |
|
|
192
192
|
| **interactions** | 3 | send_slash_command, click_button, select_menu |
|
|
193
|
-
| **threads** |
|
|
193
|
+
| **threads** | 5 | create_thread, send_thread_message, list_active_threads, read_thread_messages, archive_thread |
|
|
194
194
|
| **members** | 5 | kick_member, ban_member, unban_member, add_role, remove_role |
|
|
195
195
|
| **invites** | 3 | create_invite, list_invites, delete_invite |
|
|
196
196
|
| **profile** | 1 | edit_profile |
|
|
@@ -298,14 +298,13 @@ built-in rate limiting to prevent account bans. configurable via environment var
|
|
|
298
298
|
|
|
299
299
|
| variable | default | description |
|
|
300
300
|
|----------|---------|-------------|
|
|
301
|
-
| `RATE_LIMIT_ENABLED` | `
|
|
301
|
+
| `RATE_LIMIT_ENABLED` | `true` | Enable/disable rate limiting |
|
|
302
302
|
| `RATE_LIMIT_MESSAGES_PER_MINUTE` | `10` | Max messages per minute |
|
|
303
303
|
| `RATE_LIMIT_MESSAGES_PER_SECOND` | `1` | Max messages per second |
|
|
304
304
|
| `RATE_LIMIT_ACTIONS_PER_MINUTE` | `5` | Max actions (joins, etc.) per minute |
|
|
305
305
|
| `RATE_LIMIT_COOLDOWN` | `60` | Cooldown duration when limit hit (seconds) |
|
|
306
|
-
| `RATE_LIMIT_RESPECT_GLOBAL` | `true` | Respect Discord's global rate limit |
|
|
307
306
|
|
|
308
|
-
>
|
|
307
|
+
> 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.
|
|
309
308
|
|
|
310
309
|
---
|
|
311
310
|
|
|
@@ -330,11 +329,15 @@ discord_py_self_mcp/
|
|
|
330
329
|
├── main.py
|
|
331
330
|
├── setup.py
|
|
332
331
|
├── rate_limiter.py
|
|
332
|
+
├── tool_utils.py
|
|
333
|
+
├── cli_runtime.py
|
|
334
|
+
├── logging_utils.py
|
|
333
335
|
├── captcha/
|
|
334
336
|
│ └── solver.py
|
|
335
337
|
└── tools/
|
|
336
338
|
├── channels.py
|
|
337
339
|
├── discrawl.py
|
|
340
|
+
├── embed.py
|
|
338
341
|
├── guilds.py
|
|
339
342
|
├── interactions.py
|
|
340
343
|
├── invites.py
|
|
@@ -361,7 +364,7 @@ in addition to the mcp server, this package also provides a **skill/cli mode** f
|
|
|
361
364
|
npm install -g discord-selfbot-mcp
|
|
362
365
|
|
|
363
366
|
# create .env file
|
|
364
|
-
echo "DISCORD_TOKEN
|
|
367
|
+
echo "DISCORD_TOKEN=***" > .env
|
|
365
368
|
|
|
366
369
|
# use skill mode (from package directory)
|
|
367
370
|
python3 scripts/dcli.py send-message --channel 123 --content "Hello!"
|
|
@@ -388,4 +391,18 @@ see [SKILL.md](SKILL.md) for detailed documentation.
|
|
|
388
391
|
|
|
389
392
|
### license
|
|
390
393
|
|
|
391
|
-
mit
|
|
394
|
+
this project is licensed under the [mit license](./LICENSE).
|
|
395
|
+
|
|
396
|
+
---
|
|
397
|
+
|
|
398
|
+
### contributing
|
|
399
|
+
|
|
400
|
+
issues and pull requests are welcome at [github.com/Microck/discord.py-self-mcp](https://github.com/Microck/discord.py-self-mcp).
|
|
401
|
+
|
|
402
|
+
1. fork the repository
|
|
403
|
+
2. create a feature branch (`git checkout -b feature/my-feature`)
|
|
404
|
+
3. commit your changes (`git commit -m 'add my feature'`)
|
|
405
|
+
4. push to the branch (`git push origin feature/my-feature`)
|
|
406
|
+
5. open a pull request
|
|
407
|
+
|
|
408
|
+
please ensure tests pass (`pytest`) before submitting.
|
package/SKILL.md
CHANGED
|
@@ -123,9 +123,6 @@ python3 scripts/dcli.py pin-message --channel CHANNEL_ID --message MESSAGE_ID
|
|
|
123
123
|
# Create thread from message (in text channel)
|
|
124
124
|
python3 scripts/dcli.py create-thread --channel CHANNEL_ID --name "Thread Name" --message MESSAGE_ID
|
|
125
125
|
|
|
126
|
-
# Create standalone thread (in text channel)
|
|
127
|
-
python3 scripts/dcli.py create-thread --channel CHANNEL_ID --name "Thread Name"
|
|
128
|
-
|
|
129
126
|
# Create thread in forum channel (with initial content)
|
|
130
127
|
python3 scripts/dcli.py create-thread --channel FORUM_CHANNEL_ID --name "Thread Name" --content "Initial post content"
|
|
131
128
|
```
|
|
@@ -176,11 +173,10 @@ python3 scripts/dcli.py read-recent-threads --guild GUILD_ID --within 4 --limit-
|
|
|
176
173
|
|
|
177
174
|
#### Get User Info
|
|
178
175
|
```bash
|
|
179
|
-
# Get current user info
|
|
176
|
+
# Get current user info (supported in daemon mode)
|
|
180
177
|
python3 scripts/dcli.py user-info
|
|
181
178
|
|
|
182
|
-
#
|
|
183
|
-
python3 scripts/dcli.py user-info --user USER_ID
|
|
179
|
+
# Specific user lookup is not currently supported in daemon mode
|
|
184
180
|
```
|
|
185
181
|
|
|
186
182
|
#### List Threads in Channel
|
|
@@ -248,7 +244,7 @@ Commands that support `--after` parameter accept the following formats:
|
|
|
248
244
|
- **Daemon Mode**: Uses persistent connection for instant command execution
|
|
249
245
|
- **Auto-Restart**: Daemon monitors its own code and restarts automatically when changes are detected
|
|
250
246
|
- **Process Management**: Built-in commands to manage the daemon lifecycle
|
|
251
|
-
- **Socket Communication**: Client and daemon communicate via Unix socket
|
|
247
|
+
- **Socket Communication**: Client and daemon communicate via a private Unix socket under `$XDG_RUNTIME_DIR/discord-py-self-mcp` or `~/.local/state/discord-py-self-mcp`
|
|
252
248
|
- **Rate Limiting**: Respected automatically by the underlying discord.py library
|
|
253
249
|
|
|
254
250
|
## Working with Forum Channels
|
|
@@ -294,7 +290,6 @@ python3 scripts/dcli.py daemon restart
|
|
|
294
290
|
```bash
|
|
295
291
|
# Clean up and restart
|
|
296
292
|
python3 scripts/dcli.py daemon stop
|
|
297
|
-
rm /tmp/discord-cli-daemon.sock
|
|
298
293
|
python3 scripts/dcli.py daemon start
|
|
299
294
|
```
|
|
300
295
|
|