npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@baipiaojuntuan/mcbots

v1.2.8

Published

Minecraft bot and status dashboard for multi-server management

Readme

@baipiaojuntuan/mcbots

Minecraft 多服务器保活机器人及监控面板。面向资源回收策略严格的免费服务器环境,通过模拟客户端连接维持服务器在线,并提供统一的实时监控界面。

能力一览

  • 多服务器管理:通过 SERVERS_JSON 环境变量一次性配置多台 MC 服务器,自动为每台服务器创建对应机器人连接
  • 智能重连:内置连接超时监控,30 秒后自动重连
  • 实时监控面板:各机器人运行状态即时刷新,统一管理
  • 多实例并发:同一服务器可同时连接多个机器人
  • 行为可配置:通过 CHAT 与 MOVE 环境变量控制机器人的聊天与移动行为

快速上手

方式一:npx 直接运行

export SERVERS_JSON='[{"host":"mc-yy.io","port":25565}]'
npx @baipiaojuntuan/mcbots

方式二:Node.js 项目

创建 index.js,将地址端口替换为你的服务器(可添加多台):

process.env.SERVERS_JSON='[{"host":"mc-yy.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"},{"host":"mc-xx.io","port":25565,"minBots":1,"maxBots":3,"version":"1.20.1"}]';

const { initialize, shutdown } = require('@baipiaojuntuan/mcbots');

initialize().then(() => {
  console.log('mcbots start successed');
}).catch(err => {
  console.error('mcbots start fail:', err);
});

process.on('SIGINT', shutdown);
process.on('SIGTERM', shutdown);

配套 package.json:

{
  "name": "mc",
  "version": "1.0.0",
  "description": "mcbots",
  "main": "index.js",
  "scripts": {
    "start": "node index.js"
  },
  "dependencies": {
    "@baipiaojuntuan/mcbots": "latest"
  }
}

启动:

npm install && npm run start

方式三:Docker

docker run -d \
  --name mcbot \
  -e SERVERS_JSON='[{"host":"mc-yy.io","port":25565,"minBots":1,"maxBots":3},{"host":"mc-xx.io","port":25565,"minBots":1,"maxBots":3}]' \
  -p 3000:3000 \
  mingli2038/mcbot:latest

版本更新记录

  • 1.2.8 修复配置复制不准确的问题:此前复制的是配置 JSON 的初始值,现在复制的是正在运行的真实配置(环境变量 SERVERS_JSON)
  • 1.2.7 支持通过 npx 直接执行
  • 1.2.6 mineflayer 升级至 4.35:可直连 1.21.8-1.21.11 离线模式服务器,无需兼容插件;MC 版本、最大/最小机器人数变为可选项(有默认值),MC 版本使用上游自动识别
  • 1.2.5 支持服务备注,便于区分无域名的服务器
  • 1.2.4 优化机器人断开逻辑,避免幽灵机器人
  • 实验功能:SERVER_JSON 热更新,可能引发预期之外的问题;如需稳定使用,建议使用 1.1 版本

监控面板

页面底部新增修复入口:【更新 MC 机器人配置】

该功能涉及服务器配置修改,所有操作均已加入认证保护。

密钥配置

  • 默认密钥从 Telegram 频道 获取
  • 也支持环境变量自定义:
    • HOTUPDATE_SECRET:设置密钥
    • HOTUPDATE_SALT:加盐,防止彩虹表破解

项目来源

本项目的实现思路源自 Tweek 白嫖群成员 [这种事可以花点钱] 提供的镜像 ghcr.io/oprmg/mcbot:latest。作者通过 AI 对其实现进行重构并加入自己的想法后重新发布。