# minecraft-server-ping

> Minecraft server status

Latest version **0.3.4** (published 2026-08-03) · MIT license · 0 weekly downloads

## Install

```sh
npm install minecraft-server-ping
pnpm add minecraft-server-ping
yarn add minecraft-server-ping
bun add minecraft-server-ping
```

## Health

**Score 70/100 (B)** — status: active.

Positive: has types; esm support; no vulnerabilities; has provenance; high maintenance score; high quality score.

Warnings: low downloads; pre 1.0.

## Facts

| | |
|---|---|
| Version | 0.3.4 |
| Published | 2026-08-03 |
| First published | 2019-07-04 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Node | >=18.0.0 |
| Dependencies | 0 |
| Unpacked size | 64.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 24 |
| Author | mharj |
| Maintainers | mharj |
| Keywords | minecraft, ping, typescript |

## Links

- npm: https://www.npmjs.com/package/minecraft-server-ping
- Repository: https://github.com/mharj/minecraft-ping
- Homepage: https://github.com/mharj/minecraft-ping#readme
- Issues: https://github.com/mharj/minecraft-ping/issues
- npm.io page: https://npm.io/package/minecraft-server-ping

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.3.4 (latest) — 2026-08-03
- 0.3.3 — 2025-03-08
- 0.3.2 — 2025-02-06
- 0.3.1 — 2024-10-11
- 0.3.0 — 2024-08-30
- 0.1.4 — 2024-08-30
- 0.1.3 — 2024-04-22
- 0.1.2 — 2023-08-04
- 0.1.1 — 2023-07-19
- 0.1.0 — 2023-07-19
- 0.0.13 — 2023-07-14
- 0.0.12 — 2023-06-18
- 0.0.11 — 2023-05-22
- 0.0.10 — 2023-05-22
- 0.0.9 — 2023-04-25
- … 8 more at https://npm.io/package/minecraft-server-ping/versions

## README

# minecraft-ping

## Minecraft server ping utility

Based on https://www.npmjs.com/package/minecraft-pinger javascript version.

Hostname & Port object and URL can be provided as direct value, with Promise or callback function (sync or async).

## API Documentation
See [API Documentation](https://mharj.github.io/minecraft-ping/);

```javascript
const data = await ping(); // localhost:25565
```

```javascript
const data = await ping(Promise.resolve({hostname: 'eu.mineplex.com'}));
```

```javascript
const data = await ping(() => {hostname: 'eu.mineplex.com', port: 25565});
```

```javascript
const data = await ping(() => Promise.resolve({hostname: 'eu.mineplex.com', port: 25565}), {timeout: 100}); // timeout 100ms
```

```javascript
const data = await pingUri('minecraft://eu.mineplex.com');
```

```javascript
const data = await pingUri(new URL('minecraft://eu.mineplex.com:25565'));
```

or using Result

```typescript
const result: Result<IMinecraftData, Error> = await pingUriResult('minecraft://eu.mineplex.com'); // or pingResult({server: 'eu.mineplex.com', port: 25565})
// with logic
if (result.isOk) {
	console.log(result.ok()); // IMinecraftData
} else {
	console.log(result.err().message); // Error message
}
// or with throw
const data: IMinecraftData = result.unwrap(); // throws error if Result is Error
```

---
_Source: https://npm.io/package/minecraft-server-ping · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
