
mineflayer
Create Minecraft bots with a powerful, stable, and high level JavaScript API.
The Lens
mineflayer turns a Minecraft account into a programmable client. Point it at a server, write JavaScript, and your bot can dig, build, fight, navigate terrain, and chat. MIT licensed, runs on Node, also callable from Python.
There is nothing to host. Install the npm package, hand it a server URL plus credentials, and you have a bot. Pathfinding works out of the box. Where it gets hard is what you ask it to do. Coordinating multiple bots, surviving mob attacks, or building structures larger than a few blocks means writing real game logic. The library tracks underlying protocol versions, so new Minecraft releases usually work within an update or two.
This is the standard for Minecraft automation. Hobbyists, modders, AI experimenters running LLM-powered bots, and researchers studying autonomous agents in 3D environments all use mineflayer because the alternatives are protocol libraries that hand you raw packets. Start here unless you have a reason not to.
The catch: Minecraft is owned by Microsoft and the protocol changes with major updates. Expect occasional version pinning while maintainers catch up.
Get tools like this every Wednesday
One featured tool, three on the radar. No fluff.
Free vs Self-Hosted vs Paid
fully free**Free tier:** Fully free, MIT licensed. Install via npm, no account, no rate limits. The library handles authentication against your own Minecraft account, but Minecraft itself is a paid game (one-time purchase, ~$30 USD).
**Self-hosted:** This is the only mode. The bot runs as a Node process on your machine or a small VPS. A cheap $5/mo VPS handles dozens of bots if you're running a server full of them.
**Paid tier:** None. There is no commercial offering. PrismarineJS is a community-maintained ecosystem of Minecraft tooling.
Completely free and open source. Minecraft itself is a paid game.
License: MIT License
Use freely, including commercial. Just keep the license.
Commercial use: ✓ Yes
About
- Owner
- PrismarineJS (Organization)
- Stars
- 6,968
- Forks
- 1,268