haksnbot-tools
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@haksnbot-toolsconnect to mc.example.com as HaksnBot"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
haksnbot-tools
An MCP (Model Context Protocol) server that gives Claude the ability to play Minecraft. Built on Mineflayer, this tool lets Claude Code (or any MCP-compatible AI) control a Minecraft bot with 40+ actions.
Part of the Haksnbot suite: This project was originally developed as part of Haksnbot, an autonomous Minecraft bot. The suite includes four repos that work together: haksnbot-tools (this repo - Minecraft bot control), haksnbot-mind (the autonomous agent), haksnbot-admin (server administration), and haksnbot-memory (persistent memory). Each can be used independently, but they're designed to work together.
Features
Full bot control - Movement, combat, building, crafting, inventory management
Microsoft authentication - Works with online-mode servers
Pathfinding - Automatic navigation using mineflayer-pathfinder
Auto-reconnect - Handles disconnections with exponential backoff
Vision - 3D rendered screenshots of what the bot sees
Villager trading - Browse and execute trades
Shop integration - Works with QuickShop-Hikari plugin for player economies
Related MCP server: agent-skill-loader
Installation
git clone https://github.com/haksndot/haksnbot-tools.git
cd haksnbot-tools
npm installUsage with Claude Code
Add to your Claude Code MCP settings (~/.claude/settings.json):
{
"mcpServers": {
"minecraft": {
"command": "node",
"args": ["/path/to/haksnbot-tools/src/index.js"]
}
}
}Then in Claude Code:
> Connect to my Minecraft server at mc.example.com as "ClaudeBot"
> What's around me?
> Find some oak trees and chop wood
> Craft a crafting table and wooden pickaxeAvailable Tools (40+)
Connection
Tool | Description |
| Connect to a Minecraft server (supports Microsoft auth) |
| Disconnect from server (stops auto-reconnect) |
| Check state: disconnected, connecting, connected, reconnecting |
Status & Observation
Tool | Description |
| Position, health, hunger, gamemode, dimension |
| Block type at coordinates |
| Scan blocks in radius, returns counts by type |
| Find nearest blocks of type (e.g., diamond_ore) |
| List mobs, animals, items in range |
| List players in range |
Movement
Tool | Description |
| Pathfind to exact coordinates |
| Pathfind to within range of coordinates |
| Follow a player by username |
| Turn to face coordinates |
| Stop current movement |
Communication
Tool | Description |
| Send chat message (supports /commands) |
| Private message to a player |
| Recent chat, deaths, announcements |
Inventory
Tool | Description |
| List inventory items |
| Currently held item |
| Equip to hand or armor slot |
Containers
Tool | Description |
| Open chest, furnace, etc. |
| List container items |
| Move items to/from container |
| Close container |
Crafting
Tool | Description |
| Items craftable with current inventory |
| Get recipe for an item |
| Craft an item (auto-uses crafting table) |
Combat & Interaction
Tool | Description |
| Attack nearest entity of type |
| Use held item (right-click) |
| Feed animals, milk cows, shear sheep |
Sleep
Tool | Description |
| Find bed and sleep |
| Wake up from bed |
Building
Tool | Description |
| Place block at coordinates |
| Break block (auto-equips best tool) |
| Place and write on sign |
| Read sign text |
| Edit existing sign |
Villager Trading
Tool | Description |
| Find villagers with professions |
| View available trades |
| Execute a trade |
| Close trade window |
Mounts & Vehicles
Tool | Description |
| Mount horse, pig, boat, minecart |
| Dismount from vehicle |
Economy (QuickShop-Hikari)
Tool | Description |
| List all player shops |
| Search shops by item |
| Create a chest shop |
Vision
Tool | Description |
| 3D rendered screenshot |
| Download player skin as PNG |
Authentication
Offline-mode servers
connect to localhost as "MyBot"Online-mode servers (Microsoft auth)
connect to mc.example.com as "myemail@outlook.com" with microsoft authOn first connection, enter the device code at microsoft.com/link. Tokens are cached for future use.
# Manage auth tokens
node auth.js status myemail@outlook.com
node auth.js login myemail@outlook.com
node auth.js logout myemail@outlook.comAuto-Reconnect
Automatic reconnection with exponential backoff:
Initial delay: 2 seconds
Max delay: ~5 minutes
Max attempts: 10
Use disconnect to fully stop the bot.
Plugin Integrations
These tools were originally developed for a server running GriefPrevention and QuickShop-Hikari plugins. The bot has built-in support for these plugins, but all features work without them - they gracefully degrade when the plugins are not present.
GriefPrevention (Claim Protection)
The bot automatically detects claim protection when performing actions. On servers with GriefPrevention, the bot:
Checks claim ownership before modifying blocks or containers
Respects trust levels (uses
/trustlistto check permissions)Reports denials clearly so you know why an action failed
Tools with GriefPrevention awareness:
Tool | Behavior with GriefPrevention |
| Checks if bot can break blocks in the claim |
| Checks if bot can build in the claim |
| Checks container/build trust for sign placement |
| Checks permission to modify signs |
| Checks container trust before opening chests |
| Checks if bot can interact with animals in claims |
| Checks permission to mount animals/vehicles in claims |
| Verifies claim ownership before creating shops |
Without GriefPrevention: All tools work normally. The bot simply won't detect claim-based denials (vanilla protection like spawn protection still applies).
QuickShop-Hikari (Player Economy)
For servers with QuickShop-Hikari, the bot can query and interact with player shops. These features require the MC_SERVER_ROOT environment variable pointing to your Minecraft server directory.
Configuration:
{
"mcpServers": {
"minecraft": {
"command": "node",
"args": ["/path/to/haksnbot-tools/src/index.js"],
"env": {
"MC_SERVER_ROOT": "/path/to/minecraft-server"
}
}
}
}Shop tools:
Tool | Description |
| Query all shops from the QuickShop H2 database |
| Search for shops selling/buying a specific item |
| Create a QuickShop chest shop at coordinates |
Without QuickShop or MC_SERVER_ROOT: These three tools return a helpful error message: "QuickShop features require MC_SERVER_ROOT environment variable". All other tools work normally.
Graceful Degradation Summary
Plugin | If Not Present |
GriefPrevention | All tools work; claim checks are skipped |
QuickShop-Hikari | Shop tools ( |
Requirements
Node.js 18+
For
take_screenshot: OpenGL support (Mesa on Linux)
Dependencies
mineflayer - Minecraft bot framework
mineflayer-pathfinder - Pathfinding
prismarine-viewer - 3D rendering
@modelcontextprotocol/sdk - MCP server SDK
Related Projects
haksnbot-mind - Autonomous Minecraft bot using Claude Agent SDK
haksnbot-admin - Server administration MCP tools
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Hosted MCP server connecting claude.ai, ChatGPT and other AI apps to your own computer
Cloud-hosted MCP server for durable AI memory
An MCP server that gives your AI access to the source code and docs of all public github repos
Related MCP Servers
- AlicenseBqualityDmaintenanceA Minecraft bot that allows Claude and other LLMs to control a Minecraft character through the Model Context Protocol, enabling AI to perform various in-game actions like movement, building, and interacting with the world.1622 npmApache 2.0
- AlicenseAqualityBmaintenanceMCP server to dynamically load Claude Code skills into AI agents543 npm15MIT
- AlicenseNot gradedqualityAmaintenanceMCP server that enables Claude to control your computer, similar to Anthropic's computer use but easy to set up locally.311 npm362MIT
- AlicenseNot gradedqualityCmaintenanceA production-ready MCP server that gives an LLM agent standalone-equivalent control over a Mineflayer Minecraft bot — movement, mining, crafting, inventory, combat, containers, chat, and much more — exposed as 110 strongly-typed tools across 23 groups, with full bot lifecycle management and dual (poll + push) event streaming.50 npm2MIT