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

@tryforge/forge.minecraft

v1.0.0

Published

ForgeMinecraft is an extension that provides real-time Minecraft server management via the management server protocol, alongside various functions for retrieving status and metadata from Java and Bedrock servers.

Downloads

76

Readme

ForgeMinecraft

ForgeMinecraft is an extension that provides real-time Minecraft server management via the management server protocol, alongside various functions for retrieving status and metadata from Java and Bedrock servers.


Contents

  1. Installation
  2. Management Server
  3. Java & Bedrock Servers
  4. Documentation
  1. Run the following command to install the required npm packages:

    npm i @tryforge/forge.minecraft
  2. Here’s an example of how your main file should look:

    const { ForgeClient } = require("@tryforge/forgescript")
    const { ForgeMinecraft } = require("@tryforge/forge.minecraft")
    
    const minecraft = new ForgeMinecraft({
        java: {
            host: "0.0.0.0", // Default Java Server
            port: 25565
        },
        bedrock: {
            host: "0.0.0.0" // Default Bedrock Server
        }
    })
    
    const client = new ForgeClient({
        ...options, // The options you currently have
        extensions: [
            minecraft
        ]
    })
    
    client.commands.load("commands")
    
    client.login("YourToken")

    💡 Tip
    View all available client options here.

Minecraft’s management server protocol, introduced in 1.21.9, enables remote management and monitoring of your Minecraft server. It allows this extension to connect to the server, execute administrative actions, and receive real-time events such as player activity, server status changes, and configuration updates, making automation and server control easier.

Setting up the Minecraft Server

To enable the management server protocol, set up management-server-enabled, management-server-port and management-server-host in the server.properties file of your Minecraft server:

management-server-enabled=true
management-server-port=25585
management-server-host=0.0.0.0
management-server-secret=

You can either set management-server-secret to a random 40 character long alphanumeric string or leave it empty and let the Minecraft server generate a random token on startup. You will need this token to connect to the server.

If you want to establish connections from a web browser, you need to set the allowed origins:

management-server-allowed-origins=http\://localhost\:63315

TLS

By default, TLS is enabled, but the server will crash if you don't provide a certificate. If the management server protocol is not exposed to the internet, or you are using a reverse proxy, the easiest option would be to disable TLS:

management-server-tls-enabled=false

Setting up Client Configurations

Next, configure the ForgeMinecraft client. This is where you specify which server events you want to listen to and provide the management server connection details, such as host, port, and authentication token (secret). These options determine how ForgeMinecraft connects to your server and which real-time events the extension receives.

const minecraft = new ForgeMinecraft({
    events: [
        "playerJoined",
        "serverStarted"
    ],
    server: {
        host: "0.0.0.0",
        port: 3000,
        token: "YourAuthToken",
    }
})

// ...

minecraft.commands.load("minecraft") // Load your server events folder

// ...

💡 Tip
View all available server options here.

Desired Java and Bedrock functions let you fetch status and metadata from Minecraft servers on demand. You can call these functions with custom host and port arguments, or define default Java and Bedrock server settings in the client configuration to avoid passing arguments each time. The responses include various details such as server status, version, players, and more. Note that availability depends on the server, as not all servers allow full information to be queried.