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

mccompanion

v0.1.0

Published

Client for the public MCCompanion API: Minecraft Java and Bedrock account lookups, server metrics, skins and resource packs.

Readme

mccompanion

Client for the public MCCompanion API: Minecraft Java and Bedrock account lookups, server metrics, skins and resource packs.

No account or key is needed. The API allows 60 requests per minute per address.

npm install mccompanion

Node 18 or newer, since it uses the builtin fetch.

Looking up accounts

import mcc from "mccompanion";

const java = await mcc.java("Notch");

const bedrock = await mcc.bedrock("SomeGamertag");

const both = await mcc.lookup("Notch");

Java accounts accept a username or a UUID, Bedrock accepts a gamertag or an XUID.

Servers, skins and packs

const { top, totalServers } = await mcc.metrics();
const { servers } = await mcc.featuredServers();
const { packs } = await mcc.featuredPacks();
const pack = await mcc.featuredPack(packs[0].slug);
const { skins } = await mcc.topSkins();
const profile = await mcc.profile("Jens");

Errors

Anything other than a 2xx throws an MCCompanionError carrying the status and the API's own error code.

import { MCCompanionError } from "mccompanion";

try {
  await mcc.java("zzqqxxjjnnbb1");
} catch (err) {
  if (err instanceof MCCompanionError && err.status === 404) {
  }
}

A missing account is a 404, never a 5xx, so there is no point retrying it.

A 429 is never retried, and you should not retry it either. Three rate limit hits within ten minutes get your address banned permanently. The error caries retryAfter in seconds when the server supplies it.

To stay clear of that, the client spaces its own requests out to 50 per minute against a published limit of 60. Raise it with requestsPerMinute if you know what you are doing, or pass 0 to turn it off and handle pacing yourself.

Options

import { MCCompanion } from "mccompanion";

const client = new MCCompanion({
  timeout: 15000,
  retries: 2,
  requestsPerMinute: 50,
  userAgent: "my-app/1.0",
});

Setting a userAgent is appreciated: it is how we tell traffic apart when something goes wrong.

Every method takes { signal } if you want to cancel a request yourself.

What is not here

Everything behind a login. That part of the API authenticates with a Firebase token issued to the MCCompanion app, which a third party cannot obtain, so wrapping it would promise something that cannot work.