Back to Home
haksndot icon

haksnbot-tools

by haksndot

Overview

An MCP server that enables AI (like Claude) to control a Minecraft bot for various in-game actions.

Installation

Run Command
node src/index.js

Environment Variables

  • MC_SERVER_ROOT
  • MC_HOST
  • MC_USERNAME
  • MC_PORT
  • MC_VERSION
  • MC_AUTH

Security Notes

The server uses `child_process.exec` in `src/tools/economy.js` to query a QuickShop H2 database. This command executes `java -cp ... org.h2.tools.Shell -sql "${sql}"`, directly passing SQL as a string. While there's a basic `replace` for double quotes, this method is highly susceptible to SQL injection if an AI agent can control parts of the SQL input. Furthermore, `exec` can potentially lead to arbitrary command execution on the host system if the input can escape the SQL context and inject shell commands. This poses a critical vulnerability. Additionally, sensitive database files are temporarily copied to `/tmp` for read operations, presenting a minor information exposure risk if the host's `/tmp` directory is not secured. Other actions like `bot.chat()` or direct packet writes (`update_sign`) are standard for Minecraft bots but could be abused by an unconstrained AI for in-game griefing.

Similar Servers

Stats

Interest Score0
Security Score5
Cost ClassHigh
Avg Tokens5000
Stars0
Forks0
Last Update2026-01-19

Tags

MinecraftBot ControlAI IntegrationMineflayerMCP Server